This commit is contained in:
Miloslav Ciz 2023-08-14 20:16:37 +02:00
parent 45bd7c47c0
commit 8c19875748

View file

@ -8,9 +8,10 @@ mkdir html
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 href=\"$FILELIST\">file list</a>, <a href=\"lrs_wiki_full.html\">single page HTML</a>, <a href="https://repo.or.cz/less_retarded_wiki.git/snapshot/HEAD.tar.gz">source</a>, <a href="report.html">report</a>, wiki 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). Send comments and corrections to drummyfish at disroot dot org. </p></body></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=\"lrs_wiki_full.html\">single page HTML</a>, <a class=\"notdead\" href=\"https://repo.or.cz/less_retarded_wiki.git/snapshot/HEAD.tar.gz\">source</a>, <a class=\"notdead\" href="report.html">report</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
@ -26,6 +27,20 @@ for f in *.md; do
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 "$HEADER<a href="main.html">Go to main page.</a>$FOOTER" >> html/index.html
echo "</ul> $FOOTER" >> html/$FILELIST