longform icon indicating copy to clipboard operation
longform copied to clipboard

FR: Store session data separately from config data

Open chrisgrieser opened this issue 2 years ago • 3 comments

right now, both are stored in data.json. However, it would be useful to store them separately, so that the session data could be gitignored, while the config data can be kept.

chrisgrieser avatar Aug 19 '22 06:08 chrisgrieser

Interesting. I might add a setting to let people choose between storing them in the plugin folder or in the vault—I don't fully trust the plugin folder for sync, to be honest.

kevboh avatar Aug 19 '22 13:08 kevboh

+1 on this. The main problem I'm finding is the test key, which I'm not sure if that is meant to be in the production build? Seems like dev logging to me but I've only skimmed the codebase. But since it changes frequently, it makes pulling the latest from git awkward.

washingtonsteven avatar Oct 16 '22 22:10 washingtonsteven

Oh whoops that's totally some debugging that slipped in. I'll remove it, but I also want to implement this.

kevboh avatar Oct 20 '22 14:10 kevboh

Test entry removed in 5fce39c0972248ee6eac86c9835421afcde8e7c9, looking at the larger feature next.

kevboh avatar Oct 23 '22 12:10 kevboh

This will be available in the next beta. Added the option to store to a hardcoded path in the plugin folder or an arbitrary json file in your vault.

kevboh avatar Oct 23 '22 16:10 kevboh

Just re-upped the beta. Hopefully the last one before a general release. You'll have to remove and reinstall via BRAT to test.

kevboh avatar Oct 23 '22 17:10 kevboh

can confirm that it works.

For anyone finding this issue via search: After enabling the separation of session and config data in the settings, you can add this to your gitignore:

.obsidian/plugins/longform/sessions.json

chrisgrieser avatar Oct 30 '22 12:10 chrisgrieser