Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

inxi/pinxi testers! big weather update

User avatar
oops
Forum Regular
Forum Regular
Posts: 754
Joined: Tue Apr 10, 2018 5:07 pm

Re: inxi/pinxi testers! big weather update

#21

Post by oops » Sat Feb 09, 2019 10:37 am

fehlix wrote:
Sat Feb 09, 2019 9:25 am
Best seems to be source 2 and 4:

Code: Select all

for S in 1 2 3 4; do P="pinxi -xxxw --weather-source $S"; echo -e "\n$P"; $P; done
#or
for S in 1 2 3 4; do P="pinxi -xxxW Hamburg,DE --weather-source $S"; echo -e "\n$P"; $P; done
Hi Fehlix,
Personally I do not like the #2, because no observation time and location is shown (a kind of "XOR" parity check):
Observation Time: 2019-02-09 13:52:00 (Europe/Berlin +0100)
PS: And thanks for the useful bash command line.
$ inxi -Fxxxz : System: Host:XEON ... Distro: MX-18_x64 Continuum

User avatar
h2-1
Forum Regular
Forum Regular
Posts: 447
Joined: Sat Nov 15, 2008 3:16 pm

Re: inxi/pinxi testers! big weather update

#22

Post by h2-1 » Sun Feb 10, 2019 1:10 am

anticap, unfortunately your case exposes a small filter I forgot to add to the location, that's why you see the repeated stuff, I'm slapping my head since it struck me I should add it for all values, not just state/country.

You've correctly noticed that the location is not great, it's not great for me here either by the way, all of them are slightly glitchy.

I'm going to add in source 5 tonight, and as far as I can tell, source 1 is going to vanish quite soon, but it may not.

Or tomorrow, anyway, soon.

I'll review all these samples and tweak pinxi, inxi just hit sid, and hopefully will make it into testing before the freeze, I think ubuntu is also grabbing quite soon, so I had to rush it out, wish I could have tested even more, but better to have a few glitches on the location than to have no weather, which was the issue I faced.

I'll probably do more complicated weather stuff for inxi 3.0.33, but that can wait, I needed to get the new one out in time for the freezes. Definitely I'll fix that duped city.

Just fyi anticap, one of these apis said that I lived in a small ghetto neighborhood about 10 miles or more from where I live, no idea how they got that, and why they called a neighborhood in a city the city name, but that's how it is, each api has its own weaknesses and strengths, which you can see, as you did well above, by running all of them for the same location.

The variances in weather is high too, huge differences in rainifall, cloud cover, for the same exact location at the same time.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
h2-1
Forum Regular
Forum Regular
Posts: 447
Joined: Sat Nov 15, 2008 3:16 pm

Re: inxi/pinxi testers! big weather update

#23

Post by h2-1 » Sun Feb 10, 2019 4:10 am

Just a side note, because your location is derived from your IP from your ISP, that is never going to be accurate, it has very little to do with where you actually are, just where your IP is located at your ISP. So that's what default uses, it gets your lat,lon, or rather, the lat lon connected with your IP address, which is NOT related to the actual location you are at, it's just something that is sort of abstracted, not sure how they do geolocation for IP addresses exactly, but it's very crude. By far the most accurate you would ever get is putting in 3 or 4 decimal place latitude,longitude for your actual location, or, if you live in a smaller town, your city,state[or country].

I may revisit that feature, as usual, anything that is -xxx feature means, I in general don't consider it reliable data. There' sa reason location was an -xxx option heh, and this is why.

I never heavily tested this feature, but I believe you'd find that wherever your ISP node is located that assigned your IP address would be the listed location, and, if you used an ISP in a different town, that town would be the listed location, since it's based on your current IP address. I never looked into the geolocation logic since there's no way to get a better automated location using IP addresses, but I think that's how it works. Someone could easily verify this if they use an ISP they know is actually in another town, and the location lists that town.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
Eadwine Rose
Forum Veteran
Forum Veteran
Posts: 8941
Joined: Wed Jul 12, 2006 2:10 am

Re: inxi/pinxi testers! big weather update

#24

Post by Eadwine Rose » Sun Feb 10, 2019 5:58 am

MAYBE I missed this.. but is this also going to help with the weather report app for in the panel. I seem to remember that that one was going byebye soon as well.
MX-18.3_x64 May 26 2019 * 4.19.0-5-amd64 ext4 Xfce 4.12.3 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 390.116 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy5030

User avatar
h2-1
Forum Regular
Forum Regular
Posts: 447
Joined: Sat Nov 15, 2008 3:16 pm

Re: inxi/pinxi testers! big weather update

#25

Post by h2-1 » Sun Feb 10, 2019 4:20 pm

No, it's totally unrelated. Each program uses its own data sources and logic, there is no connection. However, the connection in this case may be that that app was using the same datasource, though honestly, it's not that hard to change sources so I don't see why it wouldn't just be updated, so it may be the case that if it is going away, the person is simply tired of maintaining it.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
kmathern
Forum Veteran
Forum Veteran
Posts: 9678
Joined: Wed Jul 12, 2006 2:26 pm

Re: inxi/pinxi testers! big weather update

#26

Post by kmathern » Sun Feb 10, 2019 4:45 pm

I didn't think the order in which I entered the "W" & "xxx" options would matter, but it does.

Also found it doesn't like spaces in the name of the town or city, so I needed to escape them with a "\" or use quotes.
edit: nevermind, looking at the -h help, I see I should replace spaces with a "+".

Code: Select all

$ pinxi -Wxxx fort\ wayne,indiana
Error 22: Unsupported option: fort wayne,indiana
Check -h for correct parameters.

Code: Select all

$ pinxi -Wxxx 'fort wayne',indiana
Error 22: Unsupported option: fort wayne,indiana
Check -h for correct parameters.

Code: Select all

$ pinxi -xxxW fort\ wayne,indiana
Weather:   Temperature: -2 C (28 F) Conditions: Light snow Wind: from E at 4.1 m/s (15 km/h, 9 mph) Cloud Cover: 100% 
           Rain: 0.5 mm (0.02 in) Humidity: 92% Dew Point: -3 C (27 F) Pressure: 987.8 mb (29.63 in) 
           Location: Fortwayne, Indiana Current Time: Sun 10 Feb 2019 03:33:15 PM EST 
           Observation Time: 2019-02-10 15:20:00 (America/Indiana/Indianapolis -0500) Source: weatherbit.io

Code: Select all

$ pinxi -xxxW 'fort wayne',indiana
Weather:   Temperature: -2 C (28 F) Conditions: Light snow Wind: from E at 4.1 m/s (15 km/h, 9 mph) Cloud Cover: 100% 
           Rain: 0.5 mm (0.02 in) Humidity: 92% Dew Point: -3 C (27 F) Pressure: 987.8 mb (29.63 in) 
           Location: Fortwayne, Indiana Current Time: Sun 10 Feb 2019 03:40:01 PM EST 
           Observation Time: 2019-02-10 15:20:00 (America/Indiana/Indianapolis -0500) Source: weatherbit.io 

User avatar
Eadwine Rose
Forum Veteran
Forum Veteran
Posts: 8941
Joined: Wed Jul 12, 2006 2:10 am

Re: inxi/pinxi testers! big weather update

#27

Post by Eadwine Rose » Sun Feb 10, 2019 5:51 pm

h2-1 wrote:
Sun Feb 10, 2019 4:20 pm
No, it's totally unrelated. Each program uses its own data sources and logic, there is no connection. However, the connection in this case may be that that app was using the same datasource, though honestly, it's not that hard to change sources so I don't see why it wouldn't just be updated, so it may be the case that if it is going away, the person is simply tired of maintaining it.
Seriously that would suck, but yeah.. we'll see. Hopefully it'll get picked up.

Sorry for the topic steal :)
MX-18.3_x64 May 26 2019 * 4.19.0-5-amd64 ext4 Xfce 4.12.3 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 390.116 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy5030

User avatar
h2-1
Forum Regular
Forum Regular
Posts: 447
Joined: Sat Nov 15, 2008 3:16 pm

Re: inxi/pinxi testers! big weather update

#28

Post by h2-1 » Sun Feb 10, 2019 11:04 pm

kmathern, yes, the options is -W, and that must be followed by the location. -x -x -x are three other options, combined for -xxxW location

Note that data source 2 does not support any form of city/state/country name with spaces (+ is used to pass the space safely to the remote server), no syntax works, at least none that I found, that's a known bug and they seem unable to handle that trivial parsing to handle spaces correctly, which is why 2 is not a default option, but it does do some thing better than others.

Note that option 5, when I get it done, will maybe feature more stuff, but that will only be in pinxi for now, but not one has everything the others have and more, all just have what they have, and are more or less accurate, and better or worse at actually getting the location right.

Eadwine Rose, something a lot of users of free software don't realize is that, in one case, it's produced mainly by corporations, who can and do stop paying for dev whenever they feel like it, and on the other, very often, it's a small group, or one person, who writes the stuff for some reason or other, none of which involve making any income. There's sort of a long standing myth that open source software is great because someone can always step in and replace the person or people, but that only happens on larger projects that are kind of critical. openssl, for example, was running the planet's ssl infrastructure yet was done by volunteers, overworked, and nobody every thought that might not be the best idea, until the major failures happened, and suddenly the world woke up and said, oh, we have to pay these guys, dugh.

free software always runs this delicate balance, it works out more or less but you will see every year projects fade away, I'm told for example that nobody is taking care of ktorrent right now, as an example. Do any of you remember k9copy? that was one person, a french guy, in the planet, only software that did what it did in linux, he stopped, it died, even though nothing else does what it did, at least not at the time it died. The assumption that there is a large pool of competent and ready and willing people to take over projects has always been a really silly myth promoted by free software advocates who don't program, or who are really bad programmers, lol. Most good programmers end up doing the stuff for money I think, which drops their time down. Some, like me, are kind of crazy, and actually like doing the free stuff more than the paid stuff, lol.

As a further aside, way back when, inxi was forked from a small, bizarre, kind of brilliant, very insane, script, by locsmif, and that old thing faded away years ago, and inxi basically just went on with the main purpose, year after year, that is an example of a successful revival and saving of a project that was destined to die, horrible code, lol, insane logic, but it was the base of the original 1000 or so line fork called inxi.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

Post Reply

Return to “antiX”