Source for
git clone git://
Log | Files | Refs | README | LICENSE

commit eff73abb653dfb50546ec66d251eb41616524c28 (patch)
parent 7374c2a0ed61300e9b7190ff07f36531686a6365
Author: Alex Karle <>
Date:   Sun, 25 Apr 2021 14:55:55 -0400

jam-tuesday: Create HTML rollup of stats ("Archive")

This is really just a pretty HTML file that replaces the httpd
auto-index of the jam-tuesday directory.

Some cleanup may be in need later (piping the output to sed
is a bit ugly... likely better to teach it to emit HTML).

In general, this whole "jam-tuesday" project has had me questioning the
value of mdoc(7) for non blog-post things... I want to ensure the site
is accessible via WWW (with/without JS), Gopher (plaintext version
needed) and soon Gemini.. so it's unclear if I'd be better off moving to
a more plaintext friendly syntax (like back to markdown :/ ).

MMakefile | 8++++++--
Abin/ | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mjam-tuesday.7 | 7+++----
3 files changed, 70 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -4,6 +4,7 @@ # clean -- deletes said HTML HTML != echo index.html *.[1-9] | sed 's/\.[1-9]/.html/g' SETS != find jam-tuesday -name '[01][0-9]-*' +JAMGEN = jam-tuesday/index.html jam-tuesday/greatest-hits # Running with HIDE="" shows the full build command instead # of the abbreviated version (@ suppresses the command in make) @@ -13,11 +14,11 @@ CC = cc CFLAGS = -g -O2 -Wall -Wpedantic -Wextra .PHONY: build -build: $(HTML) atom.xml jam-tuesday/greatest-hits bin/kiosk +build: $(HTML) atom.xml $(JAMGEN) bin/kiosk .PHONY: clean clean: - rm -f $(HTML) atom.xml jam-tuesday/greatest-hits + rm -f $(HTML) atom.xml $(JAMGEN) index.html: ln -sf intro.html $@ @@ -25,6 +26,9 @@ index.html: atom.xml: blog.7 bin/ ./bin/ > $@ +jam-tuesday/index.html: $(SETS) bin/ + ./bin/ > $@ + jam-tuesday/greatest-hits: $(SETS) bin/ (date; echo; ./bin/ > $@ diff --git a/bin/ b/bin/ @@ -0,0 +1,61 @@ +#!/bin/sh +set -e +REPO=$(dirname "$(dirname "$0")") +DIR="$REPO/jam-tuesday" + +cat <<EOM +<html lang="en"> +<head> +<meta charset="utf-8"/> +<link rel="stylesheet" href="/style.css" type="text/css" media="all"/> +<style> +h1 { + font-size: 1.6em; + margin-top: 40px; +} +h2 { + font-size: 1.3em; + margin-top: 32px; + margin-bottom: 0; +} +h3 { + font-size: 1em; +} +</style> +<title>Jam Tuesday Archive</title> +<meta name="viewport" content="width=device-width,initial-scale=1"> +</head> +<body> +<h1>Jam Tuesday Archive</h1> +<p>Welcome to the archive! For more information on the project, +refer to <a href="/jam-tuesday.html">jam-tuesday(7)</a>.</p> +<h2>Stats</h2> +<hr> +EOM + +"$REPO"/bin/ | sed \ + -e 's#^$#</ul>#' \ + -e 's#.*:$#<h3>&</h3>#' \ + -e 's#^-*$#<ul>#' \ + -e 's#^ *[0-9].*#<li>&</li>#' + +cat <<EOM +</ul> +<h2>Setlists</h2> +<hr> +Updated weekly: +<ul> +EOM + +for f in "$DIR"/[01][0-9]-*; do + name=$(basename "$f") + echo "<li><a href=\"$name\">$name</a></li>" +done + +cat <<EOM +</ul> +<br><br> +<p style="font-size: 0.7em">Last Updated: $(date)</p> +</body> +</html> +EOM diff --git a/jam-tuesday.7 b/jam-tuesday.7 @@ -18,14 +18,13 @@ I realized it would be fun to start cataloging what we played. Now that I've got more than a handful logged, I thought it would be fun to share! .Pp -The setlists and some 'greatest-hits' stats are all plaintext files served up here: -.Pp -.Lk +The setlists and some 'greatest-hits' stats are all available in the +.Lk /jam-tuesday/ Jam Tuesday Archive . .Pp There are no audio recordings (at least publicly), but there's a stray note here and there to "set the scene". .Pp -The notation is hopefully pretty straightforward. +The setlist notation is hopefully pretty straightforward. Unless otherwise noted, I'm on guitar and Matt's on keys (and if only one instrument is specified, it's me switching to it).