Update
This commit is contained in:
parent
742b95ff39
commit
0156564564
7 changed files with 173 additions and 12 deletions
16
make_html.sh
16
make_html.sh
|
@ -12,16 +12,24 @@ cp report.html html
|
|||
|
||||
DATE=`date +"%D"`
|
||||
FILECOUNT=`ls *.md | wc -l`
|
||||
FILELIST="filelist.html"
|
||||
HEADER="<html><head><link rel=\"stylesheet\" href=\"style.css\"><title>LRS Wiki</title></head><body><h1>less_retarded_wiki</h1><a href=\"main.html\">main page</a>, <a class=\"notdead\" href=\"$FILELIST\">file list ($FILECOUNT)</a>, <a class=\"notdead\" href=\"https://git.coom.tech/drummyfish/less_retarded_wiki/archive/master.zip\">source</a>, <a class=\"notdead\" href="report.html">report</a>, <a class=\"notdead\" href=\"wiki_stats.html\">stats</a>, wiki last updated on $DATE<hr />"
|
||||
FILELIST="wiki_pages"
|
||||
HEADER="<html><head><link rel=\"stylesheet\" href=\"style.css\"><title>LRS Wiki</title></head><body><h1>less_retarded_wiki</h1><a href=\"main.html\">main page</a>, <a class=\"notdead\" href=\"$FILELIST.html\">file list ($FILECOUNT)</a>, <a class=\"notdead\" href=\"https://git.coom.tech/drummyfish/less_retarded_wiki/archive/master.zip\">source</a>, <a class=\"notdead\" href=\"report.html\">report</a>, <a class=\"notdead\" href=\"wiki_stats.html\">stats</a>, wiki last updated on $DATE<hr />"
|
||||
FOOTER="<hr/><p>All content available under <a class=\"notdead\" href=\"https://creativecommons.org/publicdomain/zero/1.0/\">CC0 1.0</a> (public domain). Send comments and corrections to drummyfish at disroot dot org. </p></body></html>"
|
||||
|
||||
echo "$HEADER <ul>" > html/$FILELIST
|
||||
printf "# Wiki Files\n\nThis is an autogenerated page listing all pages.\n\n" > $FILELIST.md
|
||||
|
||||
firstFile=true
|
||||
|
||||
for f in *.md; do
|
||||
fname=$(echo "$f" | sed "s/\.md//g")
|
||||
|
||||
echo "<li><a href="${fname}.html"> $fname </a></li>" >> html/$FILELIST
|
||||
if [ "$firstFile" = true ] ; then
|
||||
firstFile=false
|
||||
else
|
||||
printf " -- " >> $FILELIST.md
|
||||
fi
|
||||
|
||||
printf "**[$fname]($f)** ($(cat $f | wc -l))" >> $FILELIST.md
|
||||
|
||||
f2="html/${fname}.html"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue