From bfbccf960424b2875ae2354fa6840fc973ccd680 Mon Sep 17 00:00:00 2001
From: Case Duckworth
Date: Mon, 25 Jul 2022 11:55:54 -0500
Subject: Reorganize a few things
---
sfeed_html.awk | 123 +++++++++++++++++++++++++++++++++------------------------
1 file changed, 71 insertions(+), 52 deletions(-)
diff --git a/sfeed_html.awk b/sfeed_html.awk
index 9af5b2e..70226a7 100755
--- a/sfeed_html.awk
+++ b/sfeed_html.awk
@@ -70,53 +70,8 @@ BEGIN {
STDERR = "/dev/stderr"
}
-## Print HTML header
BEGIN {
- fortunecmd = "fortune"
- fortunecmd | getline LOGO_TITLE
- close(fortunecmd)
- sub(/"/, "", LOGO_TITLE)
- datecmd = "date -u +'" DATEFMT "'"
- datecmd | getline UPDATE_TIME
- close(datecmd)
- print ""
- print ""
- #
- print ""
- print ""
- print ""
- print ""
- print ""
- print "" TITLE ""
- print ""
- print ""
- print ""
- print ""
- print ""
- print ""
- print ""
- print ""
- #
- print ""
- # "
printf "\n"
# Feed entries
@@ -297,9 +258,67 @@ function html_escape(t)
return t
}
-function print_link(href, title, text)
+function html_top()
+{
+ # Print HTML header
+ fortunecmd = "fortune"
+ fortunecmd | getline LOGO_TITLE
+ close(fortunecmd)
+ sub(/"/, "", LOGO_TITLE)
+ datecmd = "date -u +'" DATEFMT "'"
+ datecmd | getline UPDATE_TIME
+ close(datecmd)
+ print ""
+ print ""
+ #
+ print ""
+ print ""
+ print ""
+ print ""
+ print ""
+ print "" TITLE ""
+ print ""
+ print ""
+ print ""
+ print ""
+ print ""
+ print ""
+ print ""
+ print ""
+ #
+ print ""
+ #
+ print ""
+ print "hide stale", SEPARATOR
+ print "rss", SEPARATOR
+ print "all", "(rss)", SEPARATOR
+ print "twtxt", SEPARATOR
+ print "opml"
+ print ""
+ # first part of
+ print ""
+ print "