Open nuttyartist opened 2 years ago
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.
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).
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)
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: https://github.com/nuttyartist/notes/issues/316
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.
@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.
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.