#!/bin/sh
# Creates HTML version of the wiki.
echo "making HTML"
rm -rf html
mkdir html
cp report.html html
DATE=`date +"%D"`
FILECOUNT=`ls *.md | wc -l`
FILELIST="filelist.html"
HEADER="
" >> html/$FILELIST
f2="html/${fname}.html"
echo $HEADER > $f2
cmark-gfm -e table $f | sed "s/\.md\"/.html\"/g" >> $f2
echo $FOOTER >> $f2
done
# this uses a C program to mark dead links, you can optionally remove this
gcc -O3 mark_dead_links.c -o mark_dead_links
cd html
cp ../mark_dead_links .
for f in *.html; do
cat $f | ./mark_dead_links > tmp
mv tmp $f
done
rm mark_dead_links
cd ..
# mark dead links end
echo "$HEADERGo to main page.$FOOTER" >> html/index.html
echo "