SEARCH

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

You are not logged in.

#176 2014-01-11 19:39:38

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

Re: Wun Weather Script for Conky (Lua)

falldown wrote:

S11   yikes  you know what I meant..   big_smile

Yup, and already absconded with too! ]:D

falldown wrote:

Canadians play football? I thought they just rode horses, ate cheese and ice skated..   wink

Boooo! Booooo! you're bad ... bad ... bad! ]:D ]:D

You forgot the Moosehead Beer Fridge! and we don't need horses to pull our sleds; we have Moose Sleds As for skating, why even our women play hockey, then there is our World famous Tim Horton's Coffee.  And to top that all off we have our Canadian National Poem.

Cheese?  Don't you eat cheese on apple pies as well? tongue

Now for football ... of course we do .. it started off as Rugby  ... but changed over time ...  our field is bigger 110yds x 65yds vs 100yds x 53 1/3yds, we only get 3 down not 4 to gain 10 yards, mind you we have one more player at 12 vs 11 but while your offensive team must run their play in 25seconds, we only have 20.  lol  lol


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

Offline

Be excellent to each other!

#177 2014-01-11 19:41:32

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

Re: Wun Weather Script for Conky (Lua)

falldown wrote:

I was thinking
For example: for the chance of snow icon..

Or better yet..

Oh I do like where you are going with those!

PS: enjoy the weekend games.   wink


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

Offline

#178 2014-01-11 19:45:45

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

Re: Wun Weather Script for Conky (Lua)

falldown wrote:

Peachy you are welcome.. I will be converting both sets of icons for wun.. and adding to both set.

I was thinking
For example: for the chance of snow icon..
http://s10.postimg.org/nbamawbph/chance_of_snow.jpg

Or better yet..
http://s23.postimg.org/ssxdg0jpj/chance_of_snow_1.jpg

probably best to have a question mark for language purposes... although im not sure how the ? travels internationally  big_smile
- i personally like the text one

if you ever get really bored you can have a go at the extended icon set also  ]:D

i have removed all the ones that are not used from the folder in this archive
you already have most of them from v9000
https://dl.dropboxusercontent.com/u/190 … ded.tar.gz

these are all the potential weather conditions:
and te icons im using to represent them, 1st number is day, 2nd is night

--["condition"]			    "Day icon","Night icon"
["Light Drizzle"]			={"09","09"},
["Drizzle"]				={"09","09"},
["Heavy Drizzle"]			={"11","11"},
["Light Rain"]				={"11","11"},
["Rain"]				={"12","12"},
["Heavy Rain"]				={"40","40"},
["Light Snow"]				={"14","14"},
["Snow"]				={"16","16"},
["Heavy Snow"]				={"42","42"},
["Light Snow Grains"]			={"07","07"},
["Snow Grains"]				={"07","07"},
["Heavy Snow Grains"]			={"07","07"},
["Ice Crystals"]			={"07","07"},
["Light Ice Crystals"]			={"07","07"},
["Heavy Ice Crystals"]			={"07","07"},
["Ice Pellets"]				={"06","06"},
["Light Ice Pellets"]			={"06","06"},
["Heavy Ice Pellets"]			={"06","06"},
["Hail"]				={"18","18"},
["Light Hail"]				={"18","18"},
["Heavy Hail"]				={"18","18"},
["Mist"]				={"56","56"},
["Light Mist"]				={"56","56"},
["Heavy Mist"]				={"56","56"},
["Fog"]					={"76","20"},
["Light Fog"]				={"76","20"},
["Heavy Fog"]				={"76","20"},
["Fog Patches"]				={"76","20"},
["Light Fog Patches"]			={"76","20"},
["Heavy Fog Patches"]			={"76","20"},
["Smoke"]				={"48","48"},
["Light Smoke"]				={"48","48"},
["Heavy Smoke"]				={"48","48"},
["Volcanic Ash"]			={"19","19"},
["Light Volcanic Ash"]			={"19","19"},
["Heavy Volcanic Ash"]			={"19","19"},
["Windespread Dust"]			={"49","49"},
["Light Widespread Dust"]		={"49","49"},
["Heavy Widespread Dust"]		={"49","49"},
["Sand"]				={"19","19"},
["Light Sand"]				={"19","19"},
["Heavy Sand"]				={"19","19"},
["Haze"]				={"19","21"},
["Light Haze"]				={"19","21"},
["Heavy Haze"]				={"19","21"},
["Spray"]				={"68","68"},
["Light Spray"]				={"68","68"},
["Heavy Spray"]				={"68","68"},
["Dust Whirls"]				={"49","49"},
["Light Dust Whirls"]			={"49","49"},
["Heavy Dust Whirls"]			={"49","49"},
["Sandstorm"]				={"19","19"},
["Light Sandstorm"]			={"19","19"},
["Heavy Sandstorm"]			={"19","19"},
["Low Drifting Snow"]			={"15","15"},
["Light Low Drifting Snow"]		={"15","15"},
["Heavy Low Drifting Snow"]		={"15","15"},
["Low Drifting Widespread Dust"]	={"49","49"},
["Light Low Drifting Widespread Dust"]	={"49","49"},
["Heavy Low Drifting Widespread Dust"]	={"49","49"},
["Low Drifting Sand"]			={"15","15"},
["Light Low Drifting Sand"]		={"15","15"},
["Heavy Low Drifting Sand"]		={"15","15"},
["Light Blowing Snow"]			={"15","15"},
["Blowing Snow"]			={"15","15"},
["Heavy Blowing Snow"]			={"15","15"},
["Light Blowing Widespread Dust"]	={"49","49"},
["Blowing Widespread Dust"]		={"49","49"},
["Heavy Blowing Widespread Dust"]	={"49","49"},
["Blowing Sand"]			={"19","19"},
["Light Blowing Sand"]			={"19","19"},
["Heavy Blowing Sand"]			={"19","19"},
["Light Rain Mist"]			={"57","57"},
["Rain Mist"]				={"58","58"},
["Heavy Rain Mist"]			={"40","40"},
["Rain Showers"]			={"11","11"},
["Light Rain Showers"]			={"12","12"},
["Heavy Rain Showers"]			={"40","40"},
["Light Snow Showers"]			={"14","14"},
["Snow Showers"]			={"16","16"},
["Heavy Snow Showers"]			={"42","42"},
["Light Snow Blowing Snow Mist"]	={"63","63"},
["Snow Blowing Snow Mist"]		={"63","63"},
["Heavy Snow Blowing Snow Mist"]	={"63","63"},
["Ice Pellet Showers"]			={"06","06"},
["Light Ice Pellet Showers"]		={"06","06"},
["Heavy Ice Pellet Showers"]		={"06","06"},
["Hail Showers"]			={"18","18"},
["Light Hail Showers"]			={"18","18"},
["Heavy Hail Showers"]			={"18","18"},
["Small Hail Showers"]			={"18","18"},
["Light Small Hail Showers"]		={"18","18"},
["Heavy Small Hail Showers"]		={"18","18"},
["Thunderstorm"]			={"75","75"},
["Light Thunderstorm"]			={"37","47"},
["Heavy Thunderstorm"]			={"75","75"},
["Thunderstorms and Rain"]		={"64","64"},
["Light Thunderstorms and Rain"]	={"64","64"},
["Heavy Thunderstorms and Rain"]	={"64","64"},
["Thunderstorms and Snow"]		={"65","65"},
["Light Thunderstorms and Snow"]	={"65","65"},
["Heavy Thunderstorms and Snow"]	={"65","65"},
["Thunderstorms and Ice Pellets"]	={"66","66"},
["Light Thunderstorms and Ice Pellets"]	={"66","66"},
["Heavy Thunderstorms and Ice Pellets"]	={"66","66"},
["Thunderstorms with Hail"]		={"67","67"},
["Light Thunderstorms with Hail"]	={"67","67"},
["Heavy Thunderstorms with Hail"]	={"67","67"},
["Thunderstorms with Small Hail"]	={"67","67"},
["Light Thunderstorms with Small Hail"]	={"67","67"},
["Heavy Thunderstorms with Small Hail"]	={"67","67"},
["Freezing Drizzle"]			={"08","08"},
["Light Freezing Drizzle"]		={"08","08"},
["Heavy Freezing Drizzle"]		={"08","08"},
["Freezing Rain"]			={"10","10"},
["Light Freezing Rain"]			={"10","10"},
["Heavy Freezing Rain"]			={"10","10"},
["Freezing Fog"]			={"76","20"},
["Light Freezing Fog"]			={"76","20"},
["Heavy Freezing Fog"]			={"76","20"},
["Patches of Fog"]			={"76","20"},
["Shallow Fog"]				={"76","20"},
["Partial Fog"]				={"76","20"},
["Overcast"]				={"26","26"},
["Clear"]				={"32","31"},
["Partly Cloudy"]			={"30","29"},
["Mostly Cloudy"]			={"28","27"},
["Scattered Clouds"]			={"34","33"},
["Small Hail"]				={"18","18"},
["Squalls"]				={"74","74"},
["Funnel Cloud"]			={"74","74"},
["Unknown Precipitation"]		={"68","68"},
["Unknown"]				={"68","68"},
["Chance of Flurries"]			={"69","69"},
["Chance of Rain"]			={"68","68"},
["Chance of Rain"]			={"68","68"},
["Chance of Freezing Rain"]		={"73","73"},
["Chance of Sleet"]			={"71","71"},
["Chance of Snow"]			={"72","72"},
["Chance of Thunderstorms"]		={"74","74"},
["Chance of a Thunderstorm"]		={"74","74"},
["Chance Flurries"]			={"69","69"},
["Chance Rain"]				={"68","68"},
["Chance Rain"]				={"68","68"},
["Chance Freezing Rain"]		={"73","73"},
["Chance Sleet"]			={"71","71"},
["Chance Snow"]				={"72","72"},
["Chance Thunderstorms"]		={"74","74"},
["Chance a Thunderstorm"]		={"74","74"},
["Chance Thunderstorm"]			={"74","74"},	
["Cloudy"]				={"26","26"},
["Flurries"]				={"14","14"},
["Mostly Sunny"]			={"30","29"},
["Partly Sunny"]			={"28","27"},
["Sleet"]				={"05","05"},
["Sunny"]				={"32","31"},
["Thunderstorm"]			={"75","75"},
["Overcast"]				={"26","26"}}

Last edited by mrpeachy (2014-01-11 19:48:08)

Offline

#179 2014-01-11 20:00:03

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Wun Weather Script for Conky (Lua)

Peachy Yea I guess the question mark would be best. I will try and get some work done on the icons thus weekend.

S11 I'm not really a big football fan at all.. My wife is a huge Seahawks fan.
Cheese on pie? That might be why Canadians have free healthcare.        big_smile
: I am just teasing about this :

Offline

#180 2014-01-11 20:06:46

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

Re: Wun Weather Script for Conky (Lua)

falldown wrote:

: I am just teasing about this :

I know you are.  big_smile  That's the fun part. smile


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

Offline

#181 2014-01-11 20:10:23

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Wun Weather Script for Conky (Lua)

Having the precip or snow option associated with a chance icon would be cool.    smile

chance_of_snow_2.jpg

Offline

#182 2014-01-12 01:48:08

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

Re: Wun Weather Script for Conky (Lua)

@falldown - you would need a lot of icons for that wouldn't you?

here is what i have been working on today, i wish my math was better than it is, but after much looking things up and fiddling and cussing... dynamic moon shading!

calculated from the %illumination numbers obtained from USNO

Screenshot_from_2014_01_11_19_32_22.jpg

today and the next 9 days

Screenshot_from_2014_01_11_20_02_30.jpg

actually today is saturday but im running the script in developer mode, so its using saved data

Last edited by mrpeachy (2014-01-12 02:15:33)

Offline

#183 2014-01-12 21:18:45

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Wun Weather Script for Conky (Lua)

^ Very cool Peachy!! I want to use that!

On the % with chance of icons..
I was thinking that if icons 20 thru 30 are chance of icons and if the script loads one of these icons then the precip % will be displayed over icon.

Does that make sense?

Offline

#184 2014-01-12 21:36:36

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

Re: Wun Weather Script for Conky (Lua)

Has anyone tried:

Modifying: wun_config.lua

conditions_user={--OPENS TABLE, DO NOT EDIT
["Heavy Rain"]="H.Rain",
["Clear"]="Clear Skies",
["Chance of a Thunderstorm"]="Possible Thunderstorm",
}--CLOSES CONDITIONS_USER TABLE, DO NOT EDIT

It's not working for me.  sad

If I don't use the , at the ends, I get an error

This one:
2014_01_12_18_21_12_1920x1080_Sector11.jpg
Is just about done though ... except for the stuff above.

Unless there are some suggestions ...


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

Offline

#185 2014-01-12 21:43:10

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

Re: Wun Weather Script for Conky (Lua)

Interesting mrpeachy ... looking forward to playing with that.

@ falldown - that sounds good ... little bit of programming involved though (not my department) takes it out of the "text" area and only displays when the chance is greater than 0% on the icon.  I like it ... big_smile
PS:  Who won?

Last edited by Sector11 (2014-01-12 21:44:41)


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

Offline

#186 2014-01-12 22:27:35

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

Re: Wun Weather Script for Conky (Lua)

@sector11 - i havnt tested the user set conditions much, ill take a look at it as soon as i get a minute
the commas at the ends are essential as you are making entries in a table and all entries must end in , smile

Your template looks great!!

@falldown, next chance i get i think im going to post a "testing" version of wun, in a different post, then you can get the moon shading.  But ill wait until everything is finished and polished before updating the main archive

the ability to show data conditionally is quite easy and can be already done in a template
only thing is that snow isnt given as a %chance, the data returns how much snow you are likely to get

snow=day[1].snow_allday_imperial
if tonumber(snow)>0 then--need tonumber so lua is comparing a real number not a text string number
out({x=10,y=10,txt=day[1].snow_allday_imperial..day[1].snow_allday_imperial_unit})
end

Offline

#187 2014-01-12 23:16:32

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

Re: Wun Weather Script for Conky (Lua)

OOTB iweather.lua w/ background images a-la-falldown.
iweather_1_tmb.jpg iweather_2_tmb.jpg
The only change I had to make were these settings in iweather.lua on line 68.

image({x=-6,y=-5,w=387,h=290*(620/421),file="/home/joe/wun/additional_files/wuni_1.png"})

"x,y coordinates and image size"

@falldown the only changes I had to make in your images were to square off the bottom right corner.
wuni_1_tmb.png wuni_2_tmb.png
Hope you don't mind. smile

@mrpeachy
If you notice in my scrots the location time is 14:20:47 but the system time is 4:10 in one and 4:12 in the other.
Also the temp according to wunderground.com site had droped to 55.
I have wun_config.lua settings at

developer_mode=0,
key="my_key",--get the Cumulus Plan 
tries=3,
interval=300,
location="38343",
language="EN",--set langauge here

it dosen't seem to be updating unless I killall and restart.

EDIT
For typo.

Last edited by jst_joe (2014-01-12 23:59:55)


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

#188 2014-01-12 23:29:00

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 - i havnt tested the user set conditions much, ill take a look at it as soon as i get a minute
the commas at the ends are essential as you are making entries in a table and all entries must end in , smile

Your template looks great!!

Thanks, give it a run... big_smile

Now I have to figure out how to change the station, Colegailes, does not show wind or UVI - I've checked the history - I can't believe it's the 'default' for BaSa.  Saavedra  is about the same distance away and at least shows wind.  More research ...

EDIT: I have Saavedra  big_smile  template and image updated!

wun_config.lua

--metric units
--unit_c				="°C",--celsius  -- ORIGINAL
unit_c				="°",--celsius  -- S11 - No need for the C

wun_template.lua - font: Monofur

--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function(update,time,now,text_forecast,day,hour)--#### DO NOT EDIT THIS LINE ##############
--#######################################################################
--these tables hold the coordinates for each repeat do not edit #########
top_left_xcoordinate={}--################################################
top_left_ycoordinate={}--################################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Monofur"--font must be in quotes
default_font_size=12
default_face="bold"
--defaultmetricolor=0xffffff--white  -- ¿HUH?
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--#########################################################################
out({a=1,c=0x00BFFF,fs=14,x=15,y=15,txt="Local: "..os.date("%T").." - Updated: "..now.observation_time_rfc822.." from PWS: "..now.observation_location_city})
out({a=1,fs=18,x=15,y=35,txt=now.weather})
gap=16
ypos=40+gap
out({a=1,x=15,y=ypos,txt="Temp : "..now.temp_metric..now.temp_metric_unit})
out({a=1,c=0xFFD700,x=115,y=ypos,txt="    ±: "..now.feelslike_metric..now.feelslike_metric_unit})
out({a=1,x=215,y=ypos,txt="Hum: "..now.humidity.."%"})
ypos=ypos+gap
out({a=1,c=0x00BFFF,x=15,y=ypos,txt="Chill: "..now.windchill_metric..now.windchill_metric_unit})
out({a=1,c=0xFFA07A,x=115,y=ypos,txt=" Heat: "..now.heatindex_metric..now.heatindex_metric_unit})
out({a=1,x=215,y=ypos,txt="Dew: "..now.dewpoint_metric..now.dewpoint_metric_unit})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Vis  : "..now.visibility_metric..now.visibility_metric_unit})
out({a=1,x=115,y=ypos,txt="   BP: "..now.pressure_trend..now.pressure_metric..now.pressure_metric_unit})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Rain this hour: "..now.precip_1hr_imperial..now.precip_1hr_metric_unit})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Wind : "..now.wind_metric..now.wind_metric_unit})
out({a=1,x=125,y=ypos,txt=now.wind_degrees.."°"})
out({a=1,x=167,y=ypos,txt=now.wind_dir})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Gusts: "..now.wind_gust_metric..now.wind_gust_metric_unit})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="UV Index: "..now.uvi.." "..now.uvi_text})

image({x=230,y=80,h=60,w=60,file=now.wind_icon})
--		  image({x=230,y=80,h=60,w=60,file="~/wun/additional_files/red+x.png"})
image({x=300,y=50,h=90,w=90,file=now.weather_icon})
--		  image({x=300,y=50,h=90,w=90,file="~/wun/additional_files/red+x.png"})

--text forecast section
gap=15
ypos=ypos+gap*2
-- today
out({x=15,c=0xFFD700,fs=16,y=ypos,txt="Today:"})
out({x=125,c=0x87CEFA,fs=16,y=ypos,txt=text_forecast[1].title})
ypos=ypos+gap
wrapy=out({wrap_len=50,wrap_gap=15,x=15,y=ypos,txt=text_forecast[1].fctext_metric})
ypos=ypos+gap+wrapy
-- tonight
--out({x=15,c=0xFFD700,fs=16,y=ypos,txt="Today:"})
out({x=125,c=0x87CEFA,fs=16,y=ypos,txt=text_forecast[2].title})
ypos=ypos+gap
wrapy=out({wrap_len=50,wrap_gap=15,x=15,y=ypos,txt=text_forecast[2].fctext_metric})
ypos=ypos+gap+wrapy
-- tomorrow
out({x=15,c=0xFFD700,fs=16,y=ypos,txt="Tomorrow:"})
out({x=125,c=0x87CEFA,fs=16,y=ypos,txt=text_forecast[3].title})
ypos=ypos+gap
wrapy=out({wrap_len=50,wrap_gap=15,x=15,y=ypos,txt=text_forecast[3].fctext_metric})
ypos=ypos+gap+wrapy
-- tomorrow night
--out({x=15,c=0xFFD700,fs=16,y=ypos,txt="Tomorrow:"})
out({x=125,c=0x87CEFA,fs=16,y=ypos,txt=text_forecast[4].title})
ypos=ypos+gap
wrapy=out({wrap_len=50,wrap_gap=15,x=15,y=ypos,txt=text_forecast[4].fctext_metric})

--FORECAST REPEAT SECTION
ypos=ypos+gap+wrapy
--set colum width
local column_width=340			--340
--set row height
--local row_height=150
local row_height=110				--110

--set coordinates first row at y=370
--row 1, column 1
top_left_xcoordinate[1]=(0*column_width)
top_left_ycoordinate[1]=ypos
	--row 1, column 2
	--top_left_xcoordinate[2]=(1*column_width)
	--top_left_ycoordinate[2]=ypos
	--row 2, column 1
top_left_xcoordinate[2]=(0*column_width)
top_left_ycoordinate[2]=ypos+(row_height*1)
	--row 2, column 2
	--top_left_xcoordinate[4]=(1*column_width)
	--top_left_ycoordinate[4]=ypos+(row_height*1)
	--row 3, column 1
top_left_xcoordinate[3]=(0*column_width)
top_left_ycoordinate[3]=ypos+(row_height*2)
	--row 3, column 2
	--top_left_xcoordinate[6]=(1*column_width)
	--top_left_ycoordinate[6]=ypos+(row_height*2)
	--row 4, column 1
top_left_xcoordinate[4]=(0*column_width)
top_left_ycoordinate[4]=ypos+(row_height*3)

--start_number, when used to show days, hours or day, this is the first instance that you want shown
--for example start_number=3 would show day 3 or hour 3
local start_number=1
--set total forecast days you want to display
--end number is the last instance you want to see
--eg with end_number=6 day 6 or hour 6 would be the last seen
local end_number=4
--########################################################################################
for i=start_number,end_number do --start of day repeat, do not edit ######################
tlx=top_left_xcoordinate[i-(start_number-1)] --sets top left x position for each repeat #
tly=top_left_ycoordinate[i-(start_number-1)] --sets top left y position for each repeat #
--########################################################################################
--WRITE REPEAT CODE HERE##use i in the square brackets within the loop [i]################
out({a=1,c=0xFFD700,fs=14,x=tlx+15,y=tly,txt=day[i].weekday.." "..day[i].day_pad.." "..day[i].monthname_short.." "..day[i].year})
out({a=1,c=0xFFA07A,x=tlx+300,y=tly,txt="H "..day[i].high_metric..day[i].high_metric_unit})
out({a=1,c=0x00BFFF,x=tlx+350,y=tly,txt="L "..day[i].low_metric..day[i].low_metric_unit})
out({a=1,fs=18,x=tlx+15,y=tly+18,txt=day[i].conditions})
ypos=32
gap=14
out({a=1,x=tlx+15,y=tly+ypos,txt="Rain: "..day[i].precipitation.."%"})
out({a=1,x=tlx+100,y=tly+ypos,txt="QPF: "..day[i].rain_allday_metric..day[i].rain_allday_metric_unit})
out({a=1,x=tlx+200,y=tly+ypos,txt="Hum: "..day[i].avehumidity.."%"})
ypos=ypos+gap
out({a=1,x=tlx+75,y=tly+ypos,txt="Day/Night: "..day[i].rain_day_metric..day[i].rain_day_metric_unit.." / "..day[i].rain_night_metric..day[i].rain_night_metric_unit})
ypos=ypos+gap
out({a=1,c=0x00BFFF,x=tlx+75,y=tly+ypos,txt="-= Wind Data =-"})
ypos=ypos+gap
out({a=1,x=tlx+75,y=tly+ypos,txt="Average: "..day[i].avewind_metric..day[i].avewind_metric_unit})
out({a=1,x=tlx+195,y=tly+ypos,txt=day[i].avewind_degrees.."°"})
out({a=1,x=tlx+225,y=tly+ypos,txt=day[i].avewind_dir})
ypos=ypos+gap
out({a=1,x=tlx+75,y=tly+ypos,txt="Maximum: "..day[i].maxwind_metric..day[i].maxwind_metric_unit})
out({a=1,x=tlx+195,y=tly+ypos,txt=day[i].maxwind_degrees.."°"})
out({a=1,x=tlx+225,y=tly+ypos,txt=day[i].maxwind_dir})
-- images for this section
image({x=tlx+300,y=tly,h=80,w=80,file=day[i].weather_icon})
--			image({x=tlx+300,y=tly+5,h=90,w=90,file="~/wun/additional_files/red+x.png"})
image({x=tlx+15,y=tly+ypos-50,h=50,w=50,file=day[i].avewind_icon})
--		  image({x=tlx+15,y=tly+ypos-50,h=50,w=50,file="~/wun/additional_files/red+x.png"})
--print (day[i].weather_icon)
--END OF REPEAT CODE######################################################################
end--of loop##############################################################################

--SECOND COLUMN############################################################################
--SECOND COLUMN############################################################################
--SECOND COLUMN############################################################################
--output plain text --setup loop--set start number
local start_number=1--renamed to start number as that makes more sense, also now that hours can be repeated, or anything else
--set end number
local end_number=5
--set x position, right justify text to this position
local rjx=550
--set topmost y coordinate
local topy=75
--set vertical distance between repeats
local ygap=170
--set vertical gap between lines
local lgap=15
--set coordinates for repeat
top_left_xcoordinate[1]=rjx
top_left_ycoordinate[1]=topy
top_left_xcoordinate[2]=rjx
top_left_ycoordinate[2]=topy+(ygap*1)
top_left_xcoordinate[3]=rjx
top_left_ycoordinate[3]=topy+(ygap*2)
top_left_xcoordinate[4]=rjx
top_left_ycoordinate[4]=topy+(ygap*3)
top_left_xcoordinate[5]=rjx
top_left_ycoordinate[5]=topy+(ygap*4)
--########################################################################################
for i=start_number,end_number do --start of day repeat, do not edit ######################
tlx=top_left_xcoordinate[i-(start_number-1)]--gets tlx coordinate for each repeat
tly=top_left_ycoordinate[i-(start_number-1)]--gets the coordinate for each repeat
--########################################################################################
out({hj="r",c=0x87CEFA,x=tlx-6,y=tly-14,txt="Civil Twilight"})
out({hj="r",c=0x87CEFA,x=tlx,y=tly,txt="Begins & Ends:"})
tly=tly+lgap
out({hj="r",x=tlx,y=tly,txt="Sun Rise/Set:"})
tly=tly+lgap
out({hj="r",x=tlx,y=tly,txt="Sun Transit:"})
tly=tly+lgap
out({hj="r",x=tlx,y=tly,txt="Moon Rise:"})
tly=tly+lgap
out({hj="r",x=tlx,y=tly,txt="Moon Transit:"})
tly=tly+lgap
out({hj="r",x=tlx,y=tly,txt="Moon Set:"})
tly=tly+lgap
out({hj="r",x=tlx,y=tly,txt="Moon Phase:"})
tly=tly+lgap
out({hj="r",x=tlx,y=tly,txt="Visible Moon:"})
end--plain text repeat loop--]]

--[output values --setup loop--set start number
--need to empty the tables
--top_left_xcoordinate={}
--top_left_ycoordinate={}
local start_number=1--renamed to start number as that makes more sense, also now that hours can be repeated, or anything else
--set end number
local end_number=10
--set x position for first column, left justify text to this position
local ljx1=rjx+10
--set x position for first column, left justify text to this position
local ljx2=ljx1+120
--set topmost y coordinate
local topy=75--keep this coordinate, but apply a negative to get day name and date in the loop
--set vertical distance between repeats
local ygap=ygap--stays the same
--set vertical gap between lines
local lgap=15--stays the same
--set coordinates for repeat
--1st row group, 2nd & 3rd column, same y different x
top_left_xcoordinate[1]=ljx1
top_left_ycoordinate[1]=topy
top_left_xcoordinate[2]=ljx2
top_left_ycoordinate[2]=topy
--2nd row group, 2nd & 3rd column, same y different x
top_left_xcoordinate[3]=ljx1
top_left_ycoordinate[3]=topy+(ygap*1)
top_left_xcoordinate[4]=ljx2
top_left_ycoordinate[4]=topy+(ygap*1)
--3rd row group, 2nd & 3rd column, same y different x
top_left_xcoordinate[5]=ljx1
top_left_ycoordinate[5]=topy+(ygap*2)
top_left_xcoordinate[6]=ljx2
top_left_ycoordinate[6]=topy+(ygap*2)
--4th row group, 2nd & 3rd column, same y different x
top_left_xcoordinate[7]=ljx1
top_left_ycoordinate[7]=topy+(ygap*3)
top_left_xcoordinate[8]=ljx2
top_left_ycoordinate[8]=topy+(ygap*3)
--5th row group, 2nd & 3rd column, same y different x
top_left_xcoordinate[9]=ljx1
top_left_ycoordinate[9]=topy+(ygap*4)
top_left_xcoordinate[10]=ljx2
top_left_ycoordinate[10]=topy+(ygap*4)
--########################################################################################
for i=start_number,end_number do --start of day repeat, do not edit ######################
tlx=top_left_xcoordinate[i-(start_number-1)]--gets tlx coordinate for each repeat
tly=top_left_ycoordinate[i-(start_number-1)]--gets the coordinate for each repeat
--########################################################################################
tly=tly-15
out({hj="l",c=0xFFD700,x=tlx,y=tly,txt=day[i].weekday_short.." "..day[i].day_pad.." "..day[i].monthname_short})
tly=tly+lgap
out({hj="l",x=tlx,y=tly,txt=day[i].begin_civil_twilight.." / "..day[i].end_civil_twilight})
tly=tly+lgap
out({hj="l",x=tlx,y=tly,txt=day[i].sunrise.." / "..day[i].sunset})
tly=tly+lgap
out({hj="l",x=tlx,y=tly,txt=day[i].sun_transit})
tly=tly+lgap
out({hj="l",x=tlx,y=tly,txt=day[i].moonrise[1].." / "..day[i].moonrise[2]})
tly=tly+lgap
out({hj="l",x=tlx,y=tly,txt=day[i].moon_transit[1]})
tly=tly+lgap
out({hj="l",x=tlx,y=tly,txt=day[i].moonset[1].." / "..day[i].moonset[2]})
tly=tly+lgap
out({hj="l",x=tlx,y=tly,txt=day[i].moon_phase})
tly=tly+lgap
out({hj="l",x=tlx,y=tly,txt=day[i].moon_visible.."%"})
end--data repeat loop--]]
--########################################################################################

--[[testing section
timestable={
["00:00"]={},
["00:20"]={},
["00:40"]={},
["01:00"]={},
["01:20"]={},
["01:40"]={},
["02:00"]={},
["02:20"]={},
["02:40"]={},
["03:00"]={},
["03:20"]={},
["03:40"]={},
["04:00"]={},
["04:20"]={},
["04:40"]={},
["05:00"]={},
["05:20"]={},
["05:40"]={},
["06:00"]={},
["06:20"]={},
["06:40"]={},
["07:00"]={},
["07:20"]={},
["07:40"]={},
["08:00"]={},
["08:20"]={},
["08:40"]={},
["09:00"]={},
["09:20"]={},
["09:40"]={},
["10:00"]={},
["10:20"]={},
["10:40"]={},
["11:00"]={},
["11:20"]={},
["11:40"]={},
["12:00"]={},
["12:20"]={},
["12:40"]={},
["13:00"]={},
["13:20"]={},
["13:40"]={},
["14:00"]={},
["14:20"]={},
["14:40"]={},
["15:00"]={},
["15:20"]={},
["15:40"]={},
["16:00"]={},
["16:20"]={},
["16:40"]={},
["17:00"]={},
["17:20"]={},
["17:40"]={},
["18:00"]={},
["18:20"]={},
["18:40"]={},
["19:00"]={},
["19:20"]={},
["19:40"]={},
["20:00"]={},
["20:20"]={},
["20:40"]={},
["21:00"]={},
["21:20"]={},
["21:40"]={},
["22:00"]={},
["22:20"]={},
["22:40"]={},
["23:00"]={},
["23:20"]={},
["23:40"]={},
}

s="05:20"
local intable=loadstring("return timestable[\""..s.."\"]")()
	if intable then
	loadstring("return table.insert(timestable[\""..s.."\"],10)")()
	else
	--print ("not found")
	end
--]]
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--########################################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################

2014_01_13_12_02_50_1920x1080_Sector11.jpg

Last edited by Sector11 (2014-01-13 18:49:32)


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

Offline

#189 2014-01-13 01:46:22

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

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:

OOTB iweather.lua w/ background images a-la-falldown.

@mrpeachy
If you notice in my scrots the location time is 14:20:47 but the system time is 4:10 in one and 4:12 in the other.
Also the temp according to wunderground.com site had droped to 55.
I have wun_config.lua settings at

developer_mode=0,
key="my_key",--get the Cumulus Plan 
tries=3,
interval=300,
location="38343",
language="EN",--set langauge here

it dosen't seem to be updating unless I killall and restart.

Ive been tweaking iweather.lua a bit, some of the text is scrunched and ive been moving things around

the update time shown in the top bar is straight from the api, no other modifications, so could just be an oops on the part of wu

im not sure what you mean about the temp dropping to 55

as for the script not updating...
just to check, have you altered the wunluarc and changed the conky update interval?

do you have the latest wun archive?

why dont you think it isnt updating?
are you launching the script from a terminal?
you should see all the messages as wun.lua downloads and processes the data

do you only ever get 1 set of messages?

Offline

#190 2014-01-13 02:37:39

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

Ive been tweaking iweather.lua a bit, some of the text is scrunched and ive been moving things around

the update time shown in the top bar is straight from the api, no other modifications, so could just be an oops on the part of wu

im not sure what you mean about the temp dropping to 55

as for the script not updating...
just to check, have you altered the wunluarc and changed the conky update interval?

do you have the latest wun archive?

why dont you think it isnt updating?
are you launching the script from a terminal?
you should see all the messages as wun.lua downloads and processes the data

do you only ever get 1 set of messages?

Yes sir latest UPDATE and FIX 01/10/14 @14:30 archive.
No changes to wunrci or anything other than what I needed to get things running.
Except the changes to iweather.lua (to make falldown's images work) and dropping the interval to 300 like I posted above.
I ran in terminal at first to check for errors and then logged off and ran from autostart.

(sleep 3s && conky -c ~/wun/wunrci) &

Then left for a few hours and made the scrots that I posted.
In that time the temp had dropped 5 degrees here according to the wu website.
The time in the upper right changes every minute with system time but nothing else changes.
Hope this helps if there are any bugs in the script and not just a wu glitch.
I know I couldn't find them if there were, without really messing thing up. 8o


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

#191 2014-01-13 02:38:48

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

Re: Wun Weather Script for Conky (Lua)

if you ever wonder about any of the data you see in wun, you can copy the url from the terminal and paste it into a web browser.  then you will get the raw data from the api in the browser

Offline

#192 2014-01-13 02:48:44

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

Re: Wun Weather Script for Conky (Lua)

there does appear to be a bug, the script is activating at the given interval BUT it is sending the wrong api key so not getting data back and the script is running saved data

i think i know why, ill post a fix in a minute

Offline

#193 2014-01-13 02:54:30

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

Re: Wun Weather Script for Conky (Lua)

the problem was on line 329, 332 and 340
i have fixed it in the current archive

the variable "key" appears in those lines
when the script runs the variable key first holds the api key obtained from the config,

but then the "key" variable is getting overwritten and set to 1 which is then being used as the api key

change those instances of "key" in those 3 lines (not in the plain text between quotes)

to keyok like this

	keyok=0 
	print ("key not found")
	else 
	keyok=1 
	end
	if string.find(wdataraw,"No cities match your search query") then 
	location=0
	print ("location not found") 
	else 
	location=1 
	end
	if find==1 and keyok==1 and location==1 then
	

Thanks Joe for catching this one!!

Offline

#194 2014-01-13 03:01:55

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

Thanks Joe for catching this one!!

With all you do I'm just glad I can do something to contribute. smile
U Beeez Da-Man! lol


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

#195 2014-01-13 03:45:32

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

Re: Wun Weather Script for Conky (Lua)

nope still not fixed yet, did the same thing with location!
lines 336 to 341, change location to locationok

	locationok=0
	print ("location not found") 
	else 
	locationok=1 
	end
	if find==1 and keyok==1 and locationok==1 then

:8  :8  8.(

fixed in archive

Last edited by mrpeachy (2014-01-13 03:48:25)

Offline

#196 2014-01-13 04:07:29

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

Re: Wun Weather Script for Conky (Lua)

you can go here for the "testing" version of wun
http://crunchbang.org/forums/viewtopic. … 37#p354937

the wun.lua in the test archive should replace any existing wun.lua without any issues
then you get the moon phase shading option  smile

Offline

#197 2014-01-13 05:23:50

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

you can go here for the "testing" version of wun
http://crunchbang.org/forums/viewtopic. … 37#p354937

the wun.lua in the test archive should replace any existing wun.lua without any issues
then you get the moon phase shading option  smile

Worked as usual, like a charm.
As they say around here.
U B D Chit! big_smile


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

#198 2014-01-13 22:00:23

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Wun Weather Script for Conky (Lua)

A little more progress on the text wrap iweather template..
Screenshot_from_2014_01_13_13_48_45.jpg
I have to say that it looks pretty cool..  big_smile

Also working on new icons.

Offline

#199 2014-01-13 22:07:11

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

Re: Wun Weather Script for Conky (Lua)

falldown wrote:

A little more progress on the text wrap iweather template..
http://s29.postimg.org/lejxnqihf/Screenshot_from_2014_01_13_13_48_45.jpg
I have to say that it looks pretty cool..  big_smile

Also working on new icons.

and i would have to agree!

once you are done it would make a great showcase for wun  big_smile
ill put it in the archive is that is OK with you!

one change i would make
have the dates drawn and aligned separately to the day name abbreviations on the right

you can also change the colors of the buttons

Offline

Be excellent to each other!

#200 2014-01-13 22:22:18

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Wun Weather Script for Conky (Lua)

That would be great Peachy.
I'm not going to use the draw function with the buttons.. it just helps me keep things aligned.  big_smile

I was wanting to do something about the alignment of the dates.. now I have something to fix that.. Thank you Sir.

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