Author Topic: Weather Conditions Using INXI  (Read 442 times)

Online VinDSL

  • Administrator
  • Hero
  • *****
  • Posts: 5876
  • Karma: 1150
  • Team Peppermint
    • View Profile
  • Peppermint version(s): Developmental Builds
Weather Conditions Using INXI
« on: May 27, 2020, 12:24:18 am »
Well I'll be damned   :o

I was fooling around tonight, trying to figure out how to use Inxi to scrape weather conditions for Conky.

Reading the Man, I knew Inxi was capable of displaying weather conditions, but I was missing a piece of the puzzle.

Finally figured it out, and the pieces fell into place.   ;D

Code: (EXAMPLE) [Select]
╭─vindsl@Boogaloo-6 ~
╰─$ inxi -wxxx -W tucson,az
Weather:
  Temperature: 25.2 C (77 F) Conditions: Clear sky
  Wind: from WSW at 0.5 m/s (2 km/h, 1 mph) Cloud Cover: 0% Humidity: 15%
  Dew Point: -3.3 C (26 F) Pressure: 930.2 mb (31 in) Location: Tucson, Az
  Current Time: Wed 27 May 2020 12:12:26 AM MST
  Observation Time: 2020-05-26 23:47:00 (America/Phoenix -0700)
  Source: WeatherBit.io
╭─vindsl@Boogaloo-6 ~
╰─$
Now I just need to haxor an algo to scrape the data for Conky...

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2373
  • Karma: 623
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Weather Conditions Using INXI
« Reply #1 on: May 27, 2020, 12:52:12 am »
Hi VinDSL,

Here's what I get:
Code: [Select]
$ inxi -wxxx -W tucson,az
Weather:   Weather data failure: Wed May 27 09:35:05 CEST 2020
           Error: weather info downloaded but no data detected.
Maybe they're on a coffee break ...  ;D


Regards,

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Online VinDSL

  • Administrator
  • Hero
  • *****
  • Posts: 5876
  • Karma: 1150
  • Team Peppermint
    • View Profile
  • Peppermint version(s): Developmental Builds
Re: Weather Conditions Using INXI
« Reply #2 on: May 27, 2020, 01:32:44 am »
Right. You haven't discovered the 'missing link' yet.   :)

Here's the trick...

Edit and save your '/etc/inxi.conf' file, so it reads like this:

Code: [Select]
## We want to use the distro to track the package
B_ALLOW_UPDATE=true
To test it, when you're done, run this command from CLI:

Code: [Select]
cat /etc/inxi.confYour should see something like this:

Code: [Select]
╭─vindsl@Boogaloo-6 ~
╰─$ cat /etc/inxi.conf       
## We want to use the distro to track the package
B_ALLOW_UPDATE=true
Then, update Inxi by running this command from CLI:

Code: [Select]
$ sudo inxi -U This is what I see on my machine:

Code: [Select]
╭─vindsl@Boogaloo-6 ~
╰─$ sudo inxi -U               
[sudo] password for vindsl:
Starting inxi self updater.
Using tiny as downloader.
Currently running inxi version number: 3.1.00
Current version patch number: 00
Current version release date: 2020-04-22
Updating inxi in /usr/bin using main branch as download source...
Successfully updated to main branch version: 3.1.00
New main branch version patch number: 00
New main branch version release date: 2020-04-22
To run the new version, just start inxi again.
----------------------------------------

Starting download of man page file now.
Downloading Man page file...
Download successful. Compressing file...
Download and install of man page successful.
Check to make sure it works: man inxi
╭─vindsl@Boogaloo-6 ~
╰─$
Finally, try it again:

Code: [Select]
╭─vindsl@Boogaloo-6 ~
╰─$ inxi -w -W flagtaff,az     
Weather:
  Temperature: 9.4 C (49 F) Conditions: Clear sky
  Current Time: Wed 27 May 2020 01:28:14 AM MST Source: WeatherBit.io
╭─vindsl@Boogaloo-6 ~
╰─$
« Last Edit: May 27, 2020, 01:40:35 am by VinDSL »

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2373
  • Karma: 623
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Weather Conditions Using INXI
« Reply #3 on: May 27, 2020, 01:48:38 am »
Hi VinDSL,

Got it:

Code: [Select]
$ inxi -wxxx -W tucson,az
Weather:
  Temperature: 23.2 C (74 F) Conditions: Clear sky
  Wind: from ESE at 0.5 m/s (2 km/h, 1 mph) Cloud Cover: 0% Humidity: 18%
  Dew Point: -2.3 C (28 F) Pressure: 929.6 mb (31 in) Location: Tucson, Az
  Current Time: Mi 27 Mai 2020 01:46:45 MST
  Observation Time: 2020-05-27 01:17:00 (America/Phoenix -0700)
  Source: WeatherBit.io



Thank you !!  8)

Regards,

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Online VinDSL

  • Administrator
  • Hero
  • *****
  • Posts: 5876
  • Karma: 1150
  • Team Peppermint
    • View Profile
  • Peppermint version(s): Developmental Builds
Re: Weather Conditions Using INXI
« Reply #4 on: May 27, 2020, 01:55:17 am »
BTW, this boosts the Inxi ver from 2.3.56-1  => 3.1.00-00   ;)








Online VinDSL

  • Administrator
  • Hero
  • *****
  • Posts: 5876
  • Karma: 1150
  • Team Peppermint
    • View Profile
  • Peppermint version(s): Developmental Builds
Re: Weather Conditions Using INXI
« Reply #5 on: May 27, 2020, 02:08:31 am »
Heh! Inxi found and correctly identified my Plantronics Voyager Legend headset now   ;D

INXI 3.1.00-00
[close]