#!/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, last updated on $DATE
"
FOOTER="
All content available under CC0 1.0 (public domain).
"
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
markdown $f | sed "s/\.md\"/.html\"/g" >> $f2
echo $FOOTER >> $f2
done
echo "$HEADERGo to main page.$FOOTER" >> html/index.html
echo "
$FOOTER" >> html/$FILELIST
echo "done"