Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users the option to work with an arbitrary folder rather than a database #336

Open
nuttyartist opened this issue Sep 16, 2022 · 6 comments

Comments

@nuttyartist
Copy link
Owner

nuttyartist commented Sep 16, 2022

A highly requested feature that will require a lot of refactoring is to let users point at a folder with .txt files rather than using a database. This will probably not allow supporting many sophisticated features in the future such as drawing or a more complex editor like OneNote's. This is why I first want to discuss it before giving it any priority. Maybe I'm wrong on the technical front, and there's still a way to support these features.

@bjorn
Copy link
Collaborator

bjorn commented Sep 16, 2022

I think Zim is a good example of a notes app that uses plain text files. I don't personally see why it should not allow the use of a more complex editor (Zim's editor is also a rich-text editor).

Zim does not have tags, but it does store some meta-info at the start of each file, which could include tags.

@ghost
Copy link

ghost commented Sep 16, 2022

Obsidian is another example, albeit not open source, which works on plain directories and plain md files, while providing extensive editing features (including a whole engine for custom plugins, which can do all sorts of editing & rendering magic).

@WhyNotHugo
Copy link

This application seems to be exactly what I've been looking for for many years, but saving into a binary DB file really does carry too many drawbacks.

It's not possible to use simple tools like ag or fd to look through notes as one would through text files. Actually, no other existing tool can easily access notes at all. I already have lots of text files, and can't even read them via notes in a simple way either.

But the biggest issue is sync'ing across devices. I use syncthing to keep notes in sync. A conflict with text files only happens if the same not is altered on two devices. With a DB, the risk is much higher all notes are in a single file, so if any two notes are modified in two devices there's already a conflict. And conflict resolution for a binary file is pretty much a dead end, since it would require understanding the DB to even figure out how to resolve it. It's doable, but it sounds like a huge effort for a problem that can be avoided entirely.

I'd love to see support for simple text files. Things like images, drawings, etc can just be files in the same directory as the text files -- individual files, which have far less risk of sync conflicts too. Keeping backups and searching through older versions would also be a breeze. While sqlite is a standard format, it does end up being far more opaque than markdown/text files.

(Please don't take this as a complaint; I'm mostly wanting to add points in favour of the idea suggested here)

@nuttyartist
Copy link
Owner Author

nuttyartist commented Sep 17, 2022

Thanks everyone for the feedback! I include this in our roadmap! It will require us to rethink some things, and I also think that the developer that will be responsible for #317 will need to figure out exactly how to do it. I would also like to see how it will affect performance.

I already have lots of text files, and can't even read them via notes in a simple way either.

@WhyNotHugo We'll work on importing/expoting notes from/to .txt, see: #316

@nuttyartist nuttyartist added this to To do in Version 3.0.0 via automation Feb 28, 2023
@nuttyartist nuttyartist added this to the Version 3.0.0 milestone Mar 9, 2023
@Dialga
Copy link

Dialga commented Sep 2, 2023

Just my 2c on the syncing notes and conflict resolution on a database file:
There exists a conflict-free replicated data type library for sqlite: https://github.com/vlcn-io/cr-sqlite.

@nuttyartist
Copy link
Owner Author

nuttyartist commented Sep 2, 2023

@Dialga Thanks for the tip! Tho I hope that in the next version we'll already switch to an arbitrary folder. And if not then, it should be relatively soon after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

4 participants