💾 Archived View for kwiecien.us › gemlog › gemcast-restructuring.gmi captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
Authors: Ben <benulo@systemli.org>
Dated: 2021-04-19
When Gemini Radio was very simple, it was easy to maintain the page by hand. All I had to do wa upload a file, then note it in the index. However, things got a little bit more complicated due to recent changes in the format and distribution.
First, I decided to submit the gemcast to aggregators that track posts with the Gemini subscription format. That means with the index as it was, feeds would be picking up direct links to the ogg files, which might be inconvenient for people browsing those feeds and not expecting that. Like, if you're cycling through pages you might be surprised that your client is trying to download a file.
The other thing is that I figured it was a good idea to try a format where I break the gemcast down into multiple segments. This made it logical to have a page for the episode with information about each segment, which turned out to be useful for the multiple reasons why notes on a segment would be helpful. (Topics, links, corrections...) Also adding the runtime allows streamers to know how long the file is, or downloaders can estimate the file size.
Overall it seems like an improvement, even though the older, simpler format had its advantages. For example, you could just visually scan the list and pick out episodes covering topics that you like. Now to browse the content that way you have to queue up the pages or employ a search of some kind (e.g. "Linux") to find a specific episode by anything but number.
I figured it was worth it just to have it be feed-friendly, and someone who really wants to go through the backlog still can, but is only slightly inconvenienced. Also they may not want to do that more than one time anyway, so emphasis is being placed on newer content. The "Episode N" naming convention isn't perfect either, but I realized the episodes don't really have titles, and in place of a title users were usually getting a list of the episode's contents, so those became proper lists in the new format.
Because complexity increased, I thought it would only be appropriate to write a bash script to help automate the creation process. What I thought was going to be a small change to simple gemlog script ended up turning into an hours-long project of figuring out how to make bash do things I've never made it do before like manipulating strings, transforming arrays, and even storing a datum to a file. There's even simple arithmatic, which feels weird indeed.
The logic is, if I'm creating multiple WAV files when recording an episode in segments, I will have the script scan the files, encode them, tag them, and generate the info page. It will know if the episode is one file or multiple files and formats everything accordingly. (Side A, Side B, Side C...) It was probably more shell scripting than I thought I'd do in my lifetime, but it feels worth it. After allowing me to edit the page, it uploads everything onto the server.
More scripting still was used to backport the new format to old episodes so that it's all uniform. I still had to copy the descriptions by hand, but that wasn't so bad. One plus is that the old ogg files are now tagged, so I guess they would look nice in some players.
One particular thing I liked about the script is that it gets the date information from the file name, so the script can be run at a later date even but would not affect the production.