Repository navigation
Conversation
Reads Open Food Facts (export and live lookups, including Open Products Facts and Open Beauty Facts), the bundled USDA table and NEVO downloads, and has the search helpers. Products without nutrition are kept, with Food.Nutrition false, and products now carry their package size, categories and a small photo URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The food tables Troye and Shoppa share, moved out of Troye's
backend/foodswithout its database code.From Troye, unchanged in behavior: the USDA reader and bundled table, the NEVO reader (CSV, Excel, zip),
Normalize, plural stemming and name scoring (now exported asStemmed,FieldScore,CoversAll,HasOtherWord), and the Open Food Facts parsing.New:
Client{UserAgent}withProduct(ctx, site, code)andExport(ctx, url); each app sends its own User-Agent.Productalso works withOpenProductsFactsandOpenBeautyFacts.ReadExport(r, countries, add)keeps products without nutrition, withFood.Nutritionfalse. Troye filters onNutritionandPlausibleto keep exactly what it kept before.FoodgainsQuantity(package size),Categories(OFF category tags) andImageURL(the small front photo).OFFPhotoAttributionfor the CC BY-SA photo credit, next to the ODbL one.USDARenamed(t)replaces Troye'sRenameUSDA, which needed the database.Not here, on purpose: storing, importing and ranking stay in each app.
After merging, tag
v0.1.0so Troye and Shoppa can require it.Generated by Claude Code