brandonp2412 / FitBook

Track your calorie intake - Completely offline
MIT License
25 stars 2 forks source link

[Feature Request] Support Open Food Facts for food data #2

Open anddam opened 1 month ago

anddam commented 1 month ago

Please consider adding support for Open Food Facts as data backend, it has a huge data set that is user-contributed with barcode and ingredient labels.

brandonp2412 commented 1 month ago

I have personally had negative experiences using the Open Food Facts database on Waistline (i used that app for a few years) and it was probably the main reason I made this app in the first place. If enough people think this is a good idea (upvote this issue) i'll consider it.

shaneutt commented 3 weeks ago

The Open Food Facts database is several GB is size, as opposed to the currently embedded DB, right? So assuming you even wanted to do this you'd basically be in the territory of needing to enable networking permissions and have this thing cache the DB and update it periodically?

anddam commented 3 weeks ago

I wasn't implying to make the whole db available for offline use, actually didn't occurr to me FitBook was an offline-first app.

I thought of integration with OFF as an additional data source that —when networking is available— can be used to fill your local data, just like when manually adding a food in the "Foods" view.

I have been trying to adopt FitBook last couple weeks but the issue of not having food in my own language has been a barrier to entry so steep that I have not been logging at all for several days.

I am slowly building the food I actually need, it is a small set in the end, but having OFF available inside the app would smooth the whole process.

The SecUSo Food Tracker does this, and I found it quite handy albeit it being a very basic app.

In the end if you want to keep the app without networking (another thing I wasn't aware of) it is best to close this issue.

This discussion made me think I can just export the user contributed database, edit in on computer, the import it back with my usual foods there. This way I will only need to manually add the occasional missing food.

natrius commented 1 week ago

What was the problem with a connection to the OFF? I use the official (it really got way better in the last year) from F-Droid and it works pretty well and i often check and edit the stuff if needed so the next time everything is in there.

brandonp2412 commented 6 days ago

What was the problem with a connection to the OFF? I use the official (it really got way better in the last year) from F-Droid and it works pretty well and i often check and edit the stuff if needed so the next time everything is in there.

I can't remember what was bugging me when i used it through Waistline but it was probably a mixture of connectivity issues and not having certain foods I would search through. Im probably averse to doing this because I have no experience making network requests and stuff in Dart. I'll probably try out doing something like this after I do a separate project which will require internet connectivity (stock tracking thing).