From 598addf2fe5994c8c237a853a206004163da99f0 Mon Sep 17 00:00:00 2001 From: Fulton Browne Date: Fri, 28 May 2021 03:51:46 +0000 Subject: added webblog --- webblog | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 webblog (limited to 'webblog') diff --git a/webblog b/webblog new file mode 100755 index 0000000..ff67fa1 --- /dev/null +++ b/webblog @@ -0,0 +1,35 @@ +#!/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 '' > $o'/'index.html +echo 'fulton.software blog' >> $o'/'index.html +for(i in $posts){ + name=`{gettitle $i} + echo ''$"name'
' >> $o'/'index.html +} +exit 0 -- cgit 1.4.1-2-gfad0