hosts_in_year.sqlite.sql: query to return all hosts contributing shows in a period (usually a year) hosts_list.tpl: `TT²` template to generate an HTML list from the output of hosts_in_year.sqlite.sql make_shownotes: trivial tidying thanks_to_hosts: Bash script to simplify the generation of the HTML which thanks a year's hosts for their contributions
18 lines
607 B
SQL
18 lines
607 B
SQL
--
|
|
-- hosts_in_year.sqlite.sql 2025-10-06
|
|
--
|
|
-- Query for use with 'query2tt2' to generate a list of hosts who contributed
|
|
-- shows in a particular year. Designed to be used with the 'hosts_list.tpl'
|
|
-- template.
|
|
-- The two '?' placeholders in the query are to be filled with 'YYYY-01-01'
|
|
-- for the start of the year and 'YYYY-12-31'. The values can be passed using
|
|
-- the '-dbargs' option to 'query2tt2'.
|
|
--
|
|
SELECT DISTINCT
|
|
printf('%04d',h.hostid) AS hostid, h.host AS hostname
|
|
FROM eps e
|
|
JOIN hosts h ON e.hostid = h.hostid
|
|
WHERE e.date BETWEEN ? AND ?
|
|
AND title != 'Reserved'
|
|
ORDER BY lower(h.host)
|