HN user

igor_chubin

49 karma
Posts4
Comments27
View on HN

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

Curl Wttr.in 6 years ago

Just use

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

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

Curl Wttr.in 6 years ago

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
Curl Wttr.in 6 years ago

Yes it works! The difference is minimal though (it was intentionally a one-liner)

Curl Wttr.in 6 years ago

Wow! That's cool. Let's try it

  curl() { [ -t 1 ] && curl "$@" | sanitize || curl "$@"; }
Curl Wttr.in 6 years ago

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

Curl Wttr.in 6 years ago

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 "$@"; }

Curl Wttr.in 6 years ago

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

Curl Wttr.in 6 years ago

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

Curl Wttr.in 6 years ago

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

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.

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.

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".