Jump to content

Reusing Open Food Facts Data: Difference between revisions

m
Typo
(Convert TSV to CSV)
m (Typo)
Line 132: Line 132:


Filtering barcodes which are different from a code containing 1 to 13 digits:
Filtering barcodes which are different from a code containing 1 to 13 digits:
  zcat openfoodfacts-products.jsonl.gz | jq -r '. | select(.code|test("^[0-9]{1,13}$") | not) | .code' > ean_gt_13.csv
  $ zcat openfoodfacts-products.jsonl.gz | jq -r '. | select(.code|test("^[0-9]{1,13}$") | not) | .code' > ean_gt_13.csv
These operations can be quite long (more than 10 minutes depending on your computer and your selection).
These operations can be quite long (more than 10 minutes depending on your computer and your selection).