SEARCH

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

You are not logged in.

#1 2014-01-07 01:10:26

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

Wun Weather Script for Conky (Lua)

OFFICIAL WUN TOPIC
CREDIT: http://www.wunderground.com is the source of the API weather data
wundergroundLogo_4c_horz.jpg
you need to register for a wunderground api key
http://www.wunderground.com/weather/api

CURRENT COMPLETE ARCHIVE: 02/08/14

NOTE - the complete archive is 14.4MB which is mostly due to icons
go to this page to get the basic wun archive and then you can add additional icon sets as you want
http://crunchbang.org/forums/viewtopic. … 19#p360919

NOTE2 - check below to see if you need an updated wun.lua script
if the below date is older than the date above then the complete archive is the most recent

WUN.LUA SCRIPT: 04/06/14

NOTE - wun.lua is the main script that gathers and formats the data and contains all the functions that are used in the templates
As such, most changes/updates/bug fixes will occur in this file.  New wun.lua scripts can then be extracted and the old script overwritten.  The wun.lua script will always work with the latest complete archive, if it's date is the same or newer.
NOTE2 - the wun.lua script archive also contains the most current read_me file

Screenshot_from_2014_01_22_15_48_59.jpg
CREDIT - thank you to falldown for his amazing artwork and continued contributions to this project
http://falldown-aka-chris.deviantart.com/gallery/

--changelog
04/06/14
- fixed bug that broke moon drawing function when moon phase was waning gibbous and moon illumination was 100%
03/26/14
- added uvi color change function, 04/06/14 fixed bug in uv color change when uv=0
03/16/14
- corrected bug that when weather data cannot be downloaded 3 times, astronomy data is also not downloaded and subsequent attempts to download do not work, possibly seen after turning ping check off
- added ability to skip ping check
- added the optional savetoimage functionality
OLDER
- fixed more missing icons due to typos ops
- added some missing icons
- added additional icon set
- reworked how wun uses icons
- preliminary alerts options
updated wun.lua
- removed update dot so that long conky update_intervals can be used
- improvements to code
fix - when opening files to read/write had not closed them again in a couple of locations
added - preliminary day length data option
fix - correct drawing of first quarter moon
fix - indicator setting in config , 0 now turns all dots off
fix - error that made days 8,9 and 10 moon data NA
new - includes shadow text option, see this post http://crunchbang.org/forums/viewtopic. … 21#p358321
fix - script only downloads new astronomy data when saved data is not current

###########################################################

WUN HOW TO: 
How to use the out() function
http://crunchbang.org/forums/viewtopic. … 38#p354938

How to use the image() fuction
use is unchanged from v9000 (only data option names have changed)
http://crunchbanglinux.org/forums/post/177785/#p177785

How to use the repeats feature
http://crunchbang.org/forums/viewtopic. … 39#p354939

A couple of tricks for formatting
http://crunchbang.org/forums/viewtopic. … 23#p358223

How to use your own icons
http://crunchbang.org/forums/viewtopic. … 93#p360593

Interactive templates see here
http://tiny.cc/8izlmw

#############################################################
OTHER LINKS

additional_functions.lua

http://crunchbang.org/forums/viewtopic. … 41#p354941

History of wun
http://crunchbang.org/forums/viewtopic. … 40#p354940

Last edited by mrpeachy (2014-04-06 16:58:35)

Offline

Be excellent to each other!

#2 2014-01-07 01:35:07

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

Re: Wun Weather Script for Conky (Lua)

WUN TESTING POST

get the latest wun archive here
contains thing that are in progress so may not be fully finished!

NEW TESTING ARCHIVE  1/17/14
https://dl.dropboxusercontent.com/u/190 … ing.tar.gz
use with caution! big_smile

New filesystem in the wun folder (let me know if you think this helps or it was better the other way!)
I thought that thw folder was becoming a little cluttered and i kept opening the wrong files
so I have compartmentalized all the different bits and pieces
- all paths are correct in wunrc and wunrci in the conky_configs folder

In wun.lua you can now easily set the path to the wun folder if it is not in the home directory at the top of the script

New settings in config
setting to use extended icons, use no longer dependent on setting EN as language
setting to specify text when things are NA
setting to change how the moon preceding and following data is formatted

CHANGE IN OPTION NAMES and additional options
these affect the daily moon options
as follows, from read_me:

day[1].moonrise_24_pad		=>10:54 --moonrise during the specified 24 hours, can be NA if there is no rise during the specified 24 hours
day[1].moonrise_24		=> same as 24_pad but single hour units not padded with 0
day[1].moonrise_12_pad		=> time in 12 hour format, hour zeros padded
day[1].moonrise_12		=> time in 12 hour format, hour zeros not padded
day[1].moonrise_ampm		=> AM , AM or PM
day[1].moonset_24_pad		=>22:49P --moonset during the specified 24 hours, can be NA if there is no rise during the specified 24 hours
day[1].moonset_24		=> same as 24_pad but single hour units not padded with 0
day[1].moonset_12_pad		=> time in 12 hour format, hour zeros padded
day[1].moonset_12		=> time in 12 hour format, hour zeros not padded
day[1].moonset_ampm		=> AM , AM or PM
day[1].moon_transit_24_pad	=>17:20 --moon transit during the specified 24 hours, can be NA if there is no rise during the specified 24 hours
day[1].moon_transit_24		=> same as 24_pad but single hour units not padded with 0
day[1].moon_transit_12_pad	=> time in 12 hour format, hour zeros padded
day[1].moon_transit_12		=> time in 12 hour format, hour zeros not padded
day[1].moon_transit_ampm	=> AM , AM or PM
--ADDITIONAL MOON DATA WHEN THERE ARE PRECEDING AND FOLLOWING TIMES
--can be helpful when viewing a single day of data to get complete picture of the moons activities
day[1].moonrise_additional_24_pad	=>11:28P --moon rise, in this case on the preceding day, can be NA or on following day
day[1].moonrise_additional_24		=> same as 24_pad but single hour units not padded with 0
day[1].moonrise_additional_12_pad	=> time in 12 hour format, hour zeros padded
day[1].moonrise_additional_12		=> time in 12 hour format, hour zeros not padded
day[1].moonrise_additional_ampm		=> AM , AM or PM
day[1].moonset_additional_24_pad	=>23:28F --moon set, in this case on the following day, can be NA or on preceding day
day[1].moonset_additional_24		=> same as 24_pad but single hour units not padded with 0
day[1].moonset_additional_12_pad	=> time in 12 hour format, hour zeros padded
day[1].moonset_additional_12		=> time in 12 hour format, hour zeros not padded
day[1].moonset_additional_ampm		=> AM , AM or PM
day[1].moon_transit_additional_24_pad	=>23:58P --moon transitin, in this case on the preceding day, can be NA or on following day
day[1].moon_transit_additional_24	=> same as 24_pad but single hour units not padded with 0
day[1].moon_transit_additional_12_pad	=> time in 12 hour format, hour zeros padded
day[1].moon_transit_additional_12	=> time in 12 hour format, hour zeros not padded
day[1].moon_transit_additional_ampm	=> AM , AM or PM

includes all fixes below
----------------------------------------------------------------
TESTING ARCHIVE - minor update
https://dl.dropboxusercontent.com/u/190 … ing.tar.gz
fixed astronomy indicator not changing color

fixes moon shade error
update indicator now works correctly
NOTE - replacement wun.lua has been added to archive below
----------------------------------------------------------------------------------------------------------
files affected:
wun.lua: script optimization
wicons folder: discovered typos in the name of an icon which prevented it from being displayed
wun_config.lua: better descriptions for config options
templates: all precip, rain and snow data options now display to 2 decimal places, 0.00 when 0
IMPORTANT - change in data option name!
now.weather is changed to now.conditions to bring it in to line with all the other conditions data options
-------------------------------------------------------------------------------------------------------
Files affected
wun.lua, should replace any existing wun.lua without breakage
wun.config.lua - i had to integrate the status indicator into the wun.lua script, so it needs to be setup in the config
new lines added to config:

--[[set script status settings- indicator consists of 3 dots side by side
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
--]]
indicator=1,--set 1 for on, 0 for off
indicator_x=50,--center of first indicator
indicator_y=50,--center of first indicator
indicator_r=10,--radius of indicator dot
indicator_gap=24,--gap between center of dots

they need to go somewhere inside the setting table, i put them right after the ping millisecond setting
remember that any changes made in wun_config.lua will NOT take effect until conky is killed and restarted

New - try out the sun and moon path feature, currently set up in wun_template.lua

sun_moon_path({x=10,y=200})

-------------------------------------------------------------------------------------------------------
Contains the latest fix for the update problem

New:  Moon Phase Shading
File affected: wun.lua, wun_template.lua

wun.lua containes the new code to draw the moon shades
wun_template.lua contains a few things under development smile

replace existing wun.lua with the wun.lua in this archive and everything will still run normally

how to use the moon shade function:

draw_moon({day=1,size=50,x=mx+25,y=my+25,moon_icon=1,a=0.8})

day is the day to show
size is the size of the moon, diameter
x,y coordinates of center of moon
moon_icon, set 1 for script to use a picture of the moon with black shading over the non visible part.  set 0 for the script to draw a representation of the moon in white on a black background

azi and alt data is only gathered on the startup run for now

Last edited by mrpeachy (2014-01-18 02:20:29)

Offline

#3 2014-01-07 01:36:23

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

Re: Wun Weather Script for Conky (Lua)

WUN HOW TO:  How to use the out() function

Using the out function is like putting together a jigsaw, rather than the conkyrc analogy of writing a letter

the function "out" is how you get the lua script to display text and weather data
it takes the form out({options})
to break it down:

out - names the function to use
what is inside the curved brackets () is the information we are sending to the out function
curly brackets deignate a table in lua
they are inside the curved brackets ({})

in the table are the options, these are:
c=color (eg 0xffffff for white)
a=alpha (eg 1 for full opaque, 0 for full transparent)
f=font (eg "Mono" font name has to be in quotes)
fs=font size (eg 12)
x=x position (eg 100 sets output 100 pixels in from left edge)
y=y position (eg 100 sets output 100 pixels down from top)
txt=text or data to show (more about txt later)
face="normal" (can be "normal","bold","italic","bolditalic")
hj="c" (horizontal justify relative to set x position, can be l=left, c=center, r=right, default is l)
vj="n" (vertical adjust relative to set y position, can be n=normal, nb=normal-ybearing, m=middle, mb=middle-ybearing, t=top, default is n)
ro=45 (rotation in degrees)
wrap_len=50 (default=0  When wrap_len is set the function will output the text wrapped at the set number of characters)
wrap_gap=15 (this is the line height for when the wrapped text is output, default=15)

NOTE
wrap setting are useful for these settings
text_forecast[1].fctext
text_forecast[1].fctext_metric
as they output long sections of text

So we want to show the text

Hello World

in Mono font at size 12, fully opaque white at coordinates 100 across,100 down
we need this

out({c=0xffffff,a=1,f="mono",fs=12,x=100,y=100,txt="Hello World"})

in a lua table entries must be seperated by a comma ,
a missing comma will give an error!

NOTE in the settings at the top you set these values:
default_font="mono"--font must be in quotes
default_font_size=10
default_color=0xffffff--white
default_alpha=1--fully opaque

because of these settings, if you want your output in the default, you dont need to set the values each time for the out function
using the above settings
out({x=100,y=100,txt="Hello World"})
will use the default settings for color,alpha,font and font size etc
if you want something other than the defualt then sending the value to the out function overwrites the default

NOTE about txt
txt can be one of 2 things or a combination of both
1.  plain text eg

Weather Forecast

plain text must be in quotes, so:
txt="Weather Forecast"

2.  weather data, eg you want to show current conditions

Mostly Sunny

this is generated from a lua data option, in this case now["conditions"]
data options are called without quotes, so:
txt=now.weather

3.  Plain text and weather data, eg you want the following

Feels like temp: 35 °F

the text

Feels like temp: 

is plain text
the number

35

is generated from a data option
and the

 °F 

is plain text

the code for this is
txt="Feels like temp: "..now.feelslike_f.." °F"

here we use a double period .. to stitch the different parts of the line together
if we wanted to put together 2 different data options seperated by a space
for example wind direction in degrees and wind direction in NESW

txt=now.wind_degrees.." "..now.wind_dir
the space is required to be input as plain text in quotes and returns

135 SW

without the space we still need the .. to put the eperate data options together
txt=now.wind_degrees..now.wind_dir
but it would look like this

135SW

using x and y to set output position

this is perhaps the greatest inconvenience to showing text via a lua script
but while it may take more effort to get text on the screen this way, I have always found lua to be much more efficient at displaying text
especially when you are using lots of gotos and voffsets in the conkyrc

and with some tricks text positioning can be made much easier

say you want a table like so, lets say that we want everything to be in our default font, font size and alpha
part2table.jpg

to make that table there are 9 elements to call and place
1 main title
4 sub titles
4 data outputs with following °F

we want the text  Temperatures  to start at 20 across 20 down

out({x=20,y=20,c=0xffff00,txt="Temperatures"})

note x=20,y=20 are the coordinates of the bottom left corner of the text
we could do the rest like this, i like to use comments to help me remember what im doing
a comment in lua is started with --
we want the sub title text to line up on the left at x=20 (across)
and the weather data to line up at x=160 (across)

then we will need to set y (down) values for each line, and match the y values from the sub titles to the data

--titles column
out({x=20,y=45,c=0xff0000,txt="Feels Like: "})
out({x=20,y=60,c=0xff0000,txt="Wind Chill: "})
out({x=20,y=75,c=0xff0000,txt="Heat Index: "})
out({x=20,y=90,c=0xff0000,txt="Dew Point: "})
--weather data column
out({x=160,y=45,c=0x0000ff,txt=now.feelslike_f.."°F"})
out({x=160,y=60,c=0x0000ff,txt=now.windchill_f..now.windchill_f_unit})
out({x=160,y=75,c=0x0000ff,txt=now.heatindex_f..now.heatindex_f_unit})
out({x=160,y=90,c=0x0000ff,txt=now.dewpoint_f.."°F"})

NOTE
you can see that for feelslike i follwed the data call with the unit hard coded

txt=now.feelslike_f.."°F"

This is becasue feels like temperature is always a number.
Some data options, like windchill and heatindex are sometimes NA.
If the unit was hardcoded after windchill:

txt=now.windchill_f.."°F"

and windchill was NA then the output would be:

NA°F

which doesnt make a lot of sense.
To compensate for options being NA the script provides or hides the unit as follows:

out({x=160,y=60,c=0x0000ff,txt=now.windchill_f..now.windchill_f_unit})

When windchill is a number (not NA) then:

36°F

When windchill is NA then:

NA

But say we didnt like the spacing, we would have to go back and recalculate and input each y value
but to make things easier we can use calculations like this,

--titles column
lgap=15--set how much gap, in pixels, between lines
gap=20+lgap--the first line, Temperatures, was set at x=20, so the next line is at 20+lgap, gap=45
out({x=20,y=gap,c=0xff0000,txt="Feels Like: "})
gap=gap+lgap--calculate new gap by adding lgap to the previous gap value of 45, gap=60
out({x=20,y=gap,c=0xff0000,txt="Wind Chill: "})
gap=gap+lgap--calculate new gap by adding lgap to the previous gap value of 60, gap=75
out({x=20,y=gap,c=0xff0000,txt="Heat Index: "})
gap=gap+lgap--calculate new gap by adding lgap to the previous gap value of 75, gap=90
out({x=20,y=gap,c=0xff0000,txt="Dew Point: "})
--weather data column
gap=20+lgap--reset gap value to 45
out({x=160,y=gap,c=0x0000ff,txt=now.feelslike_f.."°F"})
gap=gap+lgap
out({x=160,y=gap,c=0x0000ff,txt=now.windchill_f..now.windchill_f_unit})
gap=gap+lgap
out({x=160,y=gap,c=0x0000ff,txt=now.heatindex_f..now.heatindex_f_unit})
gap=gap+lgap
out({x=160,y=gap,c=0x0000ff,txt=now.dewpoint_f.."°F"})

now if we dont like the spacing, we only need adjust lgap and everything else will adjust accordingly
for both the titles column and the data column

it also means you can rearrange the order of lines quite easily without having to reset the y value for each

NOTE setting gap= sets a variable in lua which should ideally be preceded by local like so

local gap=gap+gap

this helps with such things as minimizing the potential for memory leaks
but isnt absolutely necessary smile

another method would be to preset your variables then use them lower down in the code

--set x values, need 2 for 2 columns
x1=20
x2=160
--set y values, need 4 for the 4 lines
y1=45
y2=60
y3=75
y4=90
--titles column
out({x=x1,y=y1,c=0xff0000,txt="Feels Like: "})
out({x=x1,y=y2,c=0xff0000,txt="Wind Chill: "})
out({x=x1,y=y3,c=0xff0000,txt="Heat Index: "})
out({x=x1,y=y4,c=0xff0000,txt="Dew Point: "})
--weather data column
out({x=x2,y=y1,c=0x0000ff,txt=now.feelslike_f.."°F"})
out({x=x2,y=y2,c=0x0000ff,txt=now.windchill_f..now.windchill_f_unit})
out({x=x2,y=y3,c=0x0000ff,txt=now.heatindex_f..now.heatindex_f_unit})
out({x=x2,y=y4,c=0x0000ff,txt=now.dewpoint_f.."°F"})

now you can adjust the preset x and y values in one place and have the text reposition accordingly

the use of calculations and the ability to set variables adds a lot of flexibility to the code.

archive in first post now contained updated wun.lua with shadow options in out function
and fixed wrap function
with the wrap function, now the minimum wrap length will be the length of the longest word in the text being wrapped.

NEW FEATURE added
when using out for regular text you can now use it to set a variable that is the x coordinate of where the text ends

this is useful for follow on text, as the variable will adjust with the changing length of the text

nextx=out({c=0x000000,x=100,y=100,txt="some text in black "})
out({c=0xffffff,x=nextx,y=100,txt="this white text will always follow on"})

if you want a string of text but want to apply different formats to different parts of the text then this is how you can do it

ADDENDUM

There are a couple of things to be aware of when using this feature
1.  for some reason the cairo_show_text function, that draws the text to the conky window, ignores leading white space
so txt="some text" and txt=" some text" will start at the same place
however, when calculating the length of the text all spaces are included
2. you have to always add spaces to the END of the previous bit of text

nx=300
ny=300
nx=out({x=nx,y=ny,txt="today is "})
nx=out({c=0xff0000,x=nx,y=ny,txt=day[1].weekday.." "})
nx=out({c=0xff00ff,x=nx,y=ny,txt=day[1].day.." "})
nx=out({c=0xffff00,x=nx,y=ny,txt="of "})
nx=out({c=0xff00ff,x=nx,y=ny,txt=day[1].monthname})

Last edited by mrpeachy (2014-01-30 21:45:08)

Offline

#4 2014-01-07 01:39:06

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

Re: Wun Weather Script for Conky (Lua)

using the forecast day repeat

One useful feature of WUN is the ability to use loops.
The type of loop used in a template is the for loop.

You may want to display forcast data for the next 10 days and most likely the format for each
day will look like the format for every other day:

Using loops you only need to set the format ONCE then you can simply repeat the same format
for each successive forecast day or hour (up to 10 days, 36 hours) without having to type any
extra code,

This is the repeat section from the current script

top_left_x_coordinate[1]=10
top_left_y_coordinate[1]=10
start_number=1
end_number=10
--########################################################################################
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] #############

--END OF REPEAT CODE######################################################################
end--of loop##############################################################################

think about the repeats section working like a grid

Screenshot_from_2014_01_16_15_35_30.png

The first you need to set is the top left x and y coordinates of each "cell"
at the top of the template there are these lines:

--these tables hold the coordinates for each repeat do not edit #########
top_left_xcoordinate={}--################################################
top_left_ycoordinate={}--################################################

these tables are where we are going to store our coordinates

Set coorindates like this:

--cell 1, xy1
top_left_x_coordinate[1]=0
top_left_y_coordinate[1]=0
--cell 2, xy2
top_left_x_coordinate[2]=100
top_left_y_coordinate[2]=0
--cell 3, xy3
top_left_x_coordinate[3]=0
top_left_y_coordinate[3]=100
--cell 4, xy4
top_left_x_coordinate[4]=100
top_left_y_coordinate[4]=100

In the above each cell is 100 pixels wide by 100 pixels high

You can setting x and y on the same line, separated by commas like this also:

top_left_x_coordinate[1],top_left_y_coordinate[1]=0,0

In lua

a,b=x,y

is the same as

a=x
b=y

what you are actually doing with the code:

top_left_x_coordinate[1]=0

is making an entry, at position 1 in this case, in the table "top_left_x_coordinate"

Now that the coordinates are set, next we need to specify what is to be repeated.
If you want the first day, or hour, shown to be day or hour 1 then set:

start_number=1

If you want the first day, or hour, shown to be day or hour 4 then set:

start_number=4

Then you set which day or hour you want to end with

end_number=10

So, if i wanted to display forecast data for 4 days, sarting on day 1 and ending on day 4
then set:

start_number=1
end_number=4

The next thing to look at is the repeating loop
a blank loop would look like this:

--########################################################################################
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] #############

--END OF REPEAT CODE######################################################################
end--of loop##############################################################################

The first line

for i=start_number,end_number do

takes the variable i and sets the value of i to every number from the value of start_number
to the value of end_number

So in our example
start_number=1
end_number=4

So the loop sets i to every number from 1 to 4 (inclusive)

start loop
1st pass, i=1
2nd pass, i=2
3rd pass, i=3
4th pass, i=4
end of loop,repeat loop next cycle

This is an extremely useful piece of code and when used correctly can really cut down on the amount of typing you need to do!

data options for forecast days and hours are all in the format:
period[n].data_option,
where n is a number from 1 to 10 (for forecast days) or from 1 to 36 (for forecast hours)

So this code:

print (day[1].weekday)
print (day[2].weekday)
print (day[3].weekday)
print (day[4].weekday)

has the same output as this code:

for i=1,4 do
print(day[ i ].weekday) --i had to add spaces between [ and i and ] in order to post
end

For example

Monday
Tuesday
Wednesday
Thursday

The next lines:

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 ##

are reading the entries that we put into the tables called
"top_left_x_coordinate" and "top_left_y_coordinate" and setting them to the variables "tlx" and "tly"
they also compensate for when the start_number is not 1 so that the first repeat, no matter
what the start_number is, will always be drawn to the coordinates set for top_left_x_coordinate[1]
and top_left_y_coordinate[1]


so on the first pass of the for loop:
i=1 so tlx=0 and tly=0
becasue we set our coordinates earlier here:

top_left_x_coordinate[1]=0
top_left_y_coordinate[1]=0

so once we understand what is going on within the for loop, we can see how the following line would work inside the loop:

out({x=tlx+0,y=tly+20,txt=day[ i ].weekday})

on the 1st pass
i=1
tlx=0
tly=0

so in effect we have written this:
(replacing all instances of i with 1 in the ist pass)

out({x=0+0,y=0+20,txt=day[1].weekday})

and we get the day name for forecast day 1 at coordinates 0,20

on the 2nd pass of the loop
i=2
tlx=top_left_x_coordinate[2] -- so tlx=100
tly=top_left_y_coordinate[2] -- so tly=0
(remember we set top_left_x_coordinate[2],top_left_y_coordinate[2]=540,15)

so we now have

out({x=100+0,y=0+20,txt=day[2].weekday})

and we get the day name for forecast day 2 at coordinates 100,20

and so on and so forth until we get all our day names shown at their positions relative to the coordinates we set earlier.

NOTE
in order for the repetition to work the x,y coordinates must be set relative to tlx and tly inside the loop
this will be for both the out({}) and image({}) functions
and instead of calling forecast day number directly we use i inside the square brackets

out({x=[b]tlx+0[/b],y=[b]tly+20[/b],txt=day[[b] i[/b] ].weekday})

Otherwise we can use the out and image functions as described elsewhere.

The repeat function will, perhaps, be the trickiest to get to grips with if you are unfamiliar with writing code.

A bit more complicated, but making editing and positioning even easier

With a bit of planning and some simple math we can easily control the positioning with just a few variables!

Look at our grid again:

Screenshot_from_2014_01_16_15_35_30.png

We have 2 rows and 2 columns, but we arent sure exactly what we are putting into the cells yet
so the sizing and position may change.  And we may want to move the grid away from 0,0, the very top left of the conky window

First set the start position for x and y
Next set column width and the row height:

x_start=0
y_start=0
column_width=100
row_height=100

Then setup the top left coordinates using those numbers

--cell 1, xy1
top_left_x_coordinate[1]=x_start
top_left_y_coordinate[1]=y_start
--cell 2, xy2
top_left_x_coordinate[2]=x_start+column_width
top_left_y_coordinate[2]=y_start
--cell 3, xy3
top_left_x_coordinate[3]=x_start
top_left_y_coordinate[3]=y_start+row_height
--cell 4, xy4
top_left_x_coordinate[4]=x_start+column_width
top_left_y_coordinate[4]=y_start+row_height

Now when we adjust any of these:

x_start=0
y_start=0
colum_width=100
row_height=100

all of our coordinates will change accordingly without any additional editing

Other things you can do

With a bit of figuring out you can do a lot with the repeat loops
This for example:

local x_start=0
local y_start=0
local column_width=100
row_height=100
--cell 1, xy1
top_left_x_coordinate[1]=x_start
top_left_y_coordinate[1]=y_start
--cell 2, xy2
top_left_x_coordinate[2]=x_start+column_width
top_left_y_coordinate[2]=y_start
--set start and end
start_number=1
end_number=2
--########################################################################################
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({t=tlx,y=tly,txt="DAY "..i.." IS "..day[i].weekday.." DAY "..i+1.." IS "..day[i+1].weekday})
--END OF REPEAT CODE######################################################################
end--of loop##############################################################################

This will generate 2 repeats:

DAY 1 IS Monday DAY 2 IS Tuesday                  DAY 2 IS Tuesday DAY 3 IS Wednesday

One potential problem with the above!
if you set up your loop for all 10 days, it would work until pass 10 in the loop

On pass 10:
i=10
so
day[10].weekday=Wednesday
BUT
i+1=11
and
day[11].weekday does not exist!

The script will stop with an error on that line about calling a nil value
you could solve it like this:

--########################################################################################
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] #############
weekdayplusone=day[i+1].weekday
if weekdayplusone==nil then
weekdayplusone="Some Other Day"
end
out({t=tlx,y=tly,txt="DAY "..i.." IS "..day[i].weekday.." DAY "..i+1.." IS "..})
--END OF REPEAT CODE######################################################################
end--of loop##############################################################################

this way on our tenth pass in the loop we would get

DAY 10 IS Wednesday DAY 11 is Some Other Day

If statements are another really useful aspect of constructing the template in code!!

Last edited by mrpeachy (2014-01-16 22:08:30)

Offline

#5 2014-01-07 01:41:07

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

Re: Wun Weather Script for Conky (Lua)

WUN HISTORY

Wun appears to be working well and free from bugs big_smile
This will be the stable release version of wun! (I hope devil )
In this archive there are some changes to how the script works and some changes to a few data option names
Files affected:
wun.lua - saved astronomy data is checked and if current the script will not download new data.  This makes things much faster during restarts and updates
templates - see the read_me for complete list of data options
changes affect astronomy data.
Moon data has been reorganized
all astronomy data has additional time format options


For the "testing" version of wun go here http://crunchbang.org/forums/viewtopic. … 37#p354937
the current archive above is more recent than the testing archive!

MAJOR UPDATE!!  01/16/2014 @11:19 am
Since the latest wun archive appears to be problem free for the time being I am changing the current archive to the most recent archive.
Files affected:
1. wun.lua - many changes, fixes and optimization
NOTE - If you have an existing wun archive you will be able to replace your existing wun.lua with the wun.lua in the archive above without issue EXCEPT

now.weather

has been changed to

now.conditions

NOTE - additional data options are available, read the read_me file for the list

2. wun_config.lua - new options
if you have an existing wun archive review the settings in your wun_config.lua against the config in the above archive
new astronomy setting to this archive:

Astronomy=1,

Set to 1 for script to download astronomy data, set to 0 if you dont intend to use astronomy data
for other changes refer to the testing post for a cumulative list:
http://crunchbang.org/forums/viewtopic. … 37#p354937

###############################################################################
FIX 01/12/14 @21:40
Files affected:
1.  wun.lua only
fix for script not updating weather data correctly

UPDATE and FIX 01/10/14 @14:30
Files affected:
edit - data option name change, added imperial as below

text_forecast[1].fctext_imperial
text_forecast[1].fctext_metric

1.  wun.lua - replace existing
Fixed missing code so that sun and moon data is now saved to file
2.  IMPORTANT - templates
Any data option that began astronomy[1], for example, astronomy[1].sunrise, giving sunrise on forecast day 1
CHANGED to be part of day data.  day[1].sunrise now gives sunrise on forecast day 1
a simple find "astronomy" replace with "day" should be all you need
It just makes more sense!
3. developer_mode setting added to config, not necessary as wun.lua default to normal mode
if you want to run in developer mode, add

developer_mode=1

into the settings table in the config.
When set to 1 the script does not download data, it only uses previously saved data

BIG UPDATE 01/10/14 @11:30
https://dl.dropboxusercontent.com/u/190 … wun.tar.gz
If you have an existing wun setup you will need
1.  to copy the folder backup_data into your wun folder
2.  overwrite wun.lua with the update from the archive
3. optional - edit config to set a ping ms value, defualt is 1000
4. optional - copy over iweather.lua that has the typo fixed
From config:

--[[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,

Changes:
- wun.lua now pings wunderground before trying to download, if the ping fails it will load data from a previous download
if the ping succeeds new data is downloaded and written to a file.  Each new update overwrites the last.
- wun does the same thing for the USNO site where it gets astronomy data

mini update 01/09/14 @13:00
https://dl.dropboxusercontent.com/u/190 … wun.tar.gz
1. This update only affects iweather.lua template
template updated to new data options names, template is imperial/metric switchable
2. new files in wun folder
wunrc launches wun running wun_template.lua
wunrci launches wun running iweather.lua template and button script


UPDATE 01/08/14 @21:00
This update affects:
1.  Templates: changed data options for easy switching between imperial and metric systems
see this post for details:
http://crunchbang.org/forums/viewtopic. … 91#p355391
existing templates can easily be modified by find/replace
NOTE - be careful about replacing _f and _c as other things will be affected also!!
--note: in the archive only wun_template.lua is updated to work with the new options smile  i will get around to doing the others soon!
2.  wun.lua: updated code
3. wun_config.lua:  added options to set the units involved with the imperial and metric systems
if you have an existing wun_config.lua , then instead of replacing it, you can edit it like so:
In existing wun.config.lua you have these lines:

unitf="°F",
unitc="°C",

replace those 2 lines with the following:

--imperial
unit_f			="°F",--fahrenheit
unit_in			=" in",--distance measurements
unit_in_pressure	=" inHg",--atmospheric pressure inches of mercury
unit_mph		=" mph",--miles per hour
unit_mi			=" miles",--miles, distance
--metric units
unit_c			="°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

edit the units to your liking, include spaces for formatting purposes

UPDATE AND FIX 01/08/14 @18:36
https://dl.dropboxusercontent.com/u/190 … wun.tar.gz
NOTE - update ONLY affects wun.lua and additional files, templates and config remain the same
open the archive and copy over the necessary parts instead of replacing everything
1. script compensates for api glitches that return different numbers of data
with the fix a 10 day template will still work even if the api only returns 7 days of data
the only difference is that the last 3 days will show "0" for all options, but there should be no errors
2.  found some additional weather descriptions and added them to the script

UPDATE AND FIX 01/08/14 @13:36
I am suddenly only getting 7 days of info from the wunderground api, the api description says 10, so it remains to be seen if this is a permanent change or just a hiccup
1.  patched script to work with however many days wunderground sends
NOTE - not optimal as templates that are calling text_forecasts or day information above 7 will break with errors as they will be expecting data but not getting it

BUG FIX 01/08/14 @01:07
1. Fixed error in data sent to USNO when getting sun and moon data

IMPORTANT UPDATE 01/07/14 @23:14 CST
1.  additional settings required in wun_config.lua to allow the user to point wun to other icon folder locations
2.  addition of data options, moon phase and moon % illuminated
3.  read_me updated describing all options

UPDATE  01/07/14 @ 15:43 CST
1. Fixed update problem where script says "key not found"
2. Added astronomy section
important, astronomy needs to be added to the list at the top of every template

--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function(update,time,now,text_forecast,day,hour,astronomy)

3. Fixed a couple of mistakes in the iweather.lua template

UPDATE  01/06/14 @ 21:43 CST
1. Added extended icon sets that uses the conditions text to generate the icon for more variety
Only available for English Language as it is dependent on matching words
Look in the wun.lua script starting line 120 to see all the possible conditions
2. Updated read_me to include all current options and an example of what each option gives
Work in progress writing descriptions for options

**mini update  01/06/14 @ 15:27 CST
changed "chance of" weather icons so they look nicer smile
Screenshot_from_2014_01_06_15_30_05.jpg

HOW TO POSTS
--taken from v9000 how to (listed in post 1), updated and options changed to match wun options
--most of the v9000 how to posts are still relevant to WUN.  The method for outputting text and pictures to conky has remained relatively unchanged.  Only the method of obtaining the data has changed.

Last edited by mrpeachy (2014-01-30 21:40:05)

Offline

#6 2014-01-07 01:42:41

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

Re: Wun Weather Script for Conky (Lua)

Additional_functions.lua

Here you can get the additional_files.lua script and a description of the functions and how to use them

script: https://dl.dropboxusercontent.com/u/190 … lua.tar.gz
put the script in ~/wun/additional_files/scripts

How to use the script in wunrc or wunrci:
just add this line above TEXT

lua_load ~/wun/additional_files/scripts/additional_functions.lua

I have mine like this, loaded after loading and activating wun.lua:

#######################################################################
# Lua Settings
# Load and run wun weather script -- hook_post
#######################################################################
lua_load ~/wun/wun.lua
lua_draw_hook_post weather
#######################################################################
# Load additional functions
#######################################################################
lua_load ~/wun/additional_files/scripts/additional_functions.lua
#######################################################################


FUNCTIONS

1.  thermometer()

Screenshot_from_2014_01_31_19_22_09.jpg

use in a template like this: (case is important)

R=20
Cx=40
Cy=400
iwidth=10
iheight=100
gap=5
max=120
min=-20
mid=50
scale=20
temp=day[1].high_imperial
thermometer(Cx,Cy,R,iwidth,iheight,gap,max,min,mid,scale,temp)

R is the radius of the indicator (ie colored) bottom circle
Cx and Cy are the center coordinates of the indicator bottom circle
iwidth is the indicator width, the width of the colored line that comes up from the circle
iheight is the height of the indicator line (bottom circle is additional to iheight to give total height)
gap is the gap between the inner colored indicator and the outline
max is the maximum temperature that the thermometer will show
min is the minimum temperature that the thermometer will show
mid is the midpoint value, in this case the value at which the thermometer will be yellow
scale is the size of the scale increments, set 0 for no scale markings
temp is the value which the thermometer will show


2.  weathermap_sat() and weathermap_radar()

(testing)
Screenshot_from_2014_02_15_12_35_28.jpg

You will need to create a folder within wun called "weathermaps"

to get the maps to download on startup put these lines at the very top of your template

getsatmap=1--fetches satellite map on startup and template resave
getradmap=1--fetches radar map on startup and template resave

NOTE - every use of either map uses 1 api call, so if you are developing a template and making lots of template saves, you may want to comment out the above lines until you are done and instead set a relatively short update interval in the weathermap settings

use in a template like this:

weathermap_sat({
update=120,--update interval in conky cycles
x=20,--map coordinates
y=350,--map coordinates
apikey="apikey",--yourapikey, using this function is an additional use of the api key
dloc=pathtowun.."weathermap/",--download location
lon=now.location_longitude,--longitude
lat=now.location_latitude,--latitude
rad=200,--radius of map data
w=400,--width of map
h=200,--height of map
unit="km",--units, "km" or "nm" (nautical miles)
stype="sat_ir4_bottom",--sat_ir4, sat_ir4_bottom (default), sat_vis, or sat_vis_bottom
gtt=107,--0 - 255 Ground temperature threshhold. Level to cutoff and leave transparent. 107 is a reasonable value to show clouds but hide land.
basemap=1,--show basemap, 1 or 0
sborder=1,--border, 1 or 0
smooth=1,--smooth colors 1 or 0
project="ll",--"ll" or "me"  Lat/lon projection or Mercator projection
label=1,--timelabel 1 or 0
ly=10,--label coordinates
lx=10,--label coordinates
})
weathermap_radar({
update=120,--update interval in conky cycles
x=20,--map coordinates
y=560,--map coordinates
apikey="apikey",--yourapikey, using this function is an additional use of the api key
dloc=pathtowun.."weathermap/",--download location
lon=now.location_longitude,--longitude
lat=now.location_latitude,--latitude
rad=200,--radius of map data
w=400,--width of map
h=200,--height of map
unit="km",--units, "km" or "nm" (nautical miles)
basemap=1,--show basemap, 1 or 0
rainsnow=1,--Use a different color palette to show rain/mix/snow. 1 or 0
smooth=1,--smooth colors 1 or 0
noclutter=1,--When you turn on "noclutter" (set noclutter=1) you remove the radar data that we know is not precipitation, 1 or 0 
label=1,--timelabel 1 or 0
ly=10,--label coordinates
lx=10,--label coordinates
})

after every entry you need a comma



3.  tweathergraph()

(testing)
IMPORTANT - this function will only work if you edit wun.lua
lines 77 and 78 remove the "local"

day={{},{},{},{},{},{},{},{},{},{}}
hour={{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}}

within the curly brackets:

weathergraph({})

add these settings, each setting has a default in the function

x=			--default 0	
y=			--default 0
c=			--line color default {0xffffff}
--line color for each line is set in a table, comma separated
--if you want the same color for each line, then just enter a single color
tab=		--default {"hour","precipitation"}
--first entry in table is the data table, either "hour" or "day"
--subsequent entries are the data options that you want displayed
lw=			--default {2}
--line width for each line is set in a table, comma separated
--if you want the same line width for each line, then just enter a value
div=		--number of divisions , default 10
min=		--data min value, default -20
max= 		--data max value, default 120
w=		--graph width, default 300
h= 	--graph height, default 50
label=		--x axis data points to show, in table, comma separated, default {}
bg=			--background on or off, default 1
bgc=		--background color, default 0x000000
bga=		--bg alpha, default 0.5
tc=			--text color, default 0xffffff
shadow=		--text shadow on or off, default 0
sc=			--shadow color, default 0x000000
sxo=		--shadow x offset, default 1
syo=		--y offset, default 1
grid=		--grid on or off, default 1
outline= 		--outine on or off, default 1

example:

weathergraph({shadow=1,sc=0x000000,sxo=1,syo=1,x=20,y=350,w=280,bgc=0x000000,bga=0.2,c={0x0000ff,0xff0000},lw={4},tab={"hour","temp_metric","dewpoint_metric"},div=36,min=0,max=10,label={4,8,12,16,20,24,28,32,36}})

Screenshot_from_2014_02_16_15_06_25.jpg

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

Offline

#7 2014-01-07 01:45:34

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

Re: Wun Weather Script for Conky (Lua)

how to placeholder

Offline

#8 2014-01-07 02:48:49

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

Re: Wun Weather Script for Conky (Lua)

OK!  I've subscribed and will be here tomorrow.

Thank you mrpeachy!


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

Offline

#9 2014-01-07 03:38:27

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

Re: Wun Weather Script for Conky (Lua)

I did a little more to the background.. should have this template finished tomorrow.

Offline

#10 2014-01-07 04:23:12

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

Re: Wun Weather Script for Conky (Lua)

The more I look at the text wrap feature.. the more I want to use it.
I think that I will whip up an interactive one tomorrow.
Peachy.. you da man!!

Offline

#11 2014-01-07 05:23:01

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

Re: Wun Weather Script for Conky (Lua)

im looking forward to what you come up with falldown!  smile

Offline

#12 2014-01-07 13:48:50

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

Re: Wun Weather Script for Conky (Lua)

A missing image: chancethunderstorm.png

My oops with images ...I changed it to:

/home/sector11/wun/additional_files/weathericons/wicons/

DUH!! dumb!! dumb!! dumb!!

Note to self: Leave well enough alone - at least when testing!

Still needs tweaking: 2014_01_07_10_38_30_380x660_Sector11.jpg


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

Offline

#13 2014-01-07 14:36:44

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

Re: Wun Weather Script for Conky (Lua)

This is a great How To thread, really explains a lot.
Thanks mrpeachy I'm subscribed. 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

#14 2014-01-07 15:29:22

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

Re: Wun Weather Script for Conky (Lua)

subscribed with interest...


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

Offline

#15 2014-01-07 17:39:50

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

Re: Wun Weather Script for Conky (Lua)

Anyone else having a problem with wun_template.lua going blank when it updates?
This is the new wun from the top of this thread, it restarts manually without errors but blanks on the next update.
I had the interval set to 300 (5 min.) that's only 288 times per 24 hr and even tried 600, scratching head. sad


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

#16 2014-01-07 21:22:19

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

Re: Wun Weather Script for Conky (Lua)

Here is what I have so far with the interactive text wrap..

Screenshot_from_2014_01_07_13_09_27.jpg

Still lots to do  big_smile


No issues here with updates Joe.

Last edited by falldown (2014-01-07 21:24:53)

Offline

#17 2014-01-07 21:42:27

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

Re: Wun Weather Script for Conky (Lua)

@jst_joe - i noticed that problem too, nothing to do with overusing your key
fixed in recent update

I found a reliable source for astronomy data, the US Navy smile

latest update includes 10 day astronomy section

Screenshot_from_2014_01_07_15_31_44.jpg

Offline

#18 2014-01-07 21:55:54

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

Re: Wun Weather Script for Conky (Lua)

^Thanks mrpeachy, I'm getting ready to give it a try.
I thought after falldown's post I messed something up (not hard for me and scripts) or was hallucinating. 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

#19 2014-01-07 22:20:46

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

Re: Wun Weather Script for Conky (Lua)

@ falldown

I like it ... will be a long while before I come up with a custom layout - just don't know enough about the interactive part yet.

BUT I WILL


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

Offline

#20 2014-01-07 22:23:13

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

Re: Wun Weather Script for Conky (Lua)

@ mrpeachy

Super --- anywhere in the world?

what is the F in Moonset?

EDIT:

Just realized, I have to start all over again!

And I'm still tweaking.  cry

Last edited by Sector11 (2014-01-07 22:27:47)


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

Offline

#21 2014-01-07 22:26:29

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

Re: Wun Weather Script for Conky (Lua)

@Sector11, it should be... the data is accessed by sending long/lat

re P and F in moonrise and moonset (and will sometime appear in transit)
P means on the previous day
F means on the following day

Offline

#22 2014-01-07 22:27:37

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

Re: Wun Weather Script for Conky (Lua)

Looking forward to seeing it S11  smile

Offline

#23 2014-01-07 22:28:09

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

Re: Wun Weather Script for Conky (Lua)

still some work to be done on the astronomy, and i need to describe the data options

Offline

#24 2014-01-07 22:28:38

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

@Sector11, it should be... the data is accessed by sending long/lat

re P and F in moonrise and moonset (and will sometime appear in transit)
P means on the previous day
F means on the following day

Ooooooooooo that makes sense  big_smile


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

Offline

Be excellent to each other!

#25 2014-01-07 22:34:55

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

still some work to be done on the astronomy, and i need to describe the data options

I can't wait I gotta try it!!!!


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
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: zapp

Debian Logo