From 087c7155a1441dbe5b132314cbd9a3209752d9c5 Mon Sep 17 00:00:00 2001 From: xfnw Date: Fri, 31 Jul 2020 14:12:36 +0000 Subject: [PATCH] xfss --- .gitignore | 3 +++ template/page.html | 17 +++++++++++++++++ template/style.css | 1 + xfss | 19 +++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 .gitignore create mode 100644 template/page.html create mode 120000 template/style.css create mode 100644 xfss diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fbc4e15 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +src +src/ +src/* diff --git a/template/page.html b/template/page.html new file mode 100644 index 0000000..610feb4 --- /dev/null +++ b/template/page.html @@ -0,0 +1,17 @@ + + + + + XFSSTITLE + + + + + + + + + + + diff --git a/template/style.css b/template/style.css new file mode 120000 index 0000000..aefc320 --- /dev/null +++ b/template/style.css @@ -0,0 +1 @@ +../../lickhack-css/lickhack.css \ No newline at end of file diff --git a/xfss b/xfss new file mode 100644 index 0000000..9e6b847 --- /dev/null +++ b/xfss @@ -0,0 +1,19 @@ +#!/bin/bash + +BOOPTMP=$(mktemp) + +for fn in $(ls src); do +NEWF=${fn%??}html +TITLE=$(echo ${fn%???} | sed 's/_/ /g' | sed -e 's/[]$.*[\^]/\\&/g') +echo "rendering $NEWF..." + +cmark $BOOPTMP +cp template/page.html $NEWF + +sed "//r $BOOPTMP" template/page.html > $NEWF + +sed -i "s/XFSSTITLE/$TITLE/" $NEWF + +done + +