OpenNutriTracker
OpenNutriTracker copied to clipboard
feat: add importing meals via CSV
This PR enables users to add meals via a CSV file. It adds a new button in the settings page "Import CSV" - when pressed, the user selects a file from the file picker, afterwards if the file is valid, all the meals present there will be added to the database under "Products".
The CSV format should have the following columns (not necessarily in the same order of keys):
name,protein,total_sugars,saturated_fat,total_fat,food_energy,carbohydrates,fiber,barcode
These names are necessary for the import to work.
This PR also adds a new field to the database: "barcode". Currently it's not used, but I believe we could easily implement barcode local search.
Please suggest any changes if needed.