[kwlug-disc] cli weather

Chris Frey cdfrey at foursquare.net
Mon Feb 19 21:24:39 EST 2024


On Sat, Feb 17, 2024 at 09:55:05PM +0000, Mikalai Birukou wrote:
> Browsing KWLUG archive reveals https://kwlug.org/node/1101

Nifty... my normal terminal windows are usually narrower than that,
so I crafted a script:

#!/bin/bash

CITY=kitchener
FONT=-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
GEO=128x42+0+0

if [ -n "$1" ] ; then
	if [ "$1" = "-h" ] ; then
		echo "Useful cities to specify:"
		echo "   kitchener"
		echo "   waterloo-canada"
		exit
	fi
	CITY="$1"
fi

xterm -geometry $GEO -fn $FONT \
	-e "bash -c \"curl -s http://wttr.in/$CITY |less -R\""


- Chris




More information about the kwlug-disc mailing list