this post was submitted on 10 Sep 2023
7 points (88.9% liked)

Linux

8119 readers
6 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 1 year ago
MODERATORS
 

cross-posted from: https://gekinzuku.com/post/394282

Lately I've been obsessed with moving everything that people typically use as widgets into my bashrc. Today I discovered wttr.in, which is an open source project on Github at https://github.com/chubin/wttr.in

Usage is almost trivial. To get weather in your terminal, simply curl the URL with your city after the forward slash. If you live in New York City, use
curl 'https://wttr.in/New%20York'

Now, if that's too much bloat to have covering your precious terminal real estate, instead use
curl 'https://wttr.in/New%20York'?0?A?u which will truncate the curl to only today's weather.

top 5 comments
sorted by: hot top controversial new old
[–] mvirts@lemmy.world 1 points 1 year ago (1 children)

Weird, I usually just get weather report on my speakers

[–] DickFiasco@lemm.ee 1 points 1 year ago
[–] fernandu00@lemmy.ml 0 points 1 year ago (1 children)

O stepped into this a couples days ago looking for a weather info to waybar and found this python script with wttr ...with a couple tweaks and some documentation reading I got it to work really easily in Portuguese

[–] graham1@gekinzuku.com 0 points 1 year ago (1 children)

I like that I can change to https://pt.wttr.in/ and get the Portuguese site

[–] fernandu00@lemmy.ml 2 points 1 year ago

Saw that just after tweaking the script to get the pt-br entry of the json object so I didn't change to pt website