w3m is a great little terminal web browser, as it's easy to compile on nearly any OS and has some great features.
For my scripts, I usually try to auto-detect the presence of lynx, links, w3m, and chawan, but for my shell alias, I just picked w3m, which I have installed everywhere. 😄
@Dendrobatus_Azureus @admin @ternaard
I even enjoy fedimeteo from the command line! ;)
alias fedimeteo='w3m -dump "https://us.fedimeteo.com/{{city}}__texas/" |tr "\n" ^ |sed "s/━━*/\n/g" |head -1 |tr ^ "\n" |sed -n "/^Weather for {{City}}/,/^#{{City}}/p"'
rld@Intrepid:~$ fedimeteo |head
Weather for {{City}}, Texas 🌕
Current temperature (at 05:42): 39.6°F (Partly cloudy)
Wind speed: 13.1 mph (5.9 m/s), direction: ↖ 327°
Air Quality:
• AQI: 27 🟢 (Good)
• PM2.5: 1.1 μg/m³
• PM10: 1.1 μg/m³
Interesting method; you use w3m tr head sed and a verical pipe to format the output for your favourite sh
https://linux.die.net/man/1/w3m
#sh #shell #bash #csh #ksh #zsh #programming #fedimeteo #weather w3m #sed #tr #pipe