blob: ff67fa1e81b29aed4fa2efafdc317fb26a4ae47e (
plain) (
tree)
|
|
#!/bin/rc
webroot = ./
o=./
fn gettitle{
echo `{echo $1 | sed 's/\+/ /g'}
}
while(! ~ $#* 0) {
switch ($1) {
case -w
webroot=$2
shift
case -o
o=$2
shift
case *
echo Usage: g9srv/webblog [-w webroot] [-o output dir]
exit usage
}
shift
}
posts=`{ls -pr $webroot/posts}
for(i in $posts){
awk -f /lib/gemtohtm < $webroot'/posts/'$i'' > $o'/'$i.html
}
echo '<link rel="stylesheet" href="/style.css">' > $o'/'index.html
echo '<title>fulton.software blog</title>' >> $o'/'index.html
for(i in $posts){
name=`{gettitle $i}
echo '<a href="'$i'.html">'$"name'</a> <br>' >> $o'/'index.html
}
exit 0
|