main genwiki.sh
 1#!/bin/sh
 2
 3ba=0
 4
 5printf '<h2>this is the wiki.</h2>'
 6echo "<p>where chld writes about interesting things.</p><br>"
 7
 8#echo "<div style='margin-left: 40px; margin-right:500px; font-family: monospace;'>"
 9for i in wiki/*.html; do
10	grep -q '<!-- THISISABLOG -->' $i || continue
11	echo "> "
12	echo "<a href=$i>"
13	echo $i|sed 's#wiki/##g'|sed 's/.html//g'|sed 's/_/ /g'
14	printf "</a><span style='float:right;'>"
15	stat -c '%y' $i |sed 's/ /_/g'|sed 's#\_.*##'|sed 's/-/./g'
16	echo "</span><br><sup>"
17	sed -n '2p;3q' $i|sed 's/<p>//'|sed 's#</p>##'|sed 's/\<p>//'|tr -d '<'
18	echo "</sup><br><br>"
19done
20#echo "</div>"
21
22echo "<title>wiki</title>"