Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

A barcode generator #2097

Closed
hrdwdmrbl opened this issue Jul 31, 2020 · 4 comments · Fixed by #2104
Closed

A barcode generator #2097

hrdwdmrbl opened this issue Jul 31, 2020 · 4 comments · Fixed by #2104

Comments

@hrdwdmrbl
Copy link

Is your feature request related to a problem? Please describe.

Just that I would like to fake barcodes

If you're adding new objects, please describe how you would use them

I would use them for products

Describe alternatives you've considered

I can generate random numbers. A UPC code is 12 digits.

Additional context

My project deals with products. Prices, product names, barcodes, costs, SKUs, colors, sizes, country of origin, currency, weights, etc.

@sudeeptarlekar
Copy link
Contributor

Sounds good, is there good doc that we refer.
Thanks in advance

@hrdwdmrbl
Copy link
Author

@sudeeptarlekar I would look at the wikipedia UPC article on numbering https://en.wikipedia.org/wiki/Universal_Product_Code#Numbering and variations (right below numbering). UPC isn't the only standard though. There's ISBN https://en.wikipedia.org/wiki/International_Standard_Book_Number and EAN and if you're selling products on Amazon then there's ASIN. I just learned of something called a GTIN. Anyway, I think UPC are the most common.

@sudeeptarlekar
Copy link
Contributor

Well this seems little research here as I never worked on barcodes, and there is some logic involved in generating correct barcode check digit(at least for UPC-A).
Will do some reading and refer some docs then work on PR

@hrdwdmrbl
Copy link
Author

@sudeeptarlekar Thank you. Yes, a bit of logic which is one reason why I think there ought to be a specific class for it. For my application it doesn't verify their validity so it isn't a problem but for others they likely do verify.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants