Re: weather in conky (LUA scripts)

mrpeachy wrote:

@falldown - looks good
with minimalizm... im like sector11... i try... but it never seems to stay minimal smile

good to know ive been useful big_smile

MrPeachy.. I read your post on here and your blog. Us here at #! are lucky to have you around!!

I don't think its that I go for minimalism.. cause honestly I love all the informative info that your v9000 can grab from Intellacast..(wind speed, cloud elevation, sunrise/set, on and on).

Perhaps I should run dual monitors so that I can have one screen dedicated for just your v9000 masterpiece!! big_smile
 
S11 is a magician. He has all that information in such an organized yet small portion of his screen.

Last edited by falldown (2012-02-16 01:06:03)

I'm pretty sure that zombies really do exist...
MrPeachy's v9000      Sector11's Conky PitStop      My Gallery

Re: weather in conky (LUA scripts)

falldown wrote:

S11 is a magician. He has all that information in such an organized yet small portion of his screen.

I do? Where? Ohhhhhhhhh down the side, yea but that's one of three conkys there, there is also the BIG weather (now in it's own window) on Desktop 2 and a Calendar-Reminder List and Birthday-Anniversary counter conky along with the sun/moon-rise/set times conky on Desktop 3.

Not Minimal At All!

Desktop 1
http://thumbnails65.imagebam.com/17504/59f60c175032841.jpg

Desktop 2
http://thumbnails53.imagebam.com/17504/91e647175032847.jpg

Desktop 3
http://thumbnails32.imagebam.com/17504/2e1536175032858.jpg

{sigh} someday - minimal ... maybe

And there are a whole bunch more that open in windows like the large weather conky!

Problem is I have to fix the links in OpenBox now as I moved ALL of the ones that are not my regular run daily conkys.

Like this one - 2012 Let's meet for a coffee!
http://thumbnails26.imagebam.com/17504/d51913175033879.jpg

I have way too many conkys.!!

You don't need another monitor, just another desktop.  big_smile

Last edited by Sector11 (2012-02-16 02:42:31)

Re: weather in conky (LUA scripts)

^very cool S11.. The Birthday and Anniversary Conky is nice. I see that you and MrPeachy help keep conky pitstop up and running (one of my bookmarks).

@MrPeachy I'm thinking of creating a weather icon theme. I will put a few together and post them to get your opinion.

I'm pretty sure that zombies really do exist...
MrPeachy's v9000      Sector11's Conky PitStop      My Gallery

Re: weather in conky (LUA scripts)

falldown wrote:

^very cool S11.. The Birthday and Anniversary Conky is nice. I see that you and MrPeachy help keep conky pitstop up and running (one of my bookmarks).

@MrPeachy I'm thinking of creating a weather icon theme. I will put a few together and post them to get your opinion.

ill look forward to it

re conky pitstop, thats all sector11 i think smile

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

Re: weather in conky (LUA scripts)

Heres what I've put together so far. (still a work in progress)
http://omploader.org/tY3UxYw

I'm pretty sure that zombies really do exist...
MrPeachy's v9000      Sector11's Conky PitStop      My Gallery

Re: weather in conky (LUA scripts)

mrpeachy wrote:

re conky pitstop, thats all sector11 i think smile

Yea, and I've been super lax too.  sad

Re: weather in conky (LUA scripts)

falldown wrote:

Heres what I've put together so far. (still a work in progress)
http://omploader.org/tY3UxYw

OH ... MY ... Gaw ... Gaw ... Goatee!!!  big_smile
Beautiful!!!!!!!!!!!!!!!!!!!!!!!!!

Re: weather in conky (LUA scripts)

@falldown
looking good
it should be a simple process of altering the image conversion table in v9000 to display custom image sets
the most difficult part was working out what some of the intellicast icons were supposed to be so i could match up the conkyforecast images

that table could do with some comments describing what each weather icon is
something ive been thinking about doing anyway

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

Re: weather in conky (LUA scripts)

mrpeachy wrote:

@falldown
looking good
it should be a simple process of altering the image conversion table in v9000 to display custom image sets
the most difficult part was working out what some of the intellicast icons were supposed to be so i could match up the conkyforecast images

that table could do with some comments describing what each weather icon is
something ive been thinking about doing anyway

It's done, in conkyForecast.py, add a 0 to numbers less than 10 and you have the corresponding image:

ie: conditions_text

"6": _(u"Mixed Rain and Sleet"), = see image: 06.png

    # translatable dictionaries
    conditions_text = {
        "0": _(u"Tornado"),
        "1": _(u"Tropical Storm"),
        "2": _(u"Hurricane"),
        "3": _(u"Severe Thunderstorms"),
        "4": _(u"Thunderstorms"),
        "5": _(u"Mixed Rain and Snow"),
        "6": _(u"Mixed Rain and Sleet"),
        "7": _(u"Mixed Precipitation"),
        "8": _(u"Freezing Drizzle"),
        "9": _(u"Drizzle"),
        "10": _(u"Freezing Rain"),
        "11": _(u"Light Rain"),
        "12": _(u"Rain"),
        "13": _(u"Snow Flurries"),
        "14": _(u"Light Snow Showers"),
        "15": _(u"Drifting Snow"),
        "16": _(u"Snow"),
        "17": _(u"Hail"),
        "18": _(u"Sleet"),
        "19": _(u"Dust"),
        "20": _(u"Fog"),
        "21": _(u"Haze"),
        "22": _(u"Smoke"),
        "23": _(u"Blustery"),
        "24": _(u"Windy"),
        "25": _(u"N/A"),
        "26": _(u"Cloudy"),
        "27": _(u"Mostly Cloudy"),
        "28": _(u"Mostly Cloudy"),
        "29": _(u"Partly Cloudy"),
        "30": _(u"Partly Cloudy"),
        "31": _(u"Clear"),
        "32": _(u"Clear"),
        "33": _(u"Fair"),
        "34": _(u"Fair"),
        "35": _(u"Mixed Rain and Hail"),
        "36": _(u"Hot"),
        "37": _(u"Isolated Thunderstorms"),
        "38": _(u"Scattered Thunderstorms"),
        "39": _(u"Scattered Showers"),
        "40": _(u"Heavy Rain"),
        "41": _(u"Scattered Snow Showers"),
        "42": _(u"Heavy Snow"),
        "43": _(u"Heavy Snow"),
        "44": _(u"N/A"),
        "45": _(u"Scattered Showers"),
        "46": _(u"Snow Showers"),
        "47": _(u"Isolated Thunderstorms"),
        "na": _(u"N/A"),
        "-": _(u"N/A")

    # font based character sets, untranslatable
    # ConkyWeather.ttf based output
    conditions_weather_font = {
        "0": u"1", #Tornado
        "1": u"2", #Tropical Storm
        "2": u"3", #Hurricane
        "3": u"n", #Severe Thunderstorms
        "4": u"m", #Thunderstorms
        "5": u"x", #Mixed Rain and Snow
        "6": u"x", #Mixed Rain and Sleet
        "7": u"y", #Mixed Precipitation
        "8": u"s", #Freezing Drizzle
        "9": u"h", #Drizzle
        "10": u"t", #Freezing Rain
        "11": u"h", #Light Rain
        "12": u"i", #Rain
        "13": u"p", #Snow Flurries
        "14": u"p", #Light Snow Showers
        "15": u"8", #Drifting Snow
        "16": u"q", #Snow
        "17": u"u", #Hail
        "18": u"w", #Sleet
        "19": u"7", #Dust
        "20": u"0", #Fog
        "21": u"9", #Haze
        "22": u"4", #Smoke
        "23": u"6", #Blustery 
        "24": u"6", #Windy
        "25": u"-", #N/A
        "26": u"f", #Cloudy
        "27": u"D", #Mostly Cloudy - night
        "28": u"d", #Mostly Cloudy - day
        "29": u"C", #Partly Cloudy - night
        "30": u"c", #Partly Cloudy - day
        "31": u"A", #Clear - night
        "32": u"a", #Clear - day
        "33": u"B", #Fair - night
        "34": u"b", #Fair - day
        "35": u"v", #Mixed Rain and Hail
        "36": u"5", #Hot
        "37": u"k", #Isolated Thunderstorms - day
        "38": u"k", #Scattered Thunderstorms - day
        "39": u"g", #Scattered Showers - day
        "40": u"j", #Heavy Rain
        "41": u"o", #Scattered Snow Showers - day
        "42": u"r", #Heavy Snow
        "43": u"r", #Heavy Snow
        "44": u"-", #N/A
        "45": u"G", #Scattered Showers - night
        "46": u"O", #Scattered Snow Showers - night
        "47": u"K", #Isolated Thunderstorms - night
        "na": u"-", #N/A
        "-": u"-" #N/A

    conditions_moon_font = {
        "0": u"1",
        "1": u"N",
        "2": u"O",
        "3": u"P",
        "4": u"Q",
        "5": u"R",
        "6": u"S",
        "7": u"T",
        "8": u"U",
        "9": u"V",
        "10": u"W",
        "11": u"X",
        "12": u"Y",
        "13": u"Z",
        "14": u"0",
        "15": u"0",
        "16": u"A",
        "17": u"B",
        "18": u"C",
        "19": u"D",
        "20": u"E",
        "21": u"F",
        "22": u"G",
        "23": u"H",
        "24": u"I",
        "25": u"J",
        "26": u"K",
        "27": u"L",
        "28": u"M",
        "29": u"1",
        "N/A": u"",
        "na": u"",
        "-": u""

    conditions_moon_icon
        "0": u"24",
        "1": u"01",
        "2": u"02",
        "3": u"03",
        "4": u"04",
        "5": u"05",
        "6": u"06",
        "7": u"07",
        "8": u"08",
        "9": u"09",
        "10": u"10",
        "11": u"11",
        "12": u"12",
        "13": u"13",
        "14": u"13",
        "15": u"13",
        "16": u"14",
        "17": u"15",
        "18": u"16",
        "19": u"17",
        "20": u"18",
        "21": u"19",
        "22": u"20",
        "23": u"21",
        "24": u"22",
        "25": u"23",
        "26": u"23",
        "27": u"23",
        "28": u"23",
        "29": u"24",
        "N/A": u"",
        "na": u"",
        "-": u""
    }
    
    # this now returns ascii code
    bearing_arrow_font = {
        "S": 0x31,
        "SSW": 0x32,
        "SW": 0x33,
        "WSW": 0x34,
        "W": 0x35,
        "WNW": 0x36,
        "NW": 0x37,
        "NNW": 0x38,
        "N": 0x39,
        "NNE": 0x3a,
        "NE": 0x3b,
        "ENE": 0x3c,
        "E": 0x3d,
        "ESE": 0x3e,
        "SE": 0x3f,
        "SSE": 0x40,
    }

    bearing_icon = {
        "calm": "00",
        "VAR": "01",
        "S": "05",
        "SSW": "06",
        "SW": "07",
        "WSW": "08",
        "W": "09",
        "WNW": "10",
        "NW": "11",
        "NNW": "12",
        "N": "13",
        "NNE": "14",
        "NE": "15",
        "ENE": "16",
        "E": "17",
        "ESE": "18",
        "SE": "19",
        "SSE": "20"

Re: weather in conky (LUA scripts)

thanks sector11,

the table that converts intellicast images to conkyforecast images starts around line 127

wimage={
wx_65="32",
wx_66="30",
wx_67="26",
wx_68="32",
wx_69="28",
wx_70="20",
wx_71="32",
wx_72="21",
wx_73="36",
wx_74="14",
wx_75="28",
wx_76="18",
wx_77="14",
wx_78="23",
wx_79="05",
wx_80="15",
wx_81="15",
wx_82="11",
wx_83="16",
wx_84="00",
wx_85="32",
wx_86="25",
wx_87="09",
wx_88="05",
wx_89="18",
wx_90="18",
wx_91="39",
wx_92="39",
wx_93="39",
wx_94="39",
wx_95="37",
wx_96="37",
wx_97="31",
wx_98="29",
wx_99="27",
wx_100="47",
wx_101="47",
wx_102="33",
wx_103="26",
wx_104="20",
wx_105="45",
wx_106="45",
wx_107="11",
wx_108="46",
wx_109="46",
wx_110="06",
wx_111="18",
wx_112="06",
wx_113="46",
wx_114="46",
wx_115="31",
wx_116="47",
}--end w image table

wx_116 is the name of the intellicast icon coming from the site, the numbers in quotes are the conkyforecast icons in the "weathericons" folder in "additional_files" (the script adds the path in front and .png after)

to make it easier, put any new images in that folder, as that is where the script looks for its icons
either replace the conkyforecast images (some of which are the same) or edit the table

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

Re: weather in conky (LUA scripts)

mrpeachy wrote:

that table could do with some comments describing what each weather icon is
something ive been thinking about doing anyway

Thank you. I did notice that Intellicast uses more variations with it's conditions.
I will put this theme in my dropbox when I'm done with it if you want to offer a few icon options with v9000.

edit: I have more icons to make.. the image I posted earlier was just what I have done so far.

Last edited by falldown (2012-02-18 03:22:21)

I'm pretty sure that zombies really do exist...
MrPeachy's v9000      Sector11's Conky PitStop      My Gallery

Re: weather in conky (LUA scripts)

Here it is with descriptions:

wimage={
wx_65="32",  -- Clear
wx_66="30",  -- Partly Cloudy
wx_67="26",  -- Cloudy
wx_68="32",  -- Clear
wx_69="28",  -- Mostly Cloudy
wx_70="20",  -- Fog
wx_71="32",  -- Clear
wx_72="21",  -- Haze
wx_73="36",  -- Hot
wx_74="14",  -- Light Snow Showers
wx_75="28",  -- Mostly Cloudy
wx_76="18",  -- Sleet
wx_77="14",  -- Light Snow Showers
wx_78="23",  -- Blustery
wx_79="05",  -- Mixed Rain and Snow
wx_80="15",  -- Drifting Snow
wx_81="15",  -- Drifting Snow
wx_82="11",  -- Light Rain
wx_83="16",  -- Snow
wx_84="00",  -- Tornado
wx_85="32",  -- Clear
wx_86="25",  -- N/A
wx_87="09",  -- Drizzle
wx_88="05",  -- Mixed Rain and Snow
wx_89="18",  -- Sleet
wx_90="18",  -- Sleet
wx_91="39",  -- Scattered Showers
wx_92="39",  -- Scattered Showers
wx_93="39",  -- Scattered Showers
wx_94="39",  -- Scattered Showers
wx_95="37",  -- Isolated Thunderstorms
wx_96="37",  -- Isolated Thunderstorms
wx_97="31",  -- Clear
wx_98="29",  -- Partly Cloudy
wx_99="27",  -- Mostly Cloudy
wx_100="47",  -- Isolated Thunderstorms
wx_101="47",  -- Isolated Thunderstorms
wx_102="33",  -- Fair
wx_103="26",  -- Cloudy
wx_104="20",  -- Fog
wx_105="45",  -- Scattered Showers
wx_106="45",  -- Scattered Showers
wx_107="11",  -- Light Rain
wx_108="46",  -- Snow Showers
wx_109="46",  -- Snow Showers
wx_110="06",  -- Mixed Rain and Sleet
wx_111="18",  -- Sleet
wx_112="06",  -- Mixed Rain and Sleet
wx_113="46",  -- Snow Showers
wx_114="46",  -- Snow Showers
wx_115="31",  -- Clear
wx_116="47",  -- Isolated Thunderstorms
}--end w image table

Re: weather in conky (LUA scripts)

hey! I was gonna do that... at some point... eventually big_smile

thanks once again sector11

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

Re: weather in conky (LUA scripts)

mrpeachy wrote:

hey! I was gonna do that... at some point... eventually big_smile

thanks once again sector11

sayz ... the man who said:

that table could do with some comments describing what each weather icon is something ive been thinking about doing anyway

along comes S11 with:

It's done, in conkyForecast.py, add a 0 to numbers less than 10 and you have the corresponding image:

the man said - waving a red flag

the table that converts intellicast images to conkyforecast images starts around line 127

S11, who is a Taurus, says:

Here it is with descriptions:

The Moral of this Story: Wave a red flag in front of a bull and he'll do anything.  lol

Sometimes co-operating can be fun!

Re: weather in conky (LUA scripts)

update in v9000 files

added in .v9000_config.lua a setting to turn alert checking on or off

--set alerts on or off, set to 0 so that the script does not check for alerts
--set 1 to check for alerts
local alert_check=1

removed alert option

alert_location[n]

added available options for the next 3 hour forecast

now["fc_hour3_cond_short"]
now["fc_hour3_cond_short_caps"]
now["fc_hour3_cond_short_lc"]

you can use these so that the text coming from intellicast for the 3 hour forecast is checked against the entries in the con_short table.  This allows the option to alter this text for translation or to set your own terms

see first post for the files

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

Re: weather in conky (LUA scripts)

@ sector11 can you please post the template for the large horizontal v9000 that you have on your Desktop2

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

Re: weather in conky (LUA scripts)

@S11 thank you for the table.

I'm pretty sure that zombies really do exist...
MrPeachy's v9000      Sector11's Conky PitStop      My Gallery

Re: weather in conky (LUA scripts)

mrpeachy wrote:

@ sector11 can you please post the template for the large horizontal v9000 that you have on your Desktop2

What, again?  Yea gotta stop deleting it (I'm kidding of course)  big_smile

h-template.lua

--[[
 The latest script is a lua only weather script. aka: v9000
 http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

 the file:
http://dl.dropbox.com/u/19008369/v9000.tar.gz

 mrppeachys LUA Tutorial
 http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Anonymous Pro:bold"--font must be in quotes
default_font_size=11
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
out({c=0x00BFFF,a=1,x=10,y=15,txt=now["date"].." "..now["month_short"].." "..now["year"]..": Fetched @ "..now["time"]})
image({x=20,y=20,h=40,w=40,file=now["weather_icon"]})
-- Temp / FeelsLike & CONDITIONS TEXT
out({c=0x48D1CC,a=1,f="Digital-7",fs=50,x=80,y=60,txt=now["temp"]})
out({c=0x00BFFF,a=1,f="Digital-7",fs=50,x=140,y=60,txt=now["feels_like"]})
out({c=0xA4FFA4,a=1,x=81,y=72,txt="Temp          WC · HI"})

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

-- data titles
--    data output 
datay=110   -- y=datay or
datayy=15   -- y=datay+(datayy*1) use 1 or more

out({c=0xFAFAEC,a=1,x=10,y=datay,txt="Wind Chill:"})
   out({c=0x48D1CC,a=1,x=70,y=datay,txt=now["wind_chill"].."°"})
out({c=0xFAFAEC,a=1,x=100,y=datay,txt="Heat Index:"})
   out({c=0xFF8C00,a=1,x=165,y=datay,txt=now["heat_index"].."°"})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*1),txt="Today's Hi·Lo:"})
   out({c=0xFF8C00,a=1,x=100,y=datay+(datayy*1),txt=high_temp[1].."°"})
   out({c=0x48D1CC,a=1,x=140,y=datay+(datayy*1),txt=low_temp[1].."°"})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*2),txt="Wind:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*2),txt=now["wind_km"]})
   out({c=0x48D1CC,a=1,x=110,y=datay+(datayy*2),txt=now["wind_nesw"]})
   out({c=0xFAFAEC,a=1,x=140,y=datay+(datayy*2),txt="@"})
   out({c=0x48D1CC,a=1,x=165,y=datay+(datayy*2),txt=now["wind_deg"]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*3),txt="Hum:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*3),txt=now["humidity"].."%"})
out({c=0xFAFAEC,a=1,x=110,y=datay+(datayy*3),txt="DP:"})
   out({c=0x48D1CC,a=1,x=145,y=datay+(datayy*3),txt=now["dew_point"].."°"})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*4),txt="Bar:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*4),txt=now["pressure_mb"]})
out({c=0xFAFAEC,a=1,x=110,y=datay+(datayy*4),txt="Vis:"})
   out({c=0x48D1CC,a=1,x=145,y=datay+(datayy*4),txt=now["visibility"]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*5),txt="Ceil:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*5),txt=now["ceiling"]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*6),txt="Precip:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*6),txt=precipitation[1].."%"})
out({c=0xFAFAEC,a=1,x=110,y=datay+(datayy*6),txt="Cloud:"})
   out({c=0x48D1CC,a=1,x=150,y=datay+(datayy*6),txt=cloud_cover[1].."%"})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*7),txt="UV:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*7),txt=uv_index_num[1]})
   out({c=0x48D1CC,a=1,x=110,y=datay+(datayy*7),txt=uv_index_txt[1]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*8),txt="Sun:"})
   out({c=0xFAFAEC,a=1,x=60,y=datay+(datayy*8),txt=sun_rise_lc[1]})
   out({c=0x48D1CC,a=1,x=120,y=datay+(datayy*8),txt=sun_set_lc[1]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*9),txt="Moon:"})
   out({c=0xFAFAEC,a=1,x=60,y=datay+(datayy*9),txt=moon_rise_lc[1]})
   out({c=0x48D1CC,a=1,x=120,y=datay+(datayy*9),txt=moon_set_lc[1]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*10),txt="Phase:"})
   out({c=0x48D1CC,a=1,x=55,y=datay+(datayy*10),txt=moon_phase[1]})

-- line
image({x=205,y=5,w=1,h=260,file="/home/sector11/Conky/images/cyan-1.png"})
-- 3 hour output
out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=12,x=220,y=15,txt="Next 3"})
out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=12,x=220,y=30,txt="Hours"})
-- 1st hour
out({c=0xA4FFA4,x=220,y=50,txt=now["fc_hour1_time"].."  "..now["fc_hour1_ampm"]})
image({w=30,h=30,x=223,y=55,file=now["fc_hour1_wicon"]}) -- image({w=30,h=30,x=223,y=55,file="/home/sector11/Conky/images/red-1.png"})
out({x=228,y=100,txt=now["fc_hour1_temp"] .."°"})
-- 2nd hour
out({c=0xA4FFA4,x=220,y=datay+(datayy*1),txt=now["fc_hour2_time"].."  "..now["fc_hour2_ampm"]})
image({w=30,h=30,x=223,y=130,file=now["fc_hour2_wicon"]}) -- image({w=30,h=30,x=223,y=130,file="/home/sector11/Conky/images/red-1.png"})
out({x=228,y=180,txt=now["fc_hour2_temp"] .."°"})
-- 3rd hour
out({c=0xA4FFA4,x=220,y=210,txt=now["fc_hour3_time"].."  "..now["fc_hour3_ampm"]})
image({w=30,h=30,x=223,y=215,file=now["fc_hour3_wicon"]}) -- image({w=30,h=30,x=223,y=215,file="/home/sector11/Conky/images/red-1.png"})
out({x=228,y=datay+(datayy*10),txt=now["fc_hour3_temp"] .."°"})
-- line
image({x=275,y=5,w=1,h=260,file="/home/sector11/Conky/images/cyan-1.png"})

--start or weather forecast table section
--set start forecast day
start_day=1
--set total forecast days you want to display
number_of_days=10
topy=15
topyy=135 -- topy+(topyy*1)
topx=285
topxx=130
--set coordinates for top lef corners for each repeat
top_left_x_coordinate[1],top_left_y_coordinate[1]        =topx            ,topy
   top_left_x_coordinate[2],top_left_y_coordinate[2]     =topx+(topxx*1)  ,topy
top_left_x_coordinate[3],top_left_y_coordinate[3]        =topx+(topxx*2)  ,topy
   top_left_x_coordinate[4],top_left_y_coordinate[4]     =topx+(topxx*3)  ,topy
top_left_x_coordinate[5],top_left_y_coordinate[5]        =topx+(topxx*4)  ,topy
   top_left_x_coordinate[6],top_left_y_coordinate[6]     =topx            ,topy+(topyy*1)
top_left_x_coordinate[7],top_left_y_coordinate[7]        =topx+(topxx*1)  ,topy+(topyy*1)
   top_left_x_coordinate[8],top_left_y_coordinate[8]     =topx+(topxx*2)  ,topy+(topyy*1)
top_left_x_coordinate[9],top_left_y_coordinate[9]        =topx+(topxx*3)  ,topy+(topyy*1)
   top_left_x_coordinate[10],top_left_y_coordinate[10]   =topx+(topxx*4)  ,topy+(topyy*1)
--########################################################################################
for i=start_day,number_of_days-(start_day-1) do --start of day repeat, do not edit #######
tlx=top_left_x_coordinate[i] --sets top left x position for each repeat ##################
tly=top_left_y_coordinate[i] --sets top left y position for each repeat ##################
--########################################################################################
out({c=0xA4FFA4,a=1,x=tlx,y=tly,txt=forecast_day_short[i].."  "..forecast_date[i].."  "..forecast_month_short[i]})
image({x=tlx,y=tly+5,h=30,w=30,file=weather_icon[i]})
out({c=0xFF8C00,a=1,x=tlx+35,y=tly+15,txt=high_temp[i].."°"})
out({c=0x48D1CC,a=1,x=tlx+35,y=tly+30,txt=low_temp[i].."°"})
out({c=0x48D1CC,a=1,x=tlx,y=tly+50,txt=conditions_short[i]})

out({c=0xFAFAEC,a=1,x=tlx,y=tly+65,txt="P: "..precipitation[i].."%"})
   out({c=0xFAFAEC,a=1,x=tlx+50,y=tly+65,txt="UV: "..uv_index_num[i]})
out({c=0xFAFAEC,a=1,x=tlx,y=tly+80,txt="H: "..humidity[i].."%"})
out({c=0xFAFAEC,a=1,x=tlx,y=tly+95,txt="S: "..sun_rise_lc[i]})
   out({c=0x48D1CC,a=1,x=tlx+73,y=tly+95,txt=sun_set_lc[i]})
out({c=0xFAFAEC,a=1,x=tlx,y=tly+110,txt="M: "..moon_rise_lc[i]})
   out({c=0x48D1CC,a=1,x=tlx+73,y=tly+110,txt=moon_set_lc[i]})
--########################################################################################
end--of forecast repeat section ##########################################################
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################

Last edited by Sector11 (2012-02-18 20:32:55)

Re: weather in conky (LUA scripts)

falldown wrote:

@S11 thank you for the table.

More than welcome.  big_smile

Re: weather in conky (LUA scripts)

@ Sector11... ah... but i asked for it last time to track down the bug smile

modified the forecast repeat section

http://en.zimagez.com/miniature/screenshotf918d5f72c8305643e92493a94bb3157.png

im thinking of putting in a more interesting weather display and an alternate conkyrc in the archive
ive downloaded the fonts too and i can put those in

would you mind if i used your template sector11?

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

Re: weather in conky (LUA scripts)

just encountered a bug... but this time it is intellicast being dumb
http://en.zimagez.com/miniature/screenshot87b522cee8354019481000fd2e070cbd.png

they have wind at 7mph but have NA for direction

ill post a fix in a minute

so ive got the fix in the dropbox link in the first post

to fix an existing script, starting at line 708 to line  739 is currently this

--#############################################################################
local s,f,t=string.find(nowweather,">Humidity: </a></td>%s*<td>(%d*)</td>")
now["humidity"]=t
local s,f,twd=string.find(nowweather,">Direction: </a></td>%s*<td style=[%p%a]*>([%d&;%s%(%a%)]*)</td>%s*</tr>")
local a,b,t=string.find(twd,"(%d*)&deg;")
if tmph>0 then
now["wind_deg"]=t..wind_degrees_unit
else
now["wind_deg"]="NA"
end
--set wind font
local a,b,t=string.find(twd,"%((%a*)%)")
local tnesw=t
        if tmph>0 and tmph<19 then
        now["wind_icon"]=weathericons.."green_"..string.lower(tnesw)..".png"
        elseif tmph>18 and tmph<38 then
        now["wind_icon"]=weathericons.."yellow_"..string.lower(tnesw)..".png"
        elseif tmph>37 and tmph<64 then
        now["wind_icon"]=weathericons.."orange_"..string.lower(tnesw)..".png"
        elseif tmph>63 then
        now["wind_icon"]=weathericons.."green_"..string.lower(tnesw)..".png"
        elseif tmph==0 then
        now["wind_icon"]=weathericons.."no_wind.png"
        end
if tmph>0 then
now["wind_nesw"]=t
now["wind_font"]=windfontt[t]
else
now["wind_nesw"]="NA"
now["wind_font"]=windfontt["N"]
end
--get pressure

it needs to be this

--#############################################################################
local s,f,t=string.find(nowweather,">Humidity: </a></td>%s*<td>(%d*)</td>")
now["humidity"]=t
--get wind direction #######################################################
local s,f,twd=string.find(nowweather,">Direction: </a></td>%s*<td style=[%p%a]*>([%d&;%s%(%a%)]*)</td>%s*</tr>")
--check for NA
local a,b,t=string.find(twd,"(%a*)")
local tnesw=t
if tnesw~="NA" then
local a,b,t=string.find(twd,"(%d*)&deg;")
now["wind_deg"]=t..wind_degrees_unit
local a,b,tnesw=string.find(twd,"%((%a*)%)")
    if tmph>0 and tmph<19 then
    now["wind_icon"]=weathericons.."green_"..string.lower(tnesw)..".png"
    elseif tmph>18 and tmph<38 then
    now["wind_icon"]=weathericons.."yellow_"..string.lower(tnesw)..".png"
    elseif tmph>37 and tmph<64 then
    now["wind_icon"]=weathericons.."orange_"..string.lower(tnesw)..".png"
    elseif tmph>63 then
    now["wind_icon"]=weathericons.."green_"..string.lower(tnesw)..".png"
    end
now["wind_nesw"]=tnesw
now["wind_font"]=windfontt[tnesw]    
else
now["wind_deg"]="NA"
now["wind_icon"]=weathericons.."no_wind.png"
now["wind_nesw"]="NA"
now["wind_font"]=windfontt["N"]
end
--END WIND DIRECTION #######################################################
--get pressure

Last edited by mrpeachy (2012-02-19 00:10:00)

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

Re: weather in conky (LUA scripts)

Here is the full set of icons. Thanks for your help S11 and MrPeachy.

I'm pretty sure that zombies really do exist...
MrPeachy's v9000      Sector11's Conky PitStop      My Gallery

Re: weather in conky (LUA scripts)

very nice smile
http://en.zimagez.com/miniature/screenshot-1348.png

ill put them in the archive and make a note in the howto

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

Re: weather in conky (LUA scripts)

Thank you big_smile looks pretty good.

I'm pretty sure that zombies really do exist...
MrPeachy's v9000      Sector11's Conky PitStop      My Gallery

Re: weather in conky (LUA scripts)

mrpeachy wrote:

@ Sector11... ah... but i asked for it last time to track down the bug smile

modified the forecast repeat section

http://en.zimagez.com/miniature/screenshotf918d5f72c8305643e92493a94bb3157.png

im thinking of putting in a more interesting weather display and an alternate conkyrc in the archive
ive downloaded the fonts too and i can put those in

would you mind if i used your template sector11?

Not at all, if it's posted on the forums it's free!
I like that template - care to share it?   hahahahaha