Author Topic: pmwf (Poor Man's Weather Forecast) - current conditions + 3 days forecast  (Read 4565 times)

VastOne

  •      v-ger
  • Posts: 3861
    • View Profile
    • VSIDO Community
Re: pmwf (Poor Man's Weather Forecast) - current conditions + 3 days forecast
« Reply #15 on: November 20, 2015, 07:40:42 PM »
Added all data as described in How To thread and all is working perfectly now

Thanks hakerdefo!!!
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

PackRat

  • Posts: 1816
    • View Profile
Re: pmwf (Poor Man's Weather Forecast) - current conditions + 3 days forecast
« Reply #16 on: December 23, 2015, 04:28:56 PM »
I can confirm that this script works with Arch linux



all the dependencies were available in the Extras so no messing with the AUR (hurray!)
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

PackRat

  • Posts: 1816
    • View Profile
Your new version isn't working for me - not grabbing the weather data.

Since you're back to actively developing this, I'll make a request  ;D

My script gives:

Current Weather
Forecast for next Day
Forecast for Day 2
Forecast Day 3
Forecast Day 4

It would be more useful (to me anyway) if it was:

Current Weather
Forecast for Current Day
Forecast Next Day
Forecast for Day 2
Foarecast for Day 3

I tried to edit myself once and borked the script really bad.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

VastOne

  •      v-ger
  • Posts: 3861
    • View Profile
    • VSIDO Community
^ That works best for me as well...
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

hakerdefo

  • Posts: 494
    • View Profile
    • Looking at Linux through the Windows of Life
Will add the forecast for current day asap!
The updated script is not working for you?
Did you edit the script and add the values to the following variables,

Code: [Select]
local_latitude=
local_longitude=
local_unit=
api_key=

Cheers!!!
You Can't Always Git What You Want

PackRat

  • Posts: 1816
    • View Profile
Yes, I just plugged them in from my original script.

That api_key value should still work shouldn't it? Looks like the main change was switching to wget from curl.

ran it in a terminal and get this error:

Code: [Select]
conky: window type - desktop
conky: drawing to created window (0x1600001)
conky: drawing to double buffer
conky: forked to background, pid is 1369

date: invalid date ‘@’
date: invalid date ‘@’
date: invalid date ‘@’
awk: cmd. line:1: BEGIN {print  * 3.6}
awk: cmd. line:1:               ^ syntax error
awk: cmd. line:1: BEGIN {print  * 3.6}
awk: cmd. line:1:               ^ syntax error
awk: cmd. line:1: BEGIN {print  * 3.6}
awk: cmd. line:1:               ^ syntax error
awk: cmd. line:1: BEGIN {print  * 3.6}
awk: cmd. line:1:               ^ syntax error

I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

PackRat

  • Posts: 1816
    • View Profile
Fixed a couple typos on my part -

in terminal still failes with:

Code: [Select]
date: invalid date ‘@’
date: invalid date ‘@’
date: invalid date ‘@’
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

hakerdefo

  • Posts: 494
    • View Profile
    • Looking at Linux through the Windows of Life
This is a locale issue. You can easily fix it by adding the following line at the top of the pmwf script,

Code: [Select]
export LC_TIME=C

Cheers!!!
You Can't Always Git What You Want

PackRat

  • Posts: 1816
    • View Profile
No change.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

hakerdefo

  • Posts: 494
    • View Profile
    • Looking at Linux through the Windows of Life
Then try and add the following line right at the top (Right after the interpreter line),

Code: [Select]
export LC_ALL=C

The beginning of the pmwf will look something like this after the changes,

Code: [Select]
#!/usr/bin/env bash
###################
export LC_TIME=C
export LC_ALL=C
local_latitude=
local_longitude=
local_unit=
api_key=
local_rm=$(which rm)

Cheers!!!
You Can't Always Git What You Want

PackRat

  • Posts: 1816
    • View Profile
^ thanks.

Appears to be a issue with the computer. Just did a clean install the other day.

The new script works fine on my other computers - Void and VSIDO - so it's not a Void v. Debian under the hood issue.

Edit - did areconfiguration of locale, script works as is now
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

jedi

  • DEFCON 1
  • Posts: 1495
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Just so happened to have a brand new VSIDO uEFI build going (and loving it!) and have completed all the necessary steps to make it my official 'goto' and as usual, your script works beautifully!  Suddenly minus one conky on the desktop now.  hmmm.  Let's see what happens.  I'm pretty fond of conky...  (not that this can't be utilized fully inside a conky file,  ::) and probably somebody here has already done it!!!)

Beautiful scripting as usual hakerdefoe!  8)

EDIT: Scrot or it didn't happen!

Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous