birday
birday copied to clipboard
Import from CSV
Hi there,
Lovely app. Would love to be able to import from CSV or any other custom structure. The reason for this is that I don't wanna sit and manually import the birthdays for over 500 persons.
Is there a format stucture on the Birday backup? Then I could just restucture my data into that format.
Thanks!
Similar to #28 , i understand the problem, but i can't add a 100% working "import from CSV" feature simply because Birday can't recognize all the different structures a CSV could have. What i CAN do, instead, is to improve the existing import function to also recognize some CSV files and parse them in the database. But, we have 3 problems, and i appreciate any advice:
- The structure MUST match the db exactly, else Birday won't recognize the fields. I can try to write a smart field recognition, or i can set default values when i don't find a specific field, but i have to write the correct structure somewhere in the app.
- By making this possibile, i have to introduce many checks to avoid the insertion of illegal values and data types
- The backup import is designed to overwrite any existing data, and this means that, in case of CSV importing, you have to import the file first, and start inserting manually only after the import is complete.
So, i tried to write a csv importer and exporter in f6115b8620d0b9d2bc21ee052efefd4071c6b837 and previous commits. It will be available in the next update under the "experimental settings". I made it in the smartest way possible, and it can recognize the fields automatically in certain cases, but it's away from perfect 😄