I would like to set up regular export job. I want to export certain notebooks to certain filesystem folders as markdown with attachments (they will be in the same folder undr a subfolder hopefully). I am wondering how I can do this with the Joplin CLI client.
For this I'd recommend
joplin export --format md_frontmatter /path/to/folder as that will export everything including attachments and most of the metadata (as a frontmatter header).
If you want to automatically backup and version your notes you can use a cron script like this:
$JOPLIN_BIN e2ee decrypt
rm -f *.md
rm -f resources/*
$JOPLIN_BIN --log-level debug export --format raw "$BACKUP_DIR"
git add .
git commit -m "Update"
Thanks for the solution, I think this will work for me. How do I export only a notebook or a subnotebook under another one?
I forgot if that can be done. But all the help is there if you type
joplin help export
The commands are in the terminal docs and also in
joplin help export
Exports Joplin data to the given path. By default, it will export the
complete database including notebooks, notes, tags and resources.
--format <format> Destination format: jex (Joplin Export File), raw
(Joplin Export Directory), json (Json Export
Directory), md (Markdown), html (HTML File), html
--note <note> Exports only the given note.
--notebook <notebook> Exports only the given notebook.
One issue is if you have notebooks of the same name so if you do you may want to use the internal id in place of the notebook name which you can get from
joplin ls / -l
So instead of
joplin export ~/jopexport --format md_frontmatter --notebook books you might use
joplin export ~/jopexport --format md_frontmatter --notebook 86f1c
Thanks, that isa greeat tip. It looks like what I need to do is totally possible in Joplin.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.