open-prices-frontend icon indicating copy to clipboard operation
open-prices-frontend copied to clipboard

feat: script to filter and generate labels (with translations)

Open raphodn opened this issue 1 year ago • 0 comments

What

Script to automatically :

  • filter the taxonomy labels to keep only "organic" (the only one used currently)
  • generate the language specific fields

Output

Total number of labels: 2896
Labels remaining: 1
Wrote to language files
old_labels 1
new_labels 1

148 json files in src/data/labels/<language-code>.json

Links that helped

  • https://github.com/openfoodfacts/open-prices-frontend/pull/273
  • https://github.com/openfoodfacts/openfoodfacts-python/blob/develop/openfoodfacts/taxonomy.py
  • https://static.openfoodfacts.org/data/taxonomies/labels.full.json

raphodn avatar Feb 11 '24 14:02 raphodn