Skip to content

Instantly share code, notes, and snippets.

@cmj
Created April 1, 2022 14:55
Show Gist options
  • Save cmj/2c01b7626aedc14fa148abced88900e6 to your computer and use it in GitHub Desktop.
Save cmj/2c01b7626aedc14fa148abced88900e6 to your computer and use it in GitHub Desktop.
pollen index history
#!/bin/bash
# pollen index history
#
# needs pysparklines, lolcat
# pip install pysparklines
zip=98101
cols=$(tput cols) # number of days, or column width of terminal
curl -s "https://www.pollen.com/api/forecast/historic/pollen/${zip}/${cols}" -A 'Mozilla/5.0' -H 'Referer: https://www.pollen.com/' | jq '.Location.periods[].Index' |
tail -${cols} |
sparkline -r20 |
lolcat -F .2 -p 1000 -S 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment