An entry for the TPAC 2025 hackathon.
This is a (slightly modified snapshot of) the system that builds the TPAC schedule page. It includes programs (in Bash and Awk) to retrieve events from the W3C group calendar, convert the events from iCalendar to HTML fragments, sort them and put them in an HTML page. The page provides both a list view and a grid view (by means of CSS) and the list views can be sorted in different ways (with JavaScript). The result is schedule.html
In other words: a nightmare :-) But several people manage to use the build system nevertheless.
Note: The files here are not maintained.
There is detailed documentation in the different scripts. Here is a high-level overview of what each script does.
This is a Bash script. (The .cron extension indicates that is primarily meant to be run as a cron job, but it can be run manually, too.) It's tasks are:
-
Retrieve the calendar of TPAC events from the W3C group calendar. That calendar is an iCalendar (.ics) file.
-
Call ics-to-html.awk to process the calendar events and update the existing HTML with them.
-
Commit the result to CVS. (But that part is commented out in this version, because we're not under CVS here.)
This is an Awk program that reads an iCalendar file, an HTML file and possibly other files with extra events or extra information about events. (In this repository, the extra-events.ics is empty and there are no additional files with information.)
It outputs the HTML file it read, with any parts between certain comments
(<!--begin-include...--> and <!--end-include...-->)
replaced by the calender entries converted to HTML. The comments indicates a
time range from which events should be inserted there.
The program also transforms times to the desired time zone (as indicated in the HTML file) and sorts the events either by name, by location or by time (also as indicated in the HTML, or using a default).
An Awk module used by the ics-to-html.awk. It contains functions to parse MarkDown (because there is MarkDown in the events in the W3C group calendar).
This is an Awk module. It only contains a long list of all HTML character entities.
This is an HTML file. It contains a complete page, except that there
are pairs of comments (<!--begin-include...--> and
<!--end-include...-->) as explained above, where events should
be inserted.
Another HTML file. This one shows the possibility of inserting events from a very small, but dynamic interval of time, viz. the next two hours.
Any events that should be added but are not in the W3C group calendar can be put here.
This CSS file contains the rules that allow the list of events to be laid out either as a list (a table, actually, since it uses ‘display: table-row’ and related properties) or as a grid (using the CSS grid properties). The list is shown on narrow screens, the grid on wide ones.
This JavaScript is linked from the HTML files and contains routines to re-sort the lists of events, when the user clicks corresponding buttons.