Closed pokoli closed 4 years ago
I think this is now ready for testing and comments.
I think this is now ready for testing and comments.
Hi Sergi,
There are already a few questions and comments on your pull request. Can you have a look at them? I'm fine with making some changes myself to merge this but there are some bits that are more difficult for me at this time.
The biggest blocker is the encoding of FNC1. It would be really nice to see how to generate an actual bar code so I can get a better feel for how the API should look like.
Thanks.
Hi,
I've addressed most of the comments. It will be great if you can have a look at it.
ping @arthurdejong
Will be great if you can give a second review on this.
Thanks in advance!
Hi @pokoli ,
Sorry not to get around to this sooner but I rewrote bit parts of your contribution as 180788a. It should support a wider range of application identifiers and the list of GS1 application identifiers can also be downloaded from the GS1 website.
Other than that it also adds validate()
and is_valid()
functions which is more or less required for all number modules in python-stdnum.
I've included a wider range of tests and added a separator
option that can be used to specify a value to use as FNC1 separator. That should make it easier for code that calls this to supply something that can be used in barcodes. The encode()
function now also has a parentheses
option to surround the application identifiers by parentheses (mostly to make my tests more readable).
Thanks for providing your pull request.
@arthurdejong Thanks for your work on it!
Following https://lists.arthurdejong.org/python-stdnum-users/2019/msg00000.html