https://github.com/corona6/joplinclean
curl -O https://gist.githubusercontent.com/corona6/509264be060015d293c8d292e4637a72/raw/joplin_clean_up.sh
chmod +x joplin_clean_up.sh
Usage:
./joplin_clean_up.sh [-frtyh] path
Examples:
# delete image or file that not used in the note
./joplin_clean_up.sh /path/to/synchronise/directory
# delete the history (revisions) of the note which are already deleted
./joplin_clean_up.sh -r /path/to/synchronise/directory
# delete the tags that not link to any notes
./joplin_clean_up.sh -t /path/to/synchronise/directory
Options:
-f, --force Delete unused resources even if it's in the revision
-r, --revision Delete unused revisions
-t, --tag Delete unused tags
-y, --yes Automatic yes to all prompts
-h, --help Print this help
./joplin_clean_up.sh /Users/corona6/joplin
@heartnn I added the usage of this. It can use for local file synchronisation. This script needs local file directory path at the argument.