-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
Folksonomy API currently recognize products with the following regexp: [0-9]{1,13} which means barcodes containing 1 to 13 digits.
More than 12,000 products have barcodes bigger than that. Eg. https://world.openfoodfacts.org/product/70238541220839/ikea (even if it's not a food product, it is a real barcode).
This topic is relevant because Folksonomy Engine could be use for other kind of products, nit just food. And these other kind of products sometimes have different barcodes than classical EAN13 barcodes.
To extract the barcodes with more than 13 digits:
zcat openfoodfacts-products.jsonl.gz | jq -r '. | select(.code|test("^[0-9]{1,13}$") | not) | .code'
See also:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status