Laverna / laverna

Laverna is a JavaScript note taking application with Markdown editor and encryption support. Consider it like open source alternative to Evernote.
https://laverna.cc/index.html
Mozilla Public License 2.0
9.18k stars 801 forks source link

Export settings and data thru command line #981

Closed ykyuen closed 6 years ago

ykyuen commented 6 years ago

Is it possible to export the settings file and data thru command line? my archlinux setup is crashed and i could get into the window manager. i only have shell access now. ToT

daed commented 6 years ago

That's going to be tricky. Everything is in electron's localstorage, which you can't really manipulate (that I'm aware of) via command line. Having that been said, the information is stored in an actual file. According to https://github.com/Laverna/laverna/issues/894 it's in ~/.config/laverna in Linux.

From there, I think the notes are in IndexedDB/http_localhost.../ in a database file. The dev codebase (the one I'm developing on) has a different encryption and storage method than this one. It looks like the notes are stored in encrypted form (on my current prod Windows version) in a file called 000003.log but I'm not 100% sure on how to parse that. At any rate, you may be able to take those files and back them up at least.

Sorry I can't be of more help on this one. It doesn't help you much here, but I'm planning on trying to include a better recovery option in the newer version so situations like this arise less frequently.

ykyuen commented 6 years ago

Thanks for the detailed explanation. =D

I was running laverna locally for jotting markdown notes and since i could get the window manager up in the archlinux, i need to find a way to export all the notes before i reinstall the OS.

I saved all laverna files and i tried recovering the posts in MacOS. No luck. I could only got back some of the notes which were exported thru laverna UI a few months ago.

Luckily, after i reinstall the arch linux on my laptop, i got all the notes back by putting all the laverna files in the same path and recovering the firefox profile.

before the crash, I did try synchronizing all the files to dropbox but since it is running locally, dropbox couldn't allow the authentication.

i am not a friend of electron but i really like laverna. Looking forward to the new version. =)