A Python utility that exports and backup notes as Markdown format in Joplin to a Cloud Storage bucket of Google Cloud.
The utility changes the markdown notes. Specifically, two things are changed:
- the local links to images and other resources are changed because of how Joplin stores the resources internally.
For example, if you insert an image
test.png
to a note in Joplin, then Joplin would create a link
within your notes.
This script modify the link to remove:/
such that the notes can be used within any local filesystem. - the spaces within the filename are changed to underscores
Therefore, the notes exported by this utility cannot be re-imported to Joplin.
If you want to backup the notes but re-import them to Joplin, use the built-in backup or export functions instead.
- In Joplin, open Tools -> Options -> Web Clipper
- Click "Enable Web Clipper Service"
- Click "Copy Token" to get the Joplin API token
- create
cred.py
in the cloned repository, its content should look like:
JOPLIN_TOKEN = "<the API token that you copied>"
- run
py main.py <name of the notebook that you want to backup>
For example, if we want to backup all notes within the notebook "Testing Testing", then run:
py main.py "Testing Testing"
(remember the quotes)
The utility creates a folder with the name same as the name of the notebook.
Inside the folder, all the notes and the resources (e.g., images) within the notes are exported to the folder.
- rewrite the utility as a Joplin plugin
- rewrite the utility to backup the whole Joplin