Update the scipt
This commit is contained in:
parent
715b14e829
commit
5ad216c879
1 changed files with 19 additions and 5 deletions
24
make_html.sh
24
make_html.sh
|
@ -5,14 +5,28 @@ echo "making HTML"
|
||||||
rm -rf html
|
rm -rf html
|
||||||
mkdir html
|
mkdir html
|
||||||
|
|
||||||
for f in *.md; do
|
DATE=`date +"%D"`
|
||||||
f2=$(echo "html/$f" | sed "s/\.md/.html/g")
|
FILELIST="filelist.html"
|
||||||
|
HEADER="<html><head><title>LRS Wiki</title></head><body><h1>less_retarded_wiki</h1><a href=\"main.html\">main page</a>, <a href=\"$FILELIST\">file list</a>, last updated on $DATE<hr />"
|
||||||
|
FOOTER="<hr/><p>All content available under <a href=\"https://creativecommons.org/publicdomain/zero/1.0/\">CC0 1.0</a> (public domain).</p></body></html>"
|
||||||
|
|
||||||
echo "<html><head><title>LRS Wiki</title></head><body><h1>based_wiki</h1><a href=\"main.html\">main page</a><hr />" > $f2
|
echo "$HEADER <ul>" > html/$FILELIST
|
||||||
|
|
||||||
|
for f in *.md; do
|
||||||
|
fname=$(echo "$f" | sed "s/\.md//g")
|
||||||
|
|
||||||
|
echo "<li><a href="${fname}.html"> $fname </a></li>" >> html/$FILELIST
|
||||||
|
|
||||||
|
f2="html/${fname}.html"
|
||||||
|
|
||||||
|
echo $HEADER > $f2
|
||||||
markdown $f | sed "s/\.md\"/.html\"/g" >> $f2
|
markdown $f | sed "s/\.md\"/.html\"/g" >> $f2
|
||||||
echo "<hr/><p>All content available under <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0</a> (public domain).</p></body></html>" >> $f2
|
echo $FOOTER >> $f2
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "<html><head></head><body><a href="main.html">Go to main page.</a></body></html>" >> html/index.html
|
echo "$HEADER<a href="main.html">Go to main page.</a>$FOOTER" >> html/index.html
|
||||||
|
|
||||||
|
echo "</ul> $FOOTER" >> html/$FILELIST
|
||||||
|
|
||||||
|
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
Loading…
Reference in a new issue