#!/bin/sh
# Creates HTML version of the wiki.
echo "making HTML"
rm -rf html
mkdir html
DATE=`date +"%D"`
FILELIST="filelist.html"
HEADER="
LRS Wikiless_retarded_wiki
main page, file list, source, last updated on $DATE
"
FOOTER="
All content available under CC0 1.0 (public domain). Send comments and corrections to drummyfish at disroot dot org.
"
echo "$HEADER " > html/$FILELIST
for f in *.md; do
fname=$(echo "$f" | sed "s/\.md//g")
echo "- $fname
" >> html/$FILELIST
f2="html/${fname}.html"
echo $HEADER > $f2
cmark-gfm -e table $f | sed "s/\.md\"/.html\"/g" >> $f2
echo $FOOTER >> $f2
done
echo "$HEADERGo to main page.$FOOTER" >> html/index.html
echo "
$FOOTER" >> html/$FILELIST
cp style.css html/
echo "done"