Skip to content

Conversation

@dd-dreams
Copy link

@dd-dreams dd-dreams commented Oct 8, 2024

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" for searching locally with barcodes.

Please suggest any changes if needed.

@dd-dreams dd-dreams changed the title feat: add importing meals via CSV feat: importing meals via CSV + local barcode search Oct 14, 2024
@volodymyrzuyev
Copy link

Was just about to start work on a similar commit. Please merge into main)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants