News for hackers. Stuff that matters.

igor_chubin

Re:`curl wttr.in`: Weather in your terminal on Sunday May 15, 2022 @10:13AM (#31387682)
please send me your IP or at least its 3 first octets to igor AT chub.in
Re:`curl wttr.in`: Weather in your terminal on Sunday May 15, 2022 @06:12AM (#31386557)
This is not a problem with wttr.in, this is a problem of `watch`. It is a known issue: it can't render ANSI output.

You can try to run it with any command that has ANSI output, and you will see it.

As a simple alternative, you write your own 'watch' like this:

while true; do curl -s wttr.in; sleep 60; clear; done

Re:`curl wttr.in`: Weather in your terminal on Sunday May 15, 2022 @06:10AM (#31386546)
try `curl wttr.in/Munich` (with your location specified instead of Munich)
Re:Curl Wttr.in on Friday June 26, 2020 @11:21AM (#23652989)
Just use

    curl --user-agant "" wttr.in?A
for that.

The `A` option enforces ANSI output (curl wttr.in/:help for more)

Re:Curl Wttr.in on Friday June 26, 2020 @09:14AM (#23651580)
Re:Curl Wttr.in on Friday June 26, 2020 @09:12AM (#23651562)
curl wttr.in/:help

and the curlable directory is almost there

As an interim solution, you can use this:

  curl https://raw.githubusercontent.com/chubin/awesome-console-services/master/README.md
Re:Curl Wttr.in on Friday June 26, 2020 @09:09AM (#23651550)
Yes it works! The difference is minimal though (it was intentionally a one-liner)
Re:Curl Wttr.in on Friday June 26, 2020 @09:08AM (#23651543)
Wow! That's cool. Let's try it

  curl() { [ -t 1 ] && curl "$@" | sanitize || curl "$@"; }
Re:Curl Wttr.in on Friday June 26, 2020 @07:37AM (#23650857)
See my comment in the neighbor thread
Re:Curl Wttr.in on Friday June 26, 2020 @07:09AM (#23650696)
No, because they are not implemented as a part of wego; wego is used just for visualization of one of the views (v1). The rest is implemented outside of it
Re:Curl Wttr.in on Friday June 26, 2020 @05:40AM (#23650251)
Just use IFS for this

w() { ( IFS=+; curl wttr.in/"$*";); }

Re:Curl Wttr.in on Friday June 26, 2020 @04:48AM (#23649995)
Try this:

curl ga.wttr.in/limerick

Re:Curl Wttr.in on Friday June 26, 2020 @04:46AM (#23649989)
curl v2.wttr.in

and for the white background:

curl wttr.in/?I

Re:Curl Wttr.in on Friday June 26, 2020 @04:34AM (#23649927)
Just add `F` to the options, and you don't need `| head -17` then
Re:Curl Wttr.in on Friday June 26, 2020 @04:33AM (#23649918)
It was the case indeed (many many years ago), we discussed at the anuualy curl hackers conference in Nuremberg back in 2017, but the only terminals that we managed to find with the support of this were not younger than 2001.

Anyway, one can write a small filter, to cut any suspicious sequences from the output off, and add some wrapper like that to your bashrc:

curl() { [ -t 1 ] && curl "$@" | sanitize || curl "$@"; }

Re:Curl Wttr.in on Friday June 26, 2020 @03:49AM (#23649713)
curl cheat.sh

curl rate.sx

curl qrenco.de

and the rest from https://github.com/chubin/awesome-console-services

Re:Curl Wttr.in on Friday June 26, 2020 @03:48AM (#23649706)
It is possible, but it brings nothing, because you don't only need to move to the end of the line but print something in between, and for that the server mush know the width of your terminal
Re:Curl Wttr.in on Friday June 26, 2020 @03:47AM (#23649701)
The problem is that it depends on the terminal, and you can render this character properly for all 100% of the terminals on the server side
Re:Curl Wttr.in on Friday June 26, 2020 @03:46AM (#23649696)
To say truth, it is not just a wego as a service since many years, but is started like that indeed

Now it has a lot of additional features:

* one-line output for status lines

* astronomical information

* translation to 70+ languages

* geolocation

* full fledged multilingual location search

* HTML frontend

* PNG frontend

* Slack support

* scalable architecture (it handles 10M+ queries daily for the moment of writing, with avg processing time under 30 msec)

It took one weak for the initial wego-as-a-service wrapper implementation, and more than 4 years (and 99 contributors) for the rest.

But we of course honor wego, and mention it in the README, and on each HTML page in browser

It depends on topic + you can use the ~ notation to extract only parts of the cheat sheet. Check README on Github for that (or curl cht.sh/:help)
Yes, it is not good, we are working on the new frontend.

I can give a link to it to you if you want, but not here, because it will not handle the load that comes after that; just write me a mail if you want to test it.

Everybody who reads this and what to help testing the new frontend write an email to me I will share the link with you.

Yes

curl cht.sh/:styles-demo

select the best style for you, and use it in the queries.

curl cht.sh/:help

for more info.

Also, use the special client cht.sh which supports persitent configuration and many other useful features.

We are working on that but it is not so easy because many queries are generated just in time.

The high load problem is mitigated by the way, so you can try now if you want.

We are of course aware of the beautiful cheat project and we even use it (what is documented in our README.md file), but please keep in mind that:

1. Our project is called cheat.sh and not cheat (for example xterm.js and xterm are two separated projects and xterm existed for decades before xterm.js; should they be renamed too from your point of view?);

2. We are trying to mitigate the impact by using cht.sh where possible;

3. We do not and did not ever use the name to steal, to borrow, or to somehow use popularity of cheat.

I do not see any naming conflict actually. The client/command is called cht.sh, does not even have cheat in their name.

I am a big fan of the cheat project myself, and I don't want to do any harm for it. Even more, as I said, I would prefer that we cooperate with that project.

Most important things:

    curl cht.sh/:help
    curl cht.sh/language/question for question about language
    ?Q to switch comments off
    ?T to switch syntax highlighting off
    append /1 for the next question
Special client:

    cht.sh
It supports tab completion, and so on.

You can find more examples on the project page:

https://github.com/chubin/cheat.sh

Vim integration: https://github.com/dbeniamine/cheat.sh-vim is very cool, you can make the queries (and access the results) directly from Vim.

Alternatives:

    howdoi (need to be installed to be used; uses google and stackoverflow)
    how2 (the same)
Cheat sheets tools:

    cheat (not cheat.sh; it is another project)
    tldr (need to be installed).
cheat.sh provides access both to the cheat sheets and to programming language answers.
The tool has many features.

Most important things:

    curl cht.sh/:help
    curl cht.sh/language/question for question about language
    ?Q to switch comments off
    ?T to switch syntax highlighting off
    append /1 for the next question
Special client:

    cht.sh
It supports tab completion, and so on.

You can find more examples on the project page:

https://github.com/chubin/cheat.sh

Vim integration: https://github.com/dbeniamine/cheat.sh-vim is very cool, you can make the queries (and access the results) directly from Vim.

Alternatives:

    howdoi (need to be installed to be used; uses google and stackoverflow)
    how2 (the same)
Cheat sheets tools:

    cheat (not cheat.sh; it is another project)
    tldr (need to be installed).
cheat.sh provides access both to the cheat sheets and to programming language answers.
Re:Weather reports with curl on Monday July 09, 2018 @03:46AM (#17488600)
wttr.in uses its own version of "wego" with many additional features, forked from wego several years ago. Actually, it would be better to say, that wttr.in uses only artwork from "wego".

Older »