summaryrefslogtreecommitdiff
path: root/convert.sh
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-07-03 18:50:10 +0300
committereug-vs <eug-vs@keemail.me>2021-07-03 18:50:10 +0300
commitc7b1e1f147784284596df8f81896f2deead8eb61 (patch)
tree4f08c392a19203f4f0cd22c4dc586f73efa4ce99 /convert.sh
parente0c6ef2e6bc55fb9019fd090c544f22e46cf90ad (diff)
downloadeug-vs-xyz-c7b1e1f147784284596df8f81896f2deead8eb61.tar.gz
chore: add emoji substitute script
Diffstat (limited to 'convert.sh')
-rwxr-xr-xconvert.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/convert.sh b/convert.sh
index fdf78e5..edb8724 100755
--- a/convert.sh
+++ b/convert.sh
@@ -1,5 +1,12 @@
#!/bin/sh
echo Writing to ${1%.*}.html
+
+if [ -z "${2}" ]; then
+ SEDSTRING=$(./compile_emoji_sedstring.sh)
+else
+ SEDSTRING=$2
+fi
+
cat "$1" \
- | sed 's/.md)/.html)/g' \
- | pandoc -s --from=gfm --to=html -c /style.css -B header.html -H icon.html -M pagetitle="Eugene's Space" --shift-heading-level-by=1 > ${1%.*}.html
+ | sed "s/.md)/.html)/g; $SEDSTRING" \
+ | pandoc -s --from=gfm+emoji --to=html -c /style.css -B header.html -H icon.html -M pagetitle="Eugene's Space" --shift-heading-level-by=1 > ${1%.*}.html