Fix Linux MotD Weather

This past summer, I updated the MotD of my Orange Pi to include the current weather whenever I log in. It worked great… until recently. For the past week or so, I noticed it wasn’t showing the weather when I logged in.

It turned out to be a simple error and easy fix. The command works by downloading the current weather from the Internet, then using SED to scrape the current temperature and status from the resulting page using a regex.

The problem is that it does not account for negative temperatures, which is what the temperatures are now in the winter (at least in Celsius), so when the temperature is below zero, it does not find the information because the pattern does not match. The fix is simply adding an optional negative sign (-\?) to the regex (optional in the regex sense; it’s required to make this work correctly):

root:/> more /etc/update-motd.d/32-weather
#!/bin/bash
curl -s "http://rss.accuweather.com/rss/liveweather_rss.asp?metric=1&locCode=NAM|CA|ON|LONDON|" |\
sed -n '/Currently:/ s/.*: \(.*\): \(-\?[0-9]*\)\([CF]\).*/\2°\3, \1/p'

“The Navigator” in The White Chamber

The game The White Chamber is pretty amusing, but the anime style doesn’t really mesh with its horror-survival theme. That said, it’s still a pretty solid (and free) game with a decent story. It’s not too long and you can play through it to get the eight different endings in just an hour or two. One thing to look out for is the alphanumeric codes. Half of the endings display a three-letter code at the top of the screen which when taken together spell out a message, which oddly enough, there do not seem to be any references of on the Internet; apparently nobody has noticed it. 😕

EndingCode
Space
Electrocution
Venemous [sic]
Decaying
RedemptionROT
DamnedAGI
TormentedVAN
ComedyEHT

If you read the codes from right to left, it reads “THE NAVIGATOR”. Ostensibly, this refers to the protagonist Sarah (or maybe the Artefact 🤔).

Wolf4knowledge has a video with all of the endings:


ROT AGI VAN EHT
“THE NAVIGATOR”