Update
[less_retarded_wiki.git] / make_html_single.sh
blob3cf63ab9ca972072ebda46993f2824e343d22865
1 #!/bin/sh
2 # Creates a single HTML version of the wiki.
4 echo "making single HTML"
6 DATE=`date +"%D"`
8 echo "<html><head><link rel=\"stylesheet\" href=\"style.css\"><title>LRS Wiki</title></head><body><h1>less_retarded_wiki</h1><p>by drummyfish, generated on $DATE, available under <a href=\"https://creativecommons.org/publicdomain/zero/1.0/\">CC0 1.0</a> (public domain) </p><hr />" > lrs_wiki.html
10 echo "$HEADER <ul>" > html/$FILELIST
12 for f in `ls *.md | sort`; do
13 echo "processing $f"
14 fname=$(echo "$f" | sed "s/\.md//g")
16 echo "<span class=\"article\" id=\"$fname\">$fname</span><br />" >> lrs_wiki.html
18 cmark-gfm -e table $f | sed "s/\.md\"/\"/g" | sed "s/ href=\"/ href=\"#/g" >> lrs_wiki.html
20 echo "<hr />" >> lrs_wiki.html
21 done
23 echo "</body></html>" >> lrs_wiki.html
25 echo "done"