From 7bffb9e0da2bc196061a4559449d9f6d877886bf Mon Sep 17 00:00:00 2001
From: Case Duckworth
Date: Sat, 13 Aug 2022 22:50:17 -0500
Subject: Add weeds generation
---
sfeed_weed.awk | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100755 sfeed_weed.awk
(limited to 'sfeed_weed.awk')
diff --git a/sfeed_weed.awk b/sfeed_weed.awk
new file mode 100755
index 0000000..182aadf
--- /dev/null
+++ b/sfeed_weed.awk
@@ -0,0 +1,44 @@
+#!/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 ""
+}
+
--
cgit 1.4.1-21-gabe81