SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#576 2014-02-01 16:42:24

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

lionhead wrote:

i tried to display the actual moonphase with v9000. there is a little difference between v9000 and wun.lua

have a look: http://postimg.org/image/pglhfbs9j/

v9000 displays an image which matches the moon phase, so waning crescent always shows one image, waxing gibbous another

wun draws the shade on the moon to match the actual percentage illumination, so is much more accurate.  wun shows you an approximation of what you would see if you went and looked at the moon

Last edited by mrpeachy (2014-02-01 17:03:40)

Offline

Help fund CrunchBang, donate to the project!

#577 2014-02-02 00:13:27

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

not much going on today
just tweaked a template
Screenshot_from_2014_02_01_17_55_42.jpg

this one may be a bit much for my little netbook
has the cpu running at around 25%

Offline

#578 2014-02-02 00:21:44

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

not much going on today
just tweaked a template
http://s21.postimg.org/45wttnilf/Screenshot_from_2014_02_01_17_55_42.jpg

this one may be a bit much for my little netbook
has the cpu running at around 25%

Oh nice!! cool

... netbook?  You do all this on a netbook
... someone get this guy a real computer!  lol


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#579 2014-02-02 00:25:31

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:
mrpeachy wrote:

not much going on today
just tweaked a template
http://s21.postimg.org/45wttnilf/Screenshot_from_2014_02_01_17_55_42.jpg

this one may be a bit much for my little netbook
has the cpu running at around 25%

Oh nice!! cool

... netbook?  You do all this on a netbook
... someone get this guy a real computer!  lol

i do have a real computer smile , but depending on where I am in the house, i use my netbook also
when im in the livingroom watching movies for example smile

here is the modified classic10day.lua
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz

you will need the additional_functions.lua also

Last edited by mrpeachy (2014-02-02 00:32:47)

Offline

#580 2014-02-02 04:30:11

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

i do have a real computer smile , but depending on where I am in the house, i use my netbook also
when im in the livingroom watching movies for example smile

here is the modified classic10day.lua
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz

you will need the additional_functions.lua also

Netbook, livingroom , watching movies ... nope not going to ask!  O:)

Oh, you can bet I'll grab that/those ... Thank you.
That's an "In the Box" conky if I ever saw one ... and talk about tweaking material  big_smile

I've been tweaking as well ...
WUN & v9000 side by side: 2014_02_02_00_59_13_1920x1080_Sector11.jpg

Last edited by Sector11 (2014-02-02 04:31:38)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#581 2014-02-02 04:45:14

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

I've been tweaking as well ...
WUN & v9000 side by side: http://s20.postimg.org/v48e9g3gp/2014_02_02_00_59_13_1920x1080_Sector11.jpg

looks great
to replace the "now" chance of rain that v9000 had but wun doesn't I've been using the hour[1].precipitation as the "now" smile

Offline

#582 2014-02-02 14:04:36

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:
Sector11 wrote:

I've been tweaking as well ...
WUN & v9000 side by side: http://s20.postimg.org/v48e9g3gp/2014_02_02_00_59_13_1920x1080_Sector11.jpg

looks great
to replace the "now" chance of rain that v9000 had but wun doesn't I've been using the hour[1].precipitation as the "now" smile

Hey, that would work.  Creative thinking mrpeachy ... nicely done.

Is it my imagination or is WUN more CPU intensive than v9000 - especially in static mode.

2014_02_02_10_29_57_1920x1080_Sector11.jpg 2014_02_02_10_34_08_1920x1080_Sector11.jpg 2014_02_02_10_35_31_1920x1080_Sector11.jpg


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#583 2014-02-02 17:15:27

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

Is it my imagination or is WUN more CPU intensive than v9000 - especially in static mode.

there shouldnt be any inherant reason that wun is more cpu intensive
it is virtually the same set of functions that are running to display the information on the screen as it was in v9000

there may be some factors that make wun more intensive, using falldowns big icons as mini icons for example
i would think it is more intensive to manipulate/shrink those larger files (150 or so kb 455 x 455 pixels) compared to the regular icons that v9000 uses (40kb 90 x 90)

EDIT - changing the small icons to the big icons on classic10day.lua only added 1 % to cpu

i could compare v9000 10day and wun 10day using the same icons and see

Last edited by mrpeachy (2014-02-02 18:05:39)

Offline

#584 2014-02-02 17:51:11

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

Screenshot_from_2014_02_02_11_33_29.jpg

v9000 on the left, cpu ticks between 4 and 5 %
wun on the rigjt cpu ticks between 6 and 7 %

EDIT - i tried using the larger images and they really dont have much of an impact, just an increase of 1% cpu

maybe the moon shade code is a little more intensive than just displaying an image?

EDIT2 - there is a reason why the forecast is completely different on the left and right
on the left im using Sector111's location ARBA0009 (at least i think it is)
on the right my location  big_smile

Last edited by mrpeachy (2014-02-02 21:03:18)

Offline

#585 2014-02-03 01:01:33

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

i need some testers for this new wun.lua

https://dl.dropboxusercontent.com/u/190 … ing.tar.gz

first change - only 2 indicator dots instead of 3
reason - to get the updating indicator dot to work i had to put in a delay between the timer starting the update and the script downloading data, this delay was 2 conky cycles
this was fine if your update_interval in conky is set to 1, you only had to wait a couple of seconds
but i hadnt taken into account longer update intervals, where you would be wondering what was going on as you waited for the script to do something
SO i think it is best to get rid of the update indicator.  The config still has a setting for this dot however, that will need to be changed in the future

the remaining dots are the same data indicators as before

what needs testing... alerts!
so far new available options are:

alerts.number (outputs the number of weather alerts you have)
use like this

out({x=10,y=100,txt="Weather alerts: "..alerts.number})

alerts[1].description
the number in the brackets depends on how many alerts you have

out({x=10,y=115,txt=alerts[1].description})

alerts[1].message_heading

out({x=10,y=130,txt=alerts[1].message_heading})

alerts[1].message_body
the problem is that the alerts message_body seems to be quite varied
it can be very long, and be in multiple parts

this wun.lua version should still be fully compatible with any existing templates
what i would like is to see the api data for as many alerts as i can

1. put an indicator that tells you if you have any alerts,
2. then if you do have an alert, copy the data url that comes up in the terminal when you launch the conky
3. paste it into a browser and then scroll down until you see the alert section and post the text here

this is the text in the api for my current alert:

"alerts": [
		{
		"type": "SPE",
		"description": "Special Statement",
		"date": "4:40 PM CST on February 2, 2014",
		"date_epoch": "1391380800",
		"expires": "6:00 AM CST on February 03, 2014",
		"expires_epoch": "1391428800",
		"message": "\u000A...Another storm taking aim on the region on Tuesday and Tuesday\u000Anight...\u000A\u000AIt appears that another winter storm will be affecting parts of\u000Acentral and eastern Missouri...and western and southern sections\u000Aof Illinois...on Tuesday and Tuesday night. \u000A\u000AOver the past few days...forecast data has been suggesting a\u000Astorm system will be pushing into the area early this week. This\u000Amorning\u0027s information still indicates that a wintry mix will\u000Aoverspread the area during the day on Tuesday...with snow\u000Acontinuing over the northern half of Missouri and into central\u000AIllinois on Tuesday night.\u000A\u000AOver the northern half of Missouri and into central Illinois this\u000Aprecipitation should be all snow. However...from southeast\u000AMissouri into southern Illinois a mixture of snow...sleet...and\u000Afreezing rain is expected. \u000A\u000AEarly indications are that the heaviest snow...6 or more\u000Ainches...will be possible over northeast Missouri and west central\u000AIllinois. Lesser amounts are expected elsewhere...and over\u000Asoutheast Missouri and southern Illinois the accumulations will\u000Abe a mixture of sleet and ice...along with some snow.\u000A\u000APlease note that this is a preliminary forecast...and these\u000Anumbers will likely change as the details of the storm become\u000Abetter defined.\u000A\u000A\u000A\u000A",

and how i have it on screen
Screenshot_from_2014_02_02_18_46_12.jpg

Offline

#586 2014-02-03 01:03:09

Habitual
#! Member
From: Youngstown, OH
Registered: 2010-09-10
Posts: 62
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

i need some testers for this new wun.lua

https://dl.dropboxusercontent.com/u/190 … ing.tar.gz

Preachin' to the Choir aren't ya? smile


Success is 1% Inspiration
and 98% Perspiration and
2% atttention to details.

Offline

#587 2014-02-03 01:39:50

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

to get the alerts data in a template you need to add "alerts" to the top like this

_G.weather_script = function(update,time,now,text_forecast,day,hour,alerts)

Offline

#588 2014-02-03 04:02:16

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

lacking anything better to do big_smile  , ive been looking over the wun.lua code for anything i have missed or anything that could be improved
found a few things previously missed, for example, some instances where the api data is NA the script was not using the user setting for NA_text

I have also made some improvements, i hope, to the structure of the code and to how the wrap function works.  I have some functions that i will review to see if i can make them more efficient

altered everything to take into account the removal of the update indicator dot in wun.lua and in the config
once i work out how to present the alerts i will post a big update  ]:D

Offline

#589 2014-02-03 04:35:24

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

It wraps well
alerts_tmb.jpg
I just put it at the bottom and increased the length of the window in wunrci.

--ALERTS SECTION #########################################################################
gap=13
ypos=420
ypos=ypos+gap
out({fs=12,x=10,y=ypos,txt="Weather alerts: "..alerts.number,shadow=1})
ypos=ypos+gap+gap
out({fs=14,x=10,y=ypos,txt=alerts[1].description,shadow=1})
ypos=ypos+gap
wrapy=out({wrap_len=60,wrap_gap=15,fs=12,x=10,y=ypos,txt=alerts[1].message_heading,shadow=1})
ypos=ypos+gap+wrapy
wrapy=out({wrap_len=60,wrap_gap=15,fs=12,x=10,y=ypos,txt=alerts[1].message_body,shadow=1})
--########################################################################################
--END OF WEATHER CODE -- END OF WEATHER CODE -- END OF WEATHER CODE --]]
--########################################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################

A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain

Offline

#590 2014-02-03 04:43:18

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:

It wraps well
http://ccs-wtn.com/webimg/alerts_tmb.jpg
I just put it at the bottom and increased the length of the window in wunrci.

thank you for testing joe! smile
good to see it working for you!
could you post the raw api data for the alerts section?

and i like how you have your top right weather icon set up, over the blue of the button, but under the text  cool

EDIT - i borrowed your zip code and got the data smile  so dont worry about it
would be interesting to see if alerts are available to those outside the US

Last edited by mrpeachy (2014-02-03 05:05:02)

Offline

#591 2014-02-03 05:04:37

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

Is this what you need?

"alerts": [
		{
		"type": "WIN",
		"description": "Winter Storm Warning",
		"date": "9:09 PM CST on February 2, 2014",
		"date_epoch": "1391396940",
		"expires": "4:00 AM CST on February 03, 2014",
		"expires_epoch": "1391421600",
		"message": "\u000A...Winter Storm Warning remains in effect until 4 am CST Monday...\u000A\u000A* snow/sleet/ice accumulations...quarter to three quarters of an\u000A inch of total ice accumulation...overspread by up to 1 to 2\u000A inches of snow and sleet accumulation.\u000A\u000A* Timing...late afternoon through early overnight hours.\u000A\u000A* Impacts...roads and especially bridges may become slick and\u000A hazardous. Some downed trees and power lines. Power outages will\u000A be possible.\u000A\u000APrecautionary/preparedness actions...\u000A\u000AA Winter Storm Warning means significant amounts of snow...\u000Asleet...and ice are expected or occurring. Strong winds are also\u000Apossible. This will make travel very hazardous or impossible.\u000A\u000A\u000A\u000A\u000A\u000A",
		"phenomena": "WS",
		"significance": "W",
		"ZONES": [
		{
		"state":"TN",
		"ZONE":"003"
		}
		,
		{
		"state":"TN",
		"ZONE":"004"
		}
		,
		{
		"state":"TN",
		"ZONE":"020"
		}
		,
		{
		"state":"TN",
		"ZONE":"021"
		}
		],
		"StormBased": {
		}
		}
	]
}

EDIT:
I posted this exactly 25 seconds before your edit above  lol  lol  lol

Last edited by jst_joe (2014-02-03 05:28:43)


A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain

Offline

#592 2014-02-03 05:28:35

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:

Is this what you need?

"alerts": [
		{
		"type": "WIN",
		"description": "Winter Storm Warning",
		"date": "9:09 PM CST on February 2, 2014",
		"date_epoch": "1391396940",
		"expires": "4:00 AM CST on February 03, 2014",
		"expires_epoch": "1391421600",
		"message": "\u000A...Winter Storm Warning remains in effect until 4 am CST Monday...\u000A\u000A* snow/sleet/ice accumulations...quarter to three quarters of an\u000A inch of total ice accumulation...overspread by up to 1 to 2\u000A inches of snow and sleet accumulation.\u000A\u000A* Timing...late afternoon through early overnight hours.\u000A\u000A* Impacts...roads and especially bridges may become slick and\u000A hazardous. Some downed trees and power lines. Power outages will\u000A be possible.\u000A\u000APrecautionary/preparedness actions...\u000A\u000AA Winter Storm Warning means significant amounts of snow...\u000Asleet...and ice are expected or occurring. Strong winds are also\u000Apossible. This will make travel very hazardous or impossible.\u000A\u000A\u000A\u000A\u000A\u000A",
		"phenomena": "WS",
		"significance": "W",
		"ZONES": [
		{
		"state":"TN",
		"ZONE":"003"
		}
		,
		{
		"state":"TN",
		"ZONE":"004"
		}
		,
		{
		"state":"TN",
		"ZONE":"020"
		}
		,
		{
		"state":"TN",
		"ZONE":"021"
		}
		],
		"StormBased": {
		}
		}
	]
}

yes, that is it smile thank you
hopefully if i get to see a few different alerts ill be able to work out what to expect and be able to process them nicely
this one is different to the special statement i have in my area
- for you the "heading" as ive named it really isnt a heading but the main details of the warning
and your warning is broken down into sub heading
accumulation
timing
impacts
which are distinguished by the * in the text

one problem is that the message is using unicode for punctuation and new lines, all those "u000A" and similar, so i need to edit those correctly.  I have a function that breaks the text into its sub pieces then wraps each piece like this:
Screenshot_from_2014_02_02_23_17_08.jpg

Offline

#593 2014-02-03 05:31:11

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

^ That looks really good! cool


A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain

Offline

#594 2014-02-03 12:47:23

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

Moving fast, saw the "I need testers" last night just as I was heading for the pit ... zzzzzz come back and a whole bunch of posts.  I'm heading out soon for an hour or so then I'll be diving in!  And looking forward to it.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#595 2014-02-03 14:42:53

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Wun Weather Script for Conky (Lua)

one of my questions answered

Feature: alerts
Page Contents

    Feature: alerts
    Response Fields for cities within the USA
    Response Fields for cities within Europe
    Examples
    City within the USA
    City within Europe

Returns the short name description, expiration time and a long text description of a severe alert, if one has been issued for the searched upon location.

These alerts are only active in the United States and Europe. View our United States Severe Weather map or our European Severe Weather map to see where there are active alerts at this moment.

Read the National Weather Service description of VTEC codes used in severe weather alerts in the United States, including "phenomena" and "significane", here: www.weather.gov/os/vtec/pdfs/VTEC_explanation6.pdf

European alerts are required to show the "attribution" to Meteoalarm.

only US and Europe  sad

and US and Eurpoe get different kinds of alerts with different data labels  mad
http://www.wunderground.com/weather/api … ata/alerts

Last edited by mrpeachy (2014-02-03 14:45:21)

Offline

#596 2014-02-03 15:33:08

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

one of my questions answered

only US and Europe  sad

and US and Eurpoe get different kinds of alerts with different data labels  mad
http://www.wunderground.com/weather/api … ata/alerts

If you hear a sonic boom and the sky get a really dark blue ...

Ooh, aah, ooh, aah
Ooh, aah, ooh, aah

That's the sound of the blue streak
S11's cussin' blue streaks
That's the colour of the blue streak
S11's cussin' blue streaks

I guess we just don't rate! lol mad 8.( 8.(

Borrowed from Sam Cooke's Working on the Chain Gang.

EDIT: Guess I can stop trying to get it working, and after C4'ing jst_joes code too.  Thanks anyway jst_joe

Last edited by Sector11 (2014-02-03 15:38:26)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#597 2014-02-03 16:20:19

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

It was a very good idea. neutral
Not mrpeachy's fault if WU are a bunch of...
Well I won't go there!  ]:D


A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain

Offline

#598 2014-02-03 17:16:59

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:

It was a very good idea. neutral
Not mrpeachy's fault if WU are a bunch of...
Well I won't go there!  ]:D

It was a fantastic idea, KUDOS to mrpeachy for trying ... and it worked ... as far as people got.

No not a bunch of ... they can't be everything to everyone.  8.(  8.(  8.(


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#599 2014-02-03 17:35:53

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

No not a bunch of ... they can't be everything to everyone.  8.(  8.(  8.(

Yeah, you're right but I did really like the scrot mrpeachy posted. cool


A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain

Offline

Help fund CrunchBang, donate to the project!

#600 2014-02-03 18:11:14

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:
Sector11 wrote:

No not a bunch of ... they can't be everything to everyone.  8.(  8.(  8.(

Yeah, you're right but I did really like the scrot mrpeachy posted. cool

That's why the tears.  It's  cool  but I can't have it  8.(


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo