Re: weather in conky (LUA scripts)

thank you gentlemen
updated here
http://crunchbanglinux.org/forums/post/191462/#p191462

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

Re: weather in conky (LUA scripts)

Sector11 wrote:

@MrPeachy Had a weather condition for Broken Clouds this morning.
How the heck does one break clouds?

Very carefully!

Re: weather in conky (LUA scripts)

ackernan wrote:
Sector11 wrote:

@MrPeachy Had a weather condition for Broken Clouds this morning.
How the heck does one break clouds?

Very carefully!

lol lol Yea --- OK, NOW I play with the latest v9000 - was the link in post #1 Updated since yesterday?  DOH!!

Last edited by Sector11 (Yesterday 21:43:59)

Re: weather in conky (LUA scripts)

mrpeachy wrote:

AM Clouds/PM Sun
AM Rain/Snow Showers
AM Showers
AM Snow Showers/Wind
Broken Clouds
Clear
Cloudy
Few Clouds
Few Snow Showers
Haze
Isolated Thunderstorms
Light Rain/Wind
Moderate Fog
Mostly Cloudy
Mostly Sunny
Overcast
Partly Cloudy
Rain/Snow Showers
Scattered Clouds
Scattered Showers
Showers
Snow Showers
Snow Showers Late
Sunny

can I take that list and add it in the ~/.v9000.config.lua like this:

con_short={--start of table, put entries below in form eg: ["Thunderstorm"]="T.Strm",
["AM Clouds/PM Sun"]="AM Clouds/PM Sun",
["AM Rain/Snow Showers"]="AM Rn/Sno Shws",
["AM Showers"]="AM Shws",
["AM Snow Showers/Wind"]="AM Sno Shws/Wind",
["Broken Clouds"]="Broken Clouds",
["Clear"]="Clear",
["Cloudy"]="Cloudy",
["Few Clouds"]="Few Clouds",
["Few Snow Showers"]="Fw Sno Shws",
["Haze"]="Haze",
["Isolated Thunderstorms"]="Iso T.Strms",
["Light Rain Late"]="Lt Rain PM",
["Light Rain/Wind"]="Lt Rain/Wind",
["Moderate Fog"]="Mod Fog",
["Mostly Cloudy"]="Mostly Cloudy",
["Mostly Sunny"]="Mostly Sunny",
["Overcast"]="Overcast",
["Partly Cloudy"]="Partly Cloudy",
["Rain/Snow Showers"]="Rain/Snow Shws",
["Scattered Clouds"]="Scat Clouds",
["Scattered Showers"]="Scat Shws",
["Showers"]="Showers",
["Snow Showers Late"]="Sno Shws PM",
["Snow Showers"]="Sno Shws",
["Sunny"]="Sunny",
["Thunderstorm"]="T.Strm",
["Wind Early"]="Wnd AM",
["Wind"]="Wind",--remember to put a comma at the end of every entry
}--this bracket closes the table

Of course you KNOW I'm not waiting for an answer!  lol

Last edited by Sector11 (Yesterday 22:44:58)

Re: weather in conky (LUA scripts)

^ yes big_smile

BUT put the single word matches after (lower in the table) the multi word matches

for example, if you had wanted to shorten "Showers" like so

["Showers"]="Shws",
["Snow Showers Late"]="Sno Shws PM",

the script will change all "Showers" to "Shws"
so then "Snow Showers Late" becomes "Snow Shws Late" which then does not match the next entry in the table

"Snow Showers Late" will be "Snow Shws Late" instead of  "Sno Shws PM"

the link in post 1 hasnt changed with the most recent update
ive got a couple of more things to do with v9000
a fix for decimal places
and a way to make things run a little lighter

Last edited by mrpeachy (Today 01:01:47)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

456

Re: weather in conky (LUA scripts)

It can run lighter? Jeez.. going to have to call it v9000_ghost big_smile

I'm pretty sure that zombies really do exist...

457

Re: weather in conky (LUA scripts)

mrpeachy wrote:

^ yes big_smile

BUT

but but but ... always a BUT!  lol
HUSTON: We have a problem!
The Translation Tables

The table:

["AM Clouds/PM Sun"]="AM Clouds/PM Sun",
["AM Rain/Snow Showers"]="AM Rn/Sno Shws",
["AM Showers"]="AM Shws",
["AM Snow Showers/Wind"]="AM Sno Shws/Wind",
["Broken Clouds"]="Broken Clouds",
["Few Clouds"]="Clouds Few", -- missing-one.jpeg
["Few Snow Showers"]="Fw Sno Shws",
["Isolated Thunderstorms"]="Iso T.Strms",
["Light Rain Late"]="Lt Rain PM",
["Light Rain/Wind"]="Lt Rain/Wind",
["Moderate Fog"]="Mod Fog",
["Mostly Cloudy"]="Mostly Cloudy",
["Mostly Sunny"]="Mostly Sunny",
["Partly Cloudy"]="Partly Cloudy",
["Rain/Snow Showers"]="Rain/Snow Shws",
["Scattered Thunderstorms"]="Scat T.Storms",
["Scattered Clouds"]="Scat Clouds",
["Scattered Showers"]="Scat Shws",
["Snow Showers Late"]="Sno Shws PM",
["Snow Showers"]="Sno Shws",
["Clear"]="Clear",
["Cloudy"]="Cloudy",
["Haze"]="Haze",
["Overcast"]="Overcast",
["Showers"]="Showers",
["Sunny"]="Sunny",
["Thunderstorm"]="T.Strm",
["Wind Early"]="Wnd AM",
["Wind"]="Wind"

Tomorrow's forecast: Scattered Showers
Table says: ["Scattered Showers"]="Scat Shws",

Great ... but near the bottom is:
["Showers"]="Showers",
because there is a forecast that is just "Showers"

So what do we see:  "Scat Showers" and not "Scat Shws"

Partly Sunny ??  Oops!

And we can't isolate "words" because in another language "Scattered Showers" might be one word, or three.

AHHHHHHHHHHHHHHHHHHHH!!!!!  <<--- that's for mrpeachy.
{I'd give ya some hair to pull out but I have so precious few left}  big_smile

BTW, I noticed you got ridg of the need for a separate "nocpu" script.  5 Star Award on that one.

mrpeachy wrote:

the link in post 1 hasnt changed with the most recent update
ive got a couple of more things to do with v9000
a fix for decimal places
and a way to make things run a little lighter

Oh good, I like 'light'  big_smile

Last edited by Sector11 (Today 01:53:32)

458

Re: weather in conky (LUA scripts)

Sector11 wrote:

Tomorrow's forecast: Scattered Showers
Table says: ["Scattered Showers"]="Scat Shws",

Great ... but near the bottom is:
["Showers"]="Showers",
because there is a forecast that is just "Showers"

So what do we see:  "Scat Showers" and not "Scat Shws"

that should work out ok, because
["Scattered Showers"]="Scat Shws"
doesnt match "Showers"

so having showers later down should give you the right output... or is this example something youve seen?

Partly Sunny ??  Oops!

And we can't isolate "words" because in another language "Scattered Showers" might be one word, or three.

AHHHHHHHHHHHHHHHHHHHH!!!!!  <<--- that's for mrpeachy.
{I'd give ya some hair to pull out but I have so precious few left}  big_smile

that should still work
["Scattered Showers"]="translation"

whenever the script sees "Scattered Showers" it puts "translation"
but then if lower down we have
["Showers"]="trans"

this wont be matched by the first round, so "Showers" becomes "trans"

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.

459

Re: weather in conky (LUA scripts)

mrpeachy wrote:

so having showers later down should give you the right output... or is this example something youve seen?

Take a look at "Wed 29 Feb" and the list in gedit.
http://thumbnails52.imagebam.com/17610/ad31d9176093541.jpg

Also: The translation is not working on "Now" condition text.
http://thumbnails53.imagebam.com/17610/75fb51176093759.jpg
according to my list (test purposes) it should read: Clouds Few (image taken earlier)

ALSO Line 36 - is not what "Tues 28 Feb" says.

Scat T.Storms / Scat T.Strms

Last edited by Sector11 (Today 02:36:01)

460

Re: weather in conky (LUA scripts)

falldown wrote:

It can run lighter? Jeez.. going to have to call it v9000_ghost big_smile

Yea, with 2 versions running,
1. the 10 day job, and
2. the simple 8 day one on my vertical conky

and doing nothing else ... CPU: 2-3% NOW THAT'S IMPRESSIVE!!!!

Let's see GhostBuster's beat that!!
http://thumbnails60.imagebam.com/17610/5e15a6176096320.jpg

OK mrpeachy, v9000.lua now has a logo.  big_smile

Last edited by Sector11 (Today 03:00:09)

461

Re: weather in conky (LUA scripts)

^ Love the Logo, but might be some copyright issues lol lol
v9000 bumps my usage up 1% and 2% if I run the extended forecast. She's a lightweight.
Check your PM's  S11.

I'm pretty sure that zombies really do exist...

462

Re: weather in conky (LUA scripts)

in current conditions you have this, in the version of the template i have

out({c=0x48D1CC,a=1,f="Zekton",fs=18,x=10,y=94,txt=now["conditions"]})

but you need conditions_short to get the translation

out({c=0x48D1CC,a=1,f="Zekton",fs=18,x=10,y=94,txt=now["conditions_short"]})

the other thing to check is did you kfc and restart after editing the config?

lol re the logo

Last edited by mrpeachy (Today 03:27:02)

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.