Skip to main content

Baty.net

A blog about everything by Jack Baty 👋

Category: Tech

Grab the weather forecast using weatherapi.com

I like to record the weather in my journals. For several years, I’ve used https://wttr.in via curl. Recently, wttr is often unreachable or throws errors, so I took a look at weatherapi.com

Designed for developers by developers, Weather API is the ultimate weather and geolocation API

The free account limits are generous, so I created an account. The default JSON results are very thorough. I created a little shell script that uses jq to parse the JSON and returns only the high/low temps and a text summary of the forecast:

Twtxt and twt.social

I’ve played on and off with twtxt a little and keep the feed out here: http://tilde.club/~jbaty/twtxt.txt. Here’s a snippet of my old twtxt.txt file…

2017-10-15T08:45:06-04:00	Hello, this is a test from twtxt
2017-10-15T08:54:53-04:00	Testing the post_tweet_hook to see that it copies the file to my server
2017-10-15T09:11:16-04:00	Moving my public twtxt.txt to tilde.club/~jbaty/twtxt.txt because it seems fitting there
2017-10-15T16:24:10-04:00	Fun with text tools today https://www.baty.net/2017/some-text-based-things-today/
2017-10-16T07:17:40-04:00	Good morning, several people!

It’s a fun, simple idea; just a text file as social media feed. I’m already spread pretty thin online so it’s only been an occasional toy, but of course someone (James Mills, aka @prologic) is trying to make using the format easier and more approachable by wrapping it in a web UI. Here’s his description from the about page