Cherrytree: Feature: Split file instead of single file for easier version tracking

Created on 16 Jun 2020  路  7Comments  路  Source: giuspen/cherrytree

Would it be possible to make CherryTree store notes in a directory of text files instead of one single xml or sqlite file? The reason for this would be for in case a user wants to use git or some other version control system with their notes. Having everything in one file makes it version tracking more tedious if you want to commit some changes but are not ready to commit others.

enhancement

Most helpful comment

Cherrytree was born as a single file note taking, in fact also for the second database like storage I chose SQLite. I'm not excluding than in future we'll make an attempt to support a different storage, in particular to support concurrent edit which is more and more requested, but now is definitely not the time to do such huge change that would certainly bring instability while we want to prepare the version 1.0 instead.

All 7 comments

For sqlite this is impossible due to its nature (and git doesnt like binary files anyway). For XML however this could very much be possible, I have actually been thinking that it would be nice if cherrytree could store images separately (instead of b64 encoding them into the source) which would be possible with this.

Another option could be a whole separate storage type but to preserve rich text cherrytree does need some form of markup.

I quite like the idea of having HTML as a storage option, with it being loaded to cherrytree xml on demand (which would be much easier for people to edit external to cherrytree)

Thinking about it more, what if cherrytree could open arbitrary directories of files as a tree. Some things such as html could be recognised and node syntax highlighting (language) could be set based on extensions.

I think this would greatly improve the utility of cherrytree, especially since alternatives to things like cherrytree are usually a hierarchy of markdown files. It would likely be a lot of work though.

Cherrytree was born as a single file note taking, in fact also for the second database like storage I chose SQLite. I'm not excluding than in future we'll make an attempt to support a different storage, in particular to support concurrent edit which is more and more requested, but now is definitely not the time to do such huge change that would certainly bring instability while we want to prepare the version 1.0 instead.

Yeah I agree it would be a pretty massive change, just throwing ideas around

I second this as really neat idea for future (especially for pictures) the thing is I'm using nextcloud (and syncthing in the past) and with some rather large notebooks it always transferred some 40+MB on every file save to all my 4 clients (file had like 11MB + 3 x backup) ... I exported images to have them separate and went to 1 backup since nextcloud has history anyway and now I'm on 2MB with my largest book which is much better, but syncing few KB instead of 4MB (file + backup) is still definitely better :)

@mahdi1234 Yeah images can get pretty massive, saving space both in the database/xml file but also just in general would be an advantage of this, because cherrytree b64 encodes images to store them with encoded text and bytes -> base64 is ~30% larger. Which can be a pretty massive difference when dealing with images and multiple backups

As completely redoing the storage is an understandably large undertaking, I agree that just storing attachments externally could be a more feasible happy medium. So the data would be a single database (sqlite or xml), and a folder of attachments. That should make a huge difference when syncing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philogit picture philogit  路  8Comments

casainho picture casainho  路  7Comments

kharaktur picture kharaktur  路  9Comments

bhutch picture bhutch  路  6Comments

valentinbesse picture valentinbesse  路  8Comments