Fun With the Command Line

Lately I’ve been trying to learn more about Bash and command-line tools like curl and jq. It’s just fiddling around, but it’s fun and surprisingly addictive.

A few recent mini-projects:

You can’t spell “Toronto City Council” without “TTY”

Screenshot of the 2mmis.sh main menu and help

2mmis is a command-line interface for TMMIS, the Toronto City Council Meeting Management Information System. They revamped the site earlier this year; the front end still isn’t terribly impressive, but on the back end, they’ve implemented an (apparently undocumented) API that serves data in JSON format.

At first I thought about using it to generate simple static web pages with meeting and agenda data, but it was less complicated to make something completely terminal-based. It can show you monthly schedules, committee information, meeting agendas, and more. It’s just curl, jq, and a lot of printf statements, basically.

Party like it’s 1199

Screenshot of temporal-hours.sh help and clock output

Recently, with the clocks “falling back”, there was a lot of the usual Discourse on fedi (as I’m sure there was on other social media) about Daylight Savings Time and what would be better, and I felt compelled to remind people of how they did it in medieval Europe (among other premodern societies): the night and day were each divided into twelve hours, no matter how long they were. This meant that in more northerly latitudes, during the winter nighttime hours would be longer than daytime hours, and vice versa during summer.

It’s obviously completely unfeasible in this age of time zones and rapid travel, but just for kicks, temporal-hours.sh calculates the hour according to this system based on your geographic location. It uses jq and the SunriseSunset.io API to find sunrise and sunset times for your location, then just calculates the length of the night and day and divides each by 12. You can turn it into a little clock running in your terminal by calling it with watch, and be on medieval time all the time.

“Hacking” Metazooa

The Metazooa game screen appears "torn away" to reveal a diagram of the phylogenetic tree underneath.

Metazooa is a fun Wordle-style guessing game where you try to narrow down the mystery animal based on its phylogenetic relationship to the species you guessed. My only gripe is that the set list of species you can choose from is very biased towards mammals and vertebrates in general. Like, there’s three species of Equus alone (horses, zebras, and donkeys), but only four species of arachnids!

I tried looking at the various scripts to see how it worked, but they’re all heavily obfuscated. However, a list of all the common names you can guess, plus the scientific name of the mystery animal, is right there in the web page’s source code when you load a new game! So I put together this script which uses curl, grep and sort to load thousands of Metazooa practice games, grab each mystery animal’s name, and delete the dupes to produce a list of all the possible species. Then I plugged it into NCBI’s Common Tree generator to produce the complete phylogenetic tree. The repo also includes the complete list of common names and the scientific names they correspond to.


I’m just a beginner at this, so the code is not that good. If you see room for improvement or want to offer some helpful hints, leave a comment—or make a pull request or issue on Codeberg!

Olivia Chow’s First 100 Days

Evaluating Olivia Chow’s First 100 Days

The conclusion of my series at The Local following the crucial first months of Olivia Chow’s mayoralty! What has she gotten done? What’s still on the to-do list? Read the full thing.

P. S. Thanks to WordPress’s integration with ActivityPub, this post will also appear at the account @nevillepark@nevillepark.ca, and if you reply to it with your fediverse account (Mastodon, etc.), it will show up as a comment! Neat, eh?

A New Approach to Homelessness on the TTC?

A New Approach to Homelessness on the TTC?

Last week I took a field trip to Scarborough Civic Centre for new chair Jamaal Myers’ first TTC board meeting! As winter approaches, the TTC proposes a new approach to homeless people on the TTC, but it sounds an awful lot like just pushing people out of sight. Read on for details.

Olivia Chow’s Financial Plan Takes Form

Olivia Chow’s Financial Plan Takes Form

Last week, Olivia Chow’s brand-new Executive Committee unanimously recommended new revenue tools to stave off financial catastrophe. But can she get it past City Council—and what happens if she doesn’t? Read my latest for The Local.

A Leftward Tilt for the City’s Committees

A Leftward Tilt for the City’s Committees

Last week, Mayor Olivia Chow revamped City Council committees with her own slate of progressives, dramatically shifting the balance of power. Plus, the by-election churn continues in the wake of Scarborough councillor Gary Crawford’s resignation. Read my latest column at The Local. (And check out the nice interactive data visualization they made for me, too!)

What Can Olivia Chow Do About Climate Change?

What Can Olivia Chow Do About Climate Change?

My latest column for The Local is out! I discuss how climate change is pushing Toronto weather to extremes, Council’s patchy track record on going low-carbon, and the large and small things Olivia Chow can do to change that. Plus, the literal train wreck in Scarborough and two special upcoming meetings at City Hall.

CBC MP3 stream URLs down

Another update on the CBC radio stream URLs: as various people have kindly let me know, the MP3 links are down, probably for good. The M3U8 links still work, and most modern apps and devices should be able to handle them. However, I’m afraid legacy users are out of luck. Update, July 30: the MP3 links are back!

I’ve also moved the repo to Codeberg; however, the changes should be automatically mirrored on Github.

For more details, see the main blog post.

Tracking Olivia Chow’s First 100 Days as Toronto Mayor

Tracking Olivia Chow’s First 100 Days as Toronto Mayor

In Olivia Chow, Toronto has its first progressive mayor in 12 years. How will she tackle the city’s many critical issues? Will City Council’s power balance shift? My new column for The Local tracks Chow’s first 100 days. In the first installment, I look at how the mayor—and organizers on the ground—addressed the asylum seeker crisis that unfolded at 129 Peter St. Plus, a few key items from this week’s Council meeting.