Closed FalcoGer closed 2 years ago
Hi, Trilium doesn't really have a CLI interface, but it does have a REST API suitable for automation called ETAPI. I added a method to export a note subtree. With some trivial scripting, this should satisfy your needs.
Thank you! I shall give it a try. How long do you think will it take for the docker image to be updated?
Probably a week or two before the first beta will be released.
Describe feature
What I want:
A way to automatically export the whole database or ideally any part of it by providing a command line utility or argument.
Why I want it:
I wish to document a project in trillium and wish to make that documentation accessible in github. To do that now, I would have to open the GUI, right click my node, click through to export, select the export type and set the location for the export to be my repository. Then I would have to use git to add the changes and push them.
This approach is very manual, time consuming, error prone (you could click the wrong node and possibly leak information) and generally tedious.
A better way
It would be better if I could just write my note have a git hook that calls trillium with the path to the node I want to just update the documentation. This is fully automatic and all the features should be there except for the interface to call export without the GUI. Export already exists and you just need to pass in what you want to export, which format it should be in and where to put the export to.
Additional Information
No response