orgzly-revived / orgzly-android-revived

Outliner for taking notes and managing to-do lists
https://www.orgzlyrevived.com
GNU General Public License v3.0
594 stars 38 forks source link

Import/export app settings #128

Open DomeDrake opened 8 months ago

DomeDrake commented 8 months ago

I would love to see this feature added. Not only would it greatly enhance the ease of setup of Orgzly R on a new phone, it would also give great peace of mind knowing one has not forgotten to write down anything when documenting ones own settings.

Thank you for all the work! :)

For the sake of completeness: This has been suggested for the original App orgzly/orgzly-android #156 by @mjf, too.

stfl commented 7 months ago

Would be nice to load config from a file within the repo. Or possible export/import to a file like with searches

amberin commented 7 months ago

Yes, I believe we should add an option to store all settings in a hidden file or dir in a repo. Either in a single JSON/TOML/YAML file, or in a .orgzlysettings directory with multiple files. (Alternatively in a special type of org notebook, but then we'd probably have to write lots of parsing code.)

This should be a big UX improvement when it comes to saving search queries and any other settings.

The configuration scheme would probably need to be versioned to allow improvements without breaking stuff.

I'm thinking there would be a new section somewhere in settings, where the user can choose which settings they want to store in the repo, if any. Or maybe that's over-engineering things, and we should start with a simple toggle: either store all settings in the file, or none? I guess it depends on whether we read and write to/from the file continually, or only upon a user import/export action.

I suppose it would be useless (or risky) to store configured repos in this file, even though we do support multiple repos, and the file would only go into one of them.

Currently, Git repos support an .orgzlyignore file. This should probably be supported by all repos (as a general solution to things like #147), and moved to this solution, if implemented.

DanielKonopka commented 7 months ago

Why not simply allow for importing & exporting of the entire /data/data/com.orgzlyrevived/databases/orgzly.db SQLite file?

amberin commented 7 months ago

Why not simply allow for importing & exporting of the entire /data/data/com.orgzlyrevived/databases/orgzly.db SQLite file?

Sure, that's possible, but a text file would be much more portable.

I also think a major benefit of storing settings in a text file in the repo is that it would allow continuous backup of settings, so that setting up a new device is always really easy, without relying on a manual export having been done.

Ypot commented 6 months ago

A headline in any of the orgzly notebooks would do it?

Like: ** Orgzly revived settings ...

amberin commented 6 months ago

Yes, that is definitely worth looking into. We already have the ability to parse and write org files, but not other file types, so an ORG-based solution may very well require less new code. And perhaps org note properties could be one solution for storing key value pairs.

v-Nyo commented 1 month ago

Honestly this is a crucial feature in my opinion. If you have many phones and/or many user profiles this quickly becomes a pain otherwise.

I think the best solution would be a portable file in the org dir AND an option to manually import/export.

amberin commented 1 month ago

I believe we should start with a manual export/import feature, and then build on that later. Continuously syncing to a repo file is probably a bit more involved, since it involves changes and conflicts.