Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: script to filter and generate raw categories (with translations) #273

Merged
merged 5 commits into from
Feb 4, 2024

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Feb 3, 2024

What

Script to automatically :

  • filter the taxonomy categories to keep only the "raw" ones (needed for the price add form + price display)
  • generate the language specific fields

Output

Total number of categories: 12854
Filter with the following parent categories: [<TaxonomyNode en:vegetables>, <TaxonomyNode en:fruits>, <TaxonomyNode en:culinary-plants>, <TaxonomyNode en:nuts>, <TaxonomyNode en:potatoes>, <TaxonomyNode en:textured-vegetable-protein>]
Add extra nodes: ['en:rolled-oats', 'en:ginger', 'en:mushrooms']
Additional filtering on: ['Cooked ', 'Fresh ']
Categories remaining: 579
Wrote to language files

185 json files in src/data/categories/<language-code>.json

Links that helped

@raphodn raphodn marked this pull request as ready for review February 3, 2024 21:08
@raphodn raphodn requested a review from dq18 February 3, 2024 21:51
@raphodn raphodn changed the title feat: script to filter and generate raw categories feat: script to filter and generate raw categories (with translations) Feb 3, 2024
@raphodn raphodn linked an issue Feb 3, 2024 that may be closed by this pull request
@dq18
Copy link
Collaborator

dq18 commented Feb 4, 2024

I would rather have this script in the backend and have a mechanism to fetch the needed data and store it in the store. But good for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Translate raw product categories
2 participants