commit 3e46abd2c6e966d09d6c855ec055cb1edaeeddc5 parent 1d4690cfa75fcfdbc429efa9322c004bd251280e Author: Alex Balgavy <a.balgavy@gmail.com> Date: Wed, 5 Feb 2020 22:03:30 +0100 Script to reorganize joplin's exported HTML files HTML export at the moment isn't perfect, this scripts fixes a few things. Former-commit-id: bc58fbfd0562f5ba1ce5b2bd0363d966d91dee9a Diffstat:
A | scripts/joplin-html-fix | | | 17 | +++++++++++++++++ |
1 file changed, 17 insertions(+), 0 deletions(-)
diff --git a/scripts/joplin-html-fix b/scripts/joplin-html-fix @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +read -rp "Execute cleanup in $(pwd)?" -n 1 -s conf +case "$conf" in + Y|y) + ;; + *) + echo "OK nothing happens" + exit 1 + ;; +esac + +set -x +sed -i 's:\.\./_resources:\./_resources:g' *.html +mv * ../ +cd .. +find . -type d -empty -depth -delete +