joplin-plugin-backup
joplin-plugin-backup copied to clipboard
Add option to select export format
Joplin Desktop allows you to export to multiple formats through the GUI...
~ See screenshot of Joplin export options... ~
This plugin seems to be hardcoded to only export using the "jex" option.
https://github.com/JackGruber/joplin-plugin-backup/blob/2c035a3d426785deeaacc1948a2469d0824e0c25/src/Backup.ts#L620
It would be useful to be able to export to any of the available formats:
-
jex
-
raw
-
md
-
md_frontmatter
-
html
https://github.com/laurent22/joplin/blob/5d7178783592dd7cadf1f50f87d34521e9c9753b/packages/lib/services/interop/InteropService.ts#L96
My use case for this is that I'd like to maintain a local git repo to keep a git history of my notes over time. The md_frontmatter
export option is great for this in combination with Git LFS for images and such. Markdown seems to be a much nicer format for version control compared to JEX.
My ideal flow would be to use this plugin to automatically generate markdown backups. I would then run a cron job or something to periodically commit the latest backup to git.
I'm happy to take this task on myself if you think it makes sense @JackGruber . Let me know what you think! 😃
I'm not sure I'm picking it up. But you are welcome to make a draft.
@hayzey I have the same idea of keeping a git history of my notes, and have you found a suitable solution ? or other plugin that supports exporting markdown files?
@JackGruber
i'd like to use "raw" format since the diff grain is file level.
i've tried to make a patch on my own, replacing "raw"
with "jex"
in plugins/io.github.jackgruber.backup.jpl/index.js
but it would'nt work, an error says the command exportFolders cannot be excuted for "jex" and the file
target.
any sugguestion?
raw and md with frontmatter will be included in the next release as these can be used as backupfromatand a fix in joplin for missing resources was implemented.