#!/bin/awk -f
# convert weeds files to an html page
BEGIN {
FS = "\t"
print ""
print ""
print "
Weed Garden"
print ""
print ""
print ""
print ""
print ""
print ""
print ""
}
{
timestamp = $1
title = $2
link = $3
content = $4
content_type = $5
id = $6
author = $7
enclosure = $8
category = $9
datecmd = "date -u -d \"@" timestamp "\" '+%F (%a) %R'"
datecmd | getline published
close(datecmd)
gsub(/\\t/, "\t", content)
gsub(/\\n/, "\n", content)
gsub(/\\/, "\\", content)
print ""
print "" title "
by " author "
"
print ""
print content
print ""
}
END {
print ""
print ""
}