summaryrefslogtreecommitdiffstats
path: root/scripts/prep-manual.sh
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-02 11:57:20 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-02 14:24:10 -0700
commite9e72fa237c3532adf01e535614cd78c8005b3eb (patch)
treeaccf3c568404ac296fd5519cc511287e0ffba688 /scripts/prep-manual.sh
parentf16738c3a1009c21aadd79f26d2dc6c69b20f99b (diff)
downloadsubsurface-e9e72fa237c3532adf01e535614cd78c8005b3eb.tar.gz
add random helper scripts
These are all kinda weird but I use them when creating releases, so it seems to make sense to add them to the repo. I don't think they are useful to anyone but me, but in the event someone else takes over, they might be a useful starting point. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/prep-manual.sh')
-rwxr-xr-xscripts/prep-manual.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/prep-manual.sh b/scripts/prep-manual.sh
new file mode 100755
index 000000000..130d2d736
--- /dev/null
+++ b/scripts/prep-manual.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+cat $1 | \
+ sed -e '1,/title/d;/<\/head>/,/<body/d;/<\/body/,/<\/html/d' | \
+ sed -e '/^@media/,/^}/d' | \
+ sed -e 's/src="images/src="\/images/g' | \
+ sed -e 's/src="mobile-images/src="\/mobile-images/g' | \
+ html-minifier --collapse-whitespace --keep-closing-slash --minify-js --minify-css > $1.wp