Demizo / Daily_You

Every day is worth remembering...
GNU General Public License v3.0
112 stars 5 forks source link

[Feature Request] Import from Daylio? #67

Closed MrCamel999 closed 6 months ago

MrCamel999 commented 6 months ago

I have used Daylio for about 2 years at this point, and this app looks very good to me. I would like to switch to this app, but I would want to import from Daylio. I have zero clue how possible this is to do, but yeah.

Thanks for making an awesome foss app!

Demizo commented 6 months ago

Good news and bad news. It looks like Daylio offers a CSV export option in the settings. I could make a tool to import the mood and note text for ever entry. Unfortunately, the CSV doesn't link to the image file names so I can't think of any way to automatically import those.

It also looks like the mood names can be customized in Daylio so I can't guarantee that "rad" in the CSV export can be translated to the happiest option in daily you. This unreliability makes me hesitant to add this as an import option in the app. However, I probably could make you a python script or something to convert the CSV into a JSON file that could be imported into daily you directly. That way you could associate the mood values to your custom mood names.

When you export images from Daylio they are named after the date and time they were added NOT the date of the entry. If you mostly added photos on the day of the entry then I could maybe hack together a tool that renames all of images based on their date and have the entry JSON link to those names. That way you could import at least most of the images with hopefully only a few errors to fix.

Demizo commented 6 months ago

Quick followup. Daylio also seems to support multiple images per day while Daily You still only supports one. So the import would not be lossless.

MrCamel999 commented 6 months ago

That sounds pretty awesome already! I also see that they have an export option for everything here in this screenshot. Not sure if that helps at all, but honestly even if I had to fix some things here and there that CSV import sounds pretty awesome! Screenshot_20240101-150532.png

Demizo commented 6 months ago

A tool like this may be useful for others. When I get the chance I will make a separate repository with the script an step by step instructions. When that is ready I will let you know. If it works then I will link it in the Daily You readme for future Daylio users.

MrCamel999 commented 6 months ago

Gotcha. Thanks a crap ton!

Demizo commented 6 months ago

@MrCamel999 This repo https://github.com/Demizo/daylio-to-daily-you has a script and instructions on how to import form Daylio. It is far from graceful. It seems to work from my rudimentary tests. Let me know if it works or if you have any questions!

MrCamel999 commented 6 months ago

Woah, that was super quick!! I'll try it out here in a second, I was expecting that to take like a week lol. Thank you very much!!

MrCamel999 commented 6 months ago

Alright, I just got the opportunity to try this out, and I was able to follow the instructions exactly and successfully import everything from Daylio into Daily You! As I went through though, I had in mind the limitations of Daily You, being the 1 photo/day support max, and the limitations of Daylio, being that they name the image based on the day added, not the day of the entry. I went through the folder and for days with multiple photos manually chose one and deleted the other two, and corrected dates all before using the python script on my machine from the repo. After doing that, everything worked exactly as described in the repo, awesome work, and thank you very much!! Happy New Year!

Demizo commented 6 months ago

I'm glad it worked! Happy New Year!