I am able to export notes but in a single file. It would be great if notes can be exported in the exact same directory structure or sync notes as we go into the directories. This would help the user to store their notes in Git/SCM and share it with others.
Otherwise, a post-export hook would also do the work since the user can decide what needs to be done after export is finished.
Hello,
I understand why you'd want to store your notes in SCM / Dropbox, but apart from the simplest cases it will just not work. Several things in trilium (clones, links/relations, attributes) are not representable by the filesystem and have to be stored inside big metadata file. Some discussion on why Trilium intentionally does not use file system is in FAQ.
Thanks for your response. I understand why export to flat files doesn't make sense here. How about allowing the user to perform a post export hook? User can save a particular command in the hook section and trilium will automatically run the command once the export is done.
In my case, I have a shell script which extracts the tar file and do some post-processing to make the files ready for my SCM. I have to do the export and then run the script manually. It would be great if trilium can handle the command execution after the export.
Hope this makes sense.
Several things in trilium (clones, links/relations, attributes) are not representable by the filesystem
This is understandable. Would it be possible to create a lossy export/lossless import? As long as my imports from markdown (directory + files) work, I can stop managing two different note systems.
Similarly, if I can export in a lossy directory + files, it's ok (as long as the export function cautions the user about the pitfalls).
Some acceptable compromise IMO are:
The export (and import) can be made better over-time ofc, but does this sound like a good idea? I mostly just read the FAQ and checked how git manages softlinks and hardlinks, attributes, etc.
@kunaltyagi you can already export to .tar file (with notes in markdown) and it works similarly to how you describe. Lossy things (attributes, real note name) are saved in a sidecar metadata file so it is actually lossless when imported back to trilium (and lossy when used by some other app).
Oh, thanks for that. :)
Most helpful comment
@kunaltyagi you can already export to .tar file (with notes in markdown) and it works similarly to how you describe. Lossy things (attributes, real note name) are saved in a sidecar metadata file so it is actually lossless when imported back to trilium (and lossy when used by some other app).