Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Carlos E.R." Newsgroups: comp.os.linux.misc Subject: Re: Python/C/Pascal ... How To Choose ? Date: Fri, 14 Nov 2025 01:54:48 +0100 Lines: 123 Message-ID: References: <-RycnTDdvP2b54z0nZ2dnZfqnPGdnZ2d@giganews.com> <10f1cid$18fo7$2@dont-email.me> <10f1gs5$18fo7$4@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net wFvlPGO7tdg0t8NtfzyriQgXRBzfsvJIfmsQpCin8bpyD0QZ40 X-Orig-Path: Telcontar.valinor!not-for-mail Cancel-Lock: sha1:B9QD0nwSrqm1bw6+K+PVONO8cBM= sha256:kVOFRnlsV2rgkDJIL08IqY1ghWFamNKdsGDb3+lwt2o= User-Agent: Mozilla Thunderbird Content-Language: es-ES, en-CA In-Reply-To: Xref: csiph.com comp.os.linux.misc:77504 On 2025-11-13 05:07, c186282 wrote: > On 11/12/25 03:35, vallor wrote: >> At Wed, 12 Nov 2025 02:26:11 -0500, c186282 wrote: >> >>> On 11/12/25 02:21, vallor wrote: >>>> At 11 Nov 2025 20:16:41 GMT, rbowman wrote: >>>> >>>>> On Mon, 10 Nov 2025 23:22:22 -0500, c186282 wrote: >>>>> >>>>>> On 11/10/25 02:46, rbowman wrote: >>>>>>> On Mon, 10 Nov 2025 00:36:58 -0500, c186282 wrote: >>>>>>> >>>>>>>> On 11/9/25 14:28, rbowman wrote: >>>>>>>>> On Sun, 09 Nov 2025 11:25:36 +0000, Diego Garcia wrote: >>>>>>>>> >>>>>>>>>> Try to predict the weather using Python.  You'll be getting >>>>>>>>>> tomorrows forecast next week, or even next month. >>>>>>>>> >>>>>>>>> How about in a second or two?  The starting point is >>>>>>>>>         url = f"https://api.weather.gov/points/{latitude}, >>>>>>>>> {longitude}" >>>>>>>> >>>>>>>>       Keep getting "invalid point" >>>>>>> >>>>>>> Try >>>>>>> >>>>>>> https://api.weather.gov/points/42.934,-90.567 >>>>>> >>>>>>      That works ... but change the coords a bit and it won't. >>>>>> Seems it >>>>>>      only knows a handful of locations. >>>>> >>>>> I picked that at random. >>>>> >>>>> https://api.weather.gov/points/36.934,-72.567 >>>>> Chincoteague, VA >>>>> >>>>> https://api.weather.gov/points/40.934,-94.567 >>>>> Lenox, IA >>>>> >>>>> https://api.weather.gov/points/36.934,-84.567 >>>>> Burnside KY >>>>> >>>>> https://api.weather.gov/points/58.114,-134.666 >>>>> Juneau, AK >>>>> >>>>> https://api.weather.gov/points/38.114,-134.666 >>>>> no data, but it's 886 km off the coast of northern California. >>>>> >>>>> https://api.weather.gov/points/19.66,-156.012 >>>>> Kailua, HI >>>>> >>>>> You do have to pick points in the US. >>>>> >>>>> https://api.weather.gov/points/51.130,-114.218 >>>>> is Calgary AB and no data. >>>> >>>> This is pretty slick.  I was able to grab the local weather >>>> forecast.  It even includes icons for the weather. >>>> >>>> Thank you for posting about it. >>> >>>     All I get are pages of links to links to links ... >>> >>>     And 'icons' are NOT what I'm looking for - I want >>>     comma/tab-delimited tables which automation can >>>     easily get/process. >> >> Well, I think JSON is easier to handle in programs, but you can use >> jq(1) to create a CSV. >> >> For instance, if you've grabbed the forecast link, try: >> >> jq -r '.properties.periods[] | [.name, .detailedForecast] | @csv' >> forecast >> >> (By default, wget will save your file as "forecast"). >> >> (And thank you for your commentary, without which I wouldn't have >> gone and learned more about jq.) > >   I am privileged to have been your inspiration !  :-) > >   Alas a LOT of current weather shit isn't even in JSON >   format ... it's assembled ad-hoc from hidden files >   and tables into JS-created pages. This MAY be just >   the 'new guys' at work - or an actual conspiracy to >   HIDE the data behind layers and layers so somebody >   will have to register/PAY. > >   SOMETIMES you can get the JS and follow the links. >   Sometimes not. Even thus, the links seem to CHANGE >   fairly often. Not good for automated stuff. > >   Anyway, I'm looking for fairly straight-up solutions >   that don't require 10,000 lines of code. > >   Govt-collected weather data - We The People have ALREADY >   paid for it. We should be able to GET it without issues. > curl v2.wttr.in gets you some weather info. I have in my machine "metar" from 2006, but it no longer runs, it was compiled for 32 bits. Chatgpt suggested these: wego — nice TUI weather client written in Go ansiweather — weather in your terminal using ANSI colors weather-util — classic simple tool (weather command) curl v2.wttr.in — alternative minimal text version metar — shows aviation METAR weather reports -- Cheers, Carlos. ES🇪🇸, EU🇪🇺;