Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Dendrobatus Azureus
Dendrobatus Azureus
@Dendrobatus_Azureus@mastodon.bsd.cafe  ·  activity timestamp 21 hours ago

@rl_dane
@stefano

I should be able to do the same with the w3 tool that yt-dlp uses to fetch YouTube videos. I've looked for a practical use case to write a small program with that tool and you've just given me one 😊

#sh #shell #bash #csh #ksh #zsh #programming #fedimeteo #weather #w3m #sed #tr #pipe

Dendrobatus Azureus
Dendrobatus Azureus
@Dendrobatus_Azureus@mastodon.bsd.cafe replied  ·  activity timestamp 21 hours ago

@rl_dane @stefano

The javascript tool yt-dlp uses is deno

Ill play with it later in the day

https://deno.com/

#sh #shell #bash #csh #ksh #zsh #programming #deno #fedimeteo #weather #w3m #sed #tr #pipe

  • Copy link
  • Flag this comment
  • Block
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
@rl_dane@polymaths.social  ·  activity timestamp 22 hours ago

@Dendrobatus_Azureus @admin

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
Dendrobatus Azureus
@Dendrobatus_Azureus@mastodon.bsd.cafe replied  ·  activity timestamp 21 hours ago

@rl_dane
@stefano

I should be able to do the same with the w3 tool that yt-dlp uses to fetch YouTube videos. I've looked for a practical use case to write a small program with that tool and you've just given me one 😊

#sh #shell #bash #csh #ksh #zsh #programming #fedimeteo #weather #w3m #sed #tr #pipe

  • Copy link
  • Flag this comment
  • Block
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
@rl_dane@polymaths.social  ·  activity timestamp 23 hours ago

@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³
Dendrobatus Azureus
Dendrobatus Azureus
@Dendrobatus_Azureus@mastodon.bsd.cafe replied  ·  activity timestamp 22 hours ago

@rl_dane @admin

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

  • Copy link
  • Flag this comment
  • Block
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:
@rl_dane@polymaths.social  ·  activity timestamp 6 days ago

Useful #shell ( #ksh/ #bash) #function du-jour:

function apod {
#Today's NASA Astronomy Picture of the Day info-fetcher
curl -sL 'https://apod.nasa.gov/apod/archivepix.html' \
|grep -m1 "[0-9][0-9]:" \
|sed 's/^/Date: /;
s|: *<a href="|\nURL: https://apod.nasa.gov/apod/|;
s/">/\nTitle: /; s/<.*$//'
}

~ $ apod
Date: 2026 January 05
URL: https://apod.nasa.gov/apod/ap260105.html
Title: The Red Rectangle Nebula from Hubble
~ $

#NASA #APOD #Astronomy #PictureOfTheDay

  • Copy link
  • Flag this post
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About · Code of conduct · Privacy ·
Bonfire social · 1.0.1-beta.22 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Code of Conduct