SEARCH

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

You are not logged in.

#826 2014-03-21 01:10:21

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

Re: Wun Weather Script for Conky (Lua)

Offline

Help fund CrunchBang, donate to the project!

#827 2014-03-21 13:27:44

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Wun Weather Script for Conky (Lua)

Offline

#828 2014-03-27 03:27:28

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

Re: Wun Weather Script for Conky (Lua)

Last edited by mrpeachy (2014-03-27 04:41:29)

Offline

#829 2014-03-27 09:57:08

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

Re: Wun Weather Script for Conky (Lua)

Offline

#830 2014-04-04 01:39:06

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

Re: Wun Weather Script for Conky (Lua)

Last edited by mrpeachy (2014-04-04 02:22:16)

Offline

#831 2014-04-04 02:29:46

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

Re: Wun Weather Script for Conky (Lua)

Offline

#832 2014-04-04 02:36:24

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

Re: Wun Weather Script for Conky (Lua)

Last edited by mrpeachy (2014-04-04 02:42:10)

Offline

#833 2014-04-04 02:51:53

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

Re: Wun Weather Script for Conky (Lua)

The sounds right.  I'll have to look around ... but lets face it ... at First or Last Quarter ... is the line always a vertical line?

Do a search: Moon first quarter - and hit images.  No!  It's showing like you say.

Offline

#834 2014-04-04 04:26:06

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

Re: Wun Weather Script for Conky (Lua)

Offline

#835 2014-04-04 05:48:10

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

Re: Wun Weather Script for Conky (Lua)

--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function(update,time,now,text_forecast,day,hour,alerts)--#### DO NOT EDIT THIS LINE ##############
--#######################################################################
--these tables hold the coordinates for each repeat do not edit #########
top_left_xcoordinate={}--################################################
top_left_ycoordinate={}--################################################
--#######################################################################
ic=1
draw_moon({day=1,size=50,x=50,y=85,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
draw_moon({day=2,size=50,x=100,y=85,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
draw_moon({day=3,size=50,x=150,y=85,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
draw_moon({day=4,size=50,x=200,y=85,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
draw_moon({day=5,size=50,x=250,y=85,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
draw_moon({day=6,size=50,x=50,y=185,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
draw_moon({day=7,size=50,x=100,y=185,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
draw_moon({day=8,size=50,x=150,y=185,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
draw_moon({day=9,size=50,x=200,y=185,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
draw_moon({day=10,size=50,x=250,y=185,moon_icon=ic,a=0.75,c=0xffffff,bga=1,bgc=0x000000})--size,x,y,d,moon_icon,alpha,c
--]]
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--########################################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################

Offline

#836 2014-04-04 10:34:20

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Wun Weather Script for Conky (Lua)

most of the time use another lua-script (v9000). i only use the feaures of wun.lua if i want to display the actual moonphase.

is it possible to create a standalone function. within this function it should only download the neccessary datas it needs?

Last edited by lionhead (2014-04-04 10:35:12)

Offline

#837 2014-04-04 11:50:00

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

Re: Wun Weather Script for Conky (Lua)

Offline

#838 2014-04-04 13:42:18

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

Re: Wun Weather Script for Conky (Lua)

Offline

#839 2014-04-04 16:37:38

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

Re: Wun Weather Script for Conky (Lua)

Offline

#840 2014-04-06 15:25:08

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

Re: Wun Weather Script for Conky (Lua)

just fixed an error in the uvi color function when uv=0
fixed in current wun.lua archive

has anyone tested the moon drawing function?  its working for me but i want to make sure its working for others before i update the main archive  smile

Offline

#841 2014-04-06 15:28:49

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

Re: Wun Weather Script for Conky (Lua)

Offline

#842 2014-04-06 16:13:12

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

Re: Wun Weather Script for Conky (Lua)

not to worry, im having trouble with my moon, it may be that something changed in the data as i am getting an error that i havnt seen before

error is

llua_do_call: function conky_weather execution failed: /home/mcdowall/wun/wun.lua:1824: attempt to perform arithmetic on a nil value

grumble.  this is with the current wun.lua without the rotation addition

Offline

#843 2014-04-06 16:57:08

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

Re: Wun Weather Script for Conky (Lua)

this has been fixed in the main wun.lua archive

Offline

#844 2014-04-06 17:00:38

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

Re: Wun Weather Script for Conky (Lua)

Offline

#845 2014-04-06 17:27:44

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

Re: Wun Weather Script for Conky (Lua)

Offline

#846 2014-04-06 17:34:08

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

Re: Wun Weather Script for Conky (Lua)

lua_load /media/5/wun/wun_moon.lua
#lua_load /media/5/wun/wun.lua
lua_draw_hook_post weather

Last edited by Sector11 (2014-04-06 17:40:00)

Offline

#847 2014-04-06 17:51:08

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

Re: Wun Weather Script for Conky (Lua)

can you post the whole wun_config file, (dont post your key smile ) you may have accidentally deleted the } that closes the settings table

Last edited by mrpeachy (2014-04-06 17:51:38)

Offline

#848 2014-04-06 18:08:01

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

Re: Wun Weather Script for Conky (Lua)

--SETTINGS AND PREFERENCES--SETTINGS AND PREFERENCES--SETTINGS AND PREFERENCES
function weather_settings()--#### DO NOT EDIT THIS LINE ###
--#########################################################
--[[NOTE NOTE NOTE
Any changes made to these settings will not take effect until conky
has been killed and recycled!
--]]
settings={--OPENS SETTINGS TABLE, DO NOT EDIT
--[[
savetofile can significanty reduce cpu drain with complex weather setups
works with STATIC templates only
will not work with satellite maps yet
will work with graphs and other functions
numbers within brackets are as follows
{onoff,tlx,tly,width,height}
onoff is 1 or 0 (1 to activate save) 1 on | 0 off
tlx,tly are the top left x and y coordinates of the conky window that contains the weather template
width and height are the size of the weather section in the conky
if save to image is turned on then template will ONLY update on wun updates
NOT on template save
]]
--savetoimage={1,0,0,600,400},
savetoimage={0,0,0,110,915},
--[[
the free wunderground api has a usage limit, while it is unlikely that the daily limit
of 500 will be met, the minute limit of 10 is quite possible to exceed while in development
set 1 below to force the script to use saved data and prevent downloading new data
set 0 for normal behavior.  In devloper mode all indicator dots will be red
--]]
developer_mode=0,
--[[
Go to http://www.wunderground.com/weather/api/
get the Cumulus Plan or above, key must be in quotes
--]]
key="a-no-no_not-for-online",								-- the Cumulus Plan
--[[
script will ping sites before download to see if site is responding, see further down
in the config.  but even if a site is responding a slow internet connection can cause
curl, the program that downloads the data, to time out.  Set how many attempts the script
make to download the data before falling back to saved data.
--]]
tries=3,
--[[
time between updates.  it is important to note that the value set below will be
multiplied by the value of update_interval set in the conky config file.
If conky updates every second, then the number set below will be in seconds
If conky updates every minute (update_interval 60) then the number below will be in minutes
--]]
interval=120,
--[[
LOCATION
from http://www.wunderground.com/weather/api/d/docs?d=data/index
--options for entering location
location="CA/San_Francisco",	--US state/city
location="60290",				--US zipcode
location="Australia/Sydney",	--country/city
location="37.8,-122.4",			--latitude,longitude
location="KJFK",				--airport code
location="autoip",				--AutoIP address location
location="pws:KCASANFR70",		--PWS id
pws means personal weather station
go here to pick your pws:
http://www.wunderground.com/weatherstation/about.asp
--]]
--location="autoip",					--	Location - See: --[[NOTES below
--location="zmw:00000.1.87582",			--	Location - See: --[[NOTES below
--location="Argentina/Buenos_Aires",	--	Location - See: --[[NOTES below
--location="pws:ICIUDADA11",			-- Saavedra, Cap Fed, BsAs
--location="pws:IBUENOSA110",			-- BELGRANO R, Cap Fed, BsAs
--location="pws:IBUENOSA157",			-- Palermo, Cap Fed, BsAs
--location="pws:ICABABUE10",			-- Recoleta, Cap Fed, BsAs
--location="pws:ICABABUE2",				-- Villa Urquiza, Cap Fed, BsAs
--location="pws:IBUENOSA75",			-- Colegiales, Cap Fed, BsAs
--location="pws:IBUENOSA149",			-- Villa Martelli, Greater BsAs
--location="SAEZ"						--SAEZ Ezeiza International
location="SABE"						--SABE Aeroparque Jorge Newberry
--location="pws:EDSB"					--Karlsruhe/Baden, DE (Old CFE Baden-Söllingen)
--location="pws:IBADENWR63"				--Karlsruhe/Baden, DE (Old CFE Baden-Söllingen)
--[[
LANGUAGE OPTIONS
http://www.wunderground.com/weather/api/d/docs?d=language-support
--]]
language="EN",--must be in quotes
--[[
Do you want astronomy data?
wun.lua has the ability to fetch sun and moon rise and set data for 10 days
it can also fetch azimuth and altitude data for 36 hours.
If you do not intend to use this kind of data then set 0 or set 1 to activate
--]]
astronomy=1,
--[[
wun.lua can use an extended set of icons based on weather conditions text.
this is limited to language EN.  There are 2 choices foe extended icons, see below.
set 1 below if you want to use extended icons, 0 if you dont
--]]
use_extended_icons=1,
--[[
In the wun folder icons are seperated by type.
Use the following lines to point to the folders of your choice
you can have them all pointing at the same folder also
NOTE in the template you can set a default that overrides these settings
--]]
--the following icon sets have basic and extended sets
weather_icons		="/media/5/wun/additional_files/weathericons/icons_wun/",
--icon sets below need to be added to ~/wun/additional_files/weathericons/
--weather_icons		="/media/5/wun/additional_files/weathericons/icons_falldown/",
--weather_icons		="/media/5/wun/additional_files/weathericons/icons_falldown_mono/",
--weather_icons		="/media/5/wun/additional_files/weathericons/icons_merlinthered_colorful/",
--weather_icons		="/media/5/wun/additional_files/weathericons/icons_merlinthered_dark/",
--weather_icons		="/media/5/wun/additional_files/weathericons/icons_merlinthered_flat_black/",
--weather_icons		="/media/5/wun/additional_files/weathericons/icons_merlinthered_flat_colorful/",
--weather_icons		="/media/5/wun/additional_files/weathericons/icons_merlinthered_light/",
--weather_icons		="/media/5/wun/additional_files/weathericons/icons_merlinthered_white/",
--weather_icons		="/media/5/wun/additional_files/weathericons/icons_tick/",
--[[
credit to the icon artists
falldown - http://falldown-aka-chris.deviantart.com/gallery/
tick icons by xiao4 - http://xiao4.deviantart.com/art/tick-weather-icons-96294478
merlinthered - http://merlinthered.deviantart.com/art/plain-weather-icons-157162192
--]]
wind_icons			="/media/5/wun/additional_files/weathericons/wind/",
moon_icons			="/media/5/wun/additional_files/weathericons/moon/",
--[[SET UNITS
Sometimes weather options gathered from the api are NA so units are not required.
For those options that can be NA the script can generate units when the option
is not NA and hide the units when it is.  Example:
now.windchill_f can be NA
now.windchill_f_unit shows or hides the unit.  Use in the out function like so
txt=now.windchill_f..now.windchill_f_unit
Set how you would like the units to appear:
This section may need to be updated as the script matures
--]]
--imperial
unit_f				="°",--fahrenheit
unit_in				="\"",--inches, distance measurements
unit_in_pressure	="\"",--atmospheric pressure inches of mercury, to use a " sign enter as "\""
unit_mph			=" mph",--miles per hour
unit_mi				=" mi",--miles, distance
--metric units
unit_c				="°",--celsius
unit_mm				=" mm",--millimeters, used for rain
unit_cm				=" cm",--centimeters, used for snow
unit_pressure_mb	=" mb",--atmospheric pressure millibars=hectopascals
unit_kph			=" kph",--kilometers per hour
unit_km				=" km",--kilometers, distance
--set how you would like NA results to appear
NA_text				="NA",
--set how you would like precedig and following days to be indicated
--in additional moon rise and set options
moon_preceding		="-",
moon_following		="+",
--[[PING SETTINGS
The updated script uses PING to test if the weatherunderground and usno sites are responding
set below the time in milliseconds that equals a successful test.  The default is 1000ms.
If you are not sure how many ms to enter, try this in a terminal a few times:
"ping www.wunderground.com -q -c 1"
you will see a line like this in the output:
"2 packets transmitted, 2 received, 0% packet loss, time 0ms"
1000 should be plenty to test if a site is responding
--]]
--ms=1000,

ms=1000,

--[[ INDICATOR SETTINGS
set script status settings- indicator consists of 3 dots side by side
ALL RED - see line 15 - you are in Developer Mode using old data.
1st is update indicator,
    green when script is running,
    turns yellow when script is updating
2nd weather data indicator:
    green if using current data,
    yellow if using backup data once
    red if using backup data more than once
3rd same as weather data but for astronomy data
--]]
--    x = l|r      y = u|d

-- ↓↓↓↓ INTERACTIVE ↓↓↓↓ INTERACTIVE ↓↓↓↓ INTERACTIVE ↓↓↓↓ INTERACTIVE ↓↓↓↓

--[[ iweather_falldown.lua -- CLOSE THE GAP TO COMMENT OUT
indicator=1,      --set 1 for on, 0 for off
indicator_x=25,   --center of first indicator
indicator_y=73,   --center of first indicator
indicator_r=3,    --radius of indicator dot
indicator_gap=50, --gap between center of dots
--]]
--[[ iweather.lua -- CLOSE THE GAP TO COMMENT OUT - for S11
indicator=1,      --set 1 for on, 0 for off
indicator_x=174,  --center of first indicator
indicator_y=405,  --center of first indicator
indicator_r=3,    --radius of indicator dot
indicator_gap=10, --gap between center of dots
--]]
--[[ iweather_joe.lua -- OPEN THE GAP TO UNCOMMENT
indicator=1,      --set 1 for on, 0 for off
indicator_x=174,  --center of first indicator
indicator_y=395,  --center of first indicator
indicator_r=3,    --radius of indicator dot
indicator_gap=10, --gap between center of dots
--]]
-- ↑↑↑↑ INTERACTIVE ↑↑↑↑ INTERACTIVE ↑↑↑↑ INTERACTIVE ↑↑↑↑ INTERACTIVE ↑↑↑↑
-- ↓↓↓↓   STATIC    ↓↓↓↓   STATIC    ↓↓↓↓   STATIC    ↓↓↓↓    STATIC   ↓↓↓↓
-- CLOSE THE GAP TO COMMENT OUT -- OPEN TO UNCOMMENT
--[[ wun_glassy_side_bar.lua & s11-vert_wun_template
indicator=1,--set 1 for on, 0 for off
indicator_x=30,--center of first indicator
indicator_y=124,--center of first indicator
indicator_r=3,--radius of indicator dot
indicator_gap=080,--gap between center of dots
--]]
--[[ Classic10day.lua
indicator=1,--set 1 for on, 0 for off
indicator_x=190,--center of first indicator
indicator_y=15,--center of first indicator
indicator_r=3,--radius of indicator dot
indicator_gap=15,--gap between center of dots
--]]
--[[ s11_small_h.lua
indicator=1,--set 1 for on, 0 for off
indicator_x=085,--center of first indicator
indicator_y=05,--center of first indicator
indicator_r=3,--radius of indicator dot
indicator_gap=15,--gap between center of dots
--]]
--[[ astroweather.lua
indicator=1,      --set 1 for on, 0 for off
indicator_x=15,   --center of first indicator
indicator_y=10,   --center of first indicator
indicator_r=3,    --radius of indicator dot
indicator_gap=10, --gap between center of dots
--]]
--[[ s11_Vertical.lua
indicator=1,      --set 1 for on, 0 for off
indicator_x=35,   --center of first indicator
indicator_y=180,   --center of first indicator
indicator_r=3,    --radius of indicator dot
indicator_gap=40, --gap between center of dots
--]]
--[[ S11_wun_Vsm.lux
indicator=1,      --set 1 for on, 0 for off
indicator_x=010,   --center of first indicator
indicator_y=205,   --center of first indicator
indicator_r=3,    --radius of indicator dot
indicator_gap=75, --gap between center of dots
--]]
--[[ S11_wun_Vlg.lux
indicator=1,       --set 1 for on, 0 for off
indicator_x=30,    --center of first indicator
indicator_y=180,   --center of first indicator
indicator_r=3,     --radius of indicator dot
indicator_gap=40,  --gap between center of dots
--]]
--[ [ mp_wun.circles.lua
indicator=1,       --set 1 for on, 0 for off
indicator_x=205,   --center of first indicator
indicator_y=345,   --center of first indicator
indicator_r=3,     --radius of indicator dot
indicator_gap=90,  --gap between center of dots
--]]

-- ↑↑↑↑   STATIC    ↑↑↑↑   STATIC    ↑↑↑↑   STATIC    ↑↑↑↑    STATIC   ↑↑↑↑

--[[SET USER TEXT
The script outputs the weather conditions set by wunderground.
If you would like to represent conditions in a different way, for example to
shorten a condition that is too long, you can set an alternates here.
Like so:
["Original Condition"]="my alternate condition",
The format of the original condition must match exactly
To access the user generated conditions, use like so in a template:
now.conditions_user
--]]
conditions_user={--OPENS TABLE, DO NOT EDIT
["Original Condition"]="my alternate condition",
["Chance of a Thunderstorm"]="Possible T-Storm",
["Thunderstorm and Rain"]="T-Storm & Rain",
["Thunderstorms and Rain"]="T-Storms & Rain",
},--CLOSES CONDITIONS_USER TABLE, DO NOT EDIT
--END OF SETTINGS############################
}--CLOSES SETTINGS TABLE, DO NOT EDIT #######
--###########################################
return settings--############################
--###########################################
end--OF SETTINGS AND PREFERENCES ############
--###########################################

Offline

#849 2014-04-06 18:29:54

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

Re: Wun Weather Script for Conky (Lua)

found the problem, you had missed -- to comment out this line, 76 or there abouts

location="SABE"						--SABE Aeroparque Jorge Newberry

Offline

Be excellent to each other!

#850 2014-04-06 19:34:20

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

Re: Wun Weather Script for Conky (Lua)

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: bleh

Debian Logo