dullage / flatnotes

A self-hosted, database-less note taking web app that utilises a flat folder of markdown files for storage.
MIT License
1.39k stars 82 forks source link

Idea git (etc.) support as a storage backend #221

Open clach04 opened 2 months ago

clach04 commented 2 months ago

Using any SCM, like git, hg, etc. would allow some versioning support.

From comment https://github.com/dullage/flatnotes/pull/190#issuecomment-2162303208

... The repo is laid out in a way which could (in the future) support different backends for note storage, attachment storage and authentication. For note storage, currently, the only option is file_system but this may change in the future ....

https://github.com/dullage/flatnotes/pull/190 is an implementation of hooks to allow background support for Git BUT this won't deal with things like merge conflicts that need user intervention (hooks could add some wrappers to do something about this).

If there was git support, a merge could be requested which the end user could then manually resolve. Hopefully most of the time merge conflicts won't occur :-) 🤞

There is a fork of Dulwhich (PyRotter) that does have merge support https://github.com/jelmer/dulwich/issues/754

Definitely not a small project! ;-) But would allow decent synchronization support as well as history/revision support.