Getting the meteo from the Terminal

I read the news today oh boy (and girl):

If, in the Terminal, you wrote:

curl -4

you will get the Weather for City: Houston, United States of America !

Replace Houston with the name of the city you want/like/whatever…

(My) source for this information is:

Meteo in the Terminal. Fire Google Translate if you do not read French.

Nota: I do not checked to know how to use that in Xojo.

The result is in French because you accessed with a French system.

With an English system, results are in that language.

It should work with CurlMBS in Xojo.

Really ?
Next time, read carefully: the data in the Terminal comes in English (click in the link above and read or try with a French display the results in the Terminal).

Surprised I was… ;-:slight_smile: … until I checked what language the Terminal displays the meteo.

My source of information
comes from a French site, thus the note about French Translate (for our friends here who do not read French).

No Simone, I am not rude, I only explain…



dim sh As new Shell sh.Execute("curl -4") TextArea1.Text = sh.Result

HTTPSocket1.requestHeaders.AppendHeader("User-Agent", _ //I need to spoof the agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.1.56 " + _ "(KHTML, like Gecko) Version/9.0 Safari/601.1.56") HTTPSocket1.Get("") //... Sub PageReceived(url as string, ...., content as string) TextArea1.Text = content.DefineEncoding(Encodings.UTF8) End Sub

The HTTPSocket returns the full html. Using the Shell/curl partially processes the html but the resulting text has some “[” tagged format littered throughout. What is that and how does Terminal/Safari understand it?

Obscure, confuse, haphazard, unnecessary, Whatever :confused:

Set to ignore now. Waste of time.

That’s what I Love!