diff options
| -rwxr-xr-x | buetow.org.sh | 31 | ||||
| -rw-r--r-- | content/gemtext/gemfeed/atom.xml | 2 | ||||
| -rw-r--r-- | content/gemtext/gemfeed/index.gmi | 12 | ||||
| -rw-r--r-- | content/html/gemfeed/atom.xml | 2 | ||||
| -rw-r--r-- | content/html/gemfeed/index.html | 32 | ||||
| -rw-r--r-- | content/meta/gemfeed/index.meta | 5 |
6 files changed, 80 insertions, 4 deletions
diff --git a/buetow.org.sh b/buetow.org.sh index c9b3c75e..d0d8b5c5 100755 --- a/buetow.org.sh +++ b/buetow.org.sh @@ -23,6 +23,33 @@ ERROR echo "Assert OK: $expected" } +## Gemfeed module + +# This generates a index.gmi in the ./gemfeed subdir. +gemfeed::generate () { + local -r gemfeed_dir="$CONTENT_DIR/gemtext/gemfeed" + +cat <<GEMFEED > "$gemfeed_dir/index.gmi.tmp" +# $DOMAIN's Gemfeed + +## $SUBTITLE + +GEMFEED + + ls "$gemfeed_dir" | grep '\.gmi$' | grep -v '^index.gmi$' | sort -r | + while read gmi_file; do + # Extract first heading as post title. + local title=$(sed -n '/^# / { s/# //; p; q; }' "$gemfeed_dir/$gmi_file" | tr '"' "'") + # Extract the date from the file name. + local filename_date=$(basename "$gemfeed_dir/$gmi_file" | cut -d- -f1,2,3) + + echo "=> ./$gmi_file $filename_date $title" >> "$gemfeed_dir/index.gmi.tmp" + done + + mv "$gemfeed_dir/index.gmi.tmp" "$gemfeed_dir/index.gmi" + git add "$gemfeed_dir/index.gmi" +} + ## Atom module atom::meta () { @@ -88,7 +115,7 @@ ATOMHEADER </author> </entry> ATOMENTRY - done < <(ls "$gemfeed_dir" | sort -r | grep '.gmi$' | head -n $ATOM_MAX_ENTRIES) + done < <(ls "$gemfeed_dir" | sort -r | grep '.gmi$' | grep -v '^index.gmi$' | head -n $ATOM_MAX_ENTRIES) cat <<ATOMFOOTER >> "$atom_file.tmp" </feed> @@ -321,9 +348,9 @@ case $ARG in ;; --publish) html::test + gemfeed::generate atom::generate html::generate - # git commit -a ;; --help|*) main::help diff --git a/content/gemtext/gemfeed/atom.xml b/content/gemtext/gemfeed/atom.xml index 10049994..557cf790 100644 --- a/content/gemtext/gemfeed/atom.xml +++ b/content/gemtext/gemfeed/atom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> - <updated>2021-05-05T12:48:29+01:00</updated> + <updated>2021-05-05T13:00:59+01:00</updated> <title>buetow.org feed</title> <subtitle>Having fun with computers!</subtitle> <link href="gemini://buetow.org/gemfeed/atom.xml" rel="self" /> diff --git a/content/gemtext/gemfeed/index.gmi b/content/gemtext/gemfeed/index.gmi new file mode 100644 index 00000000..1fe0e7e3 --- /dev/null +++ b/content/gemtext/gemfeed/index.gmi @@ -0,0 +1,12 @@ +# buetow.org's Gemfeed + +## Having fun with computers! + +=> ./2021-04-24-welcome-to-the-geminispace.gmi 2021-04-24 Welcome to the Geminispace +=> ./2021-04-22-dtail-the-distributed-log-tail-program.gmi 2021-04-22 DTail - The distributed log tail program +=> ./2016-11-20-methods-in-c.gmi 2016-11-20 Methods in C +=> ./2016-05-22-spinning-up-my-own-authoritative-dns-servers.gmi 2016-05-22 Spinning up my own authoritative DNS servers +=> ./2016-04-16-offsite-backup-with-zfs-part2.gmi 2016-04-16 Offsite backup with ZFS (Part 2) +=> ./2016-04-03-offsite-backup-with-zfs.gmi 2016-04-03 Offsite backup with ZFS +=> ./2010-05-09-the-fype-programming-language.gmi 2010-05-09 The Fype Programming Language +=> ./2008-06-26-perl-poetry.gmi 2008-06-26 Perl Poetry diff --git a/content/html/gemfeed/atom.xml b/content/html/gemfeed/atom.xml index f9b5cf5b..905ebb2e 100644 --- a/content/html/gemfeed/atom.xml +++ b/content/html/gemfeed/atom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> - <updated>2021-05-05T12:48:29+01:00</updated> + <updated>2021-05-05T13:00:59+01:00</updated> <title>buetow.org feed</title> <subtitle>Having fun with computers!</subtitle> <link href="https://buetow.org/gemfeed/atom.xml" rel="self" /> diff --git a/content/html/gemfeed/index.html b/content/html/gemfeed/index.html new file mode 100644 index 00000000..2ff9e052 --- /dev/null +++ b/content/html/gemfeed/index.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<title>Having fun with computers!</title> +<meta charset='utf-8'> +<link rel="shortcut icon" type="image/gif" href="/favicon.ico" /> +<style> +body { background-color: #282c34; color: #dfdfdf; margin: auto; max-width: 900px; } +img { display: block; max-width: 70%;} +pre { color: #ecbe7b; } +blockquote { color: #ecbe7b; } +a { color: #c678dd; text-decoration: none; } +a.textlink:before { content: " > "; padding-left: 2px; } +a:hover { color: #51afef; text-decoration: underline; } +h1 { color: #ff6c6b; } +h2, h3, h4, h5, h6 { color: #51afef; } +li { color: #98be65; } +</style> +</head> +<body> +<h1>buetow.org's Gemfeed</h1> +<h2>Having fun with computers!</h2> +<a class="textlink" href="./2021-04-24-welcome-to-the-geminispace.html">2021-04-24 Welcome to the Geminispace</a><br /> +<a class="textlink" href="./2021-04-22-dtail-the-distributed-log-tail-program.html">2021-04-22 DTail - The distributed log tail program</a><br /> +<a class="textlink" href="./2016-11-20-methods-in-c.html">2016-11-20 Methods in C</a><br /> +<a class="textlink" href="./2016-05-22-spinning-up-my-own-authoritative-dns-servers.html">2016-05-22 Spinning up my own authoritative DNS servers</a><br /> +<a class="textlink" href="./2016-04-16-offsite-backup-with-zfs-part2.html">2016-04-16 Offsite backup with ZFS (Part 2)</a><br /> +<a class="textlink" href="./2016-04-03-offsite-backup-with-zfs.html">2016-04-03 Offsite backup with ZFS</a><br /> +<a class="textlink" href="./2010-05-09-the-fype-programming-language.html">2010-05-09 The Fype Programming Language</a><br /> +<a class="textlink" href="./2008-06-26-perl-poetry.html">2008-06-26 Perl Poetry</a><br /> +</body> +</html> diff --git a/content/meta/gemfeed/index.meta b/content/meta/gemfeed/index.meta new file mode 100644 index 00000000..b5e56cc9 --- /dev/null +++ b/content/meta/gemfeed/index.meta @@ -0,0 +1,5 @@ +local meta_date="" +local meta_author="Paul Buetow" +local meta_email="comments@mx.buetow.org" +local meta_title="buetow.org's Gemfeed - Having fun with computers!" +local meta_summary=". .....to read on please visit my site." |
