You are not logged in.
Mrpeachy, What resolution are you running your monitor at? I have a 20" LCD monitor running at 1600X900 (16.9) That would make the difference, wouldn't it?
Last edited by Dodge ram (2012-01-10 14:41:47)
Offline
and corresponding script
402: now["weather_icon"]=weathericons..wimage[t]..".png" 506: cwt={text="TMP: "..now["temp"].."F / FL: "..now["feels_like"].."F ",font="mono",fsize=14,radius=trad,xpos=midx,ypos=midy,position=2,start=astr+5,finish=aend-5,justify=1,letterdeg=5.5,};cw(cwt)
Is it possible that the script isn't finding a configuration for "light rain" ??
ok, look at the line above 402
s,f,t=string.find(nowweather,"40_white/(wx_%d%d)%ppng%p%stitle=%p")
that is where the problem lies
most likely when the weather changes the weather icon changes from a 2 digit ie wx_77 to a 3 digit wx_107
which is something i handnt sufficiently accounted for
change
(wx_%d%d)
to
(wx_%d*)
and i think it should work again
note, this issue is already resolved in weatheragain9000
Last edited by mrpeachy (2012-01-10 18:45:00)
Offline
Thanks for the feedback sector11
Your tutorial should reflect in Section 1
lua_load ~/path_to/the_script/weatheragain9000.lua lua_draw_hook_pre conky_weather ## Blank line after TEXT TEXT
Just a thought
done
Now ....
Something amiss ... these four lines show-up outside of the setup area:local f=io.popen("curl --max-time 60 '"..web.."' | grep -A565 '10 Day Forecast' | sed 's/%//g'")-- > /home/benjamin/Desktop/weather.txt") local f=io.popen("curl --max-time 60 '"..web.."' | grep -A120 '>Current Conditions ' | sed 's/%//g'")-- > /home/benjamin/Desktop/weather.txt") local f=io.popen("curl --max-time 60 '"..web.."' | grep -A565 '10 Day Forecast' | sed 's/%//g'")-- > /home/benjamin/Desktop/weather.txt") local f=io.popen("curl --max-time 60 '"..web.."' | grep -A120 '>Current Conditions ' | sed 's/%//g'")-- > /home/benjamin/Desktop/weather.txt")
The endings are commented out ( -- )
those are from when i was initially writing and testing, ill go through the code and clean up any extraneous material, done
Nothing in the setup area talks about where the "weather.txt" goes...
--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP secs=1800--set update interval web="http://www.intellicast.com/Local/Forecast.aspx?unit=C&location=ARBA0009"--insert unit=C& after? for C -- get web address by going to the intellicast site and entering your location in the box -- for version 3 you must get click on "Extended Forecast" to get the necessary address -- set location of weather images weathericons="/home/sector11/Conky/images/weathericons/" -- set defaults default_font="Anonymous Pro"--font must be in quotes default_font_size=10 default_color=0xffffff--white default_alpha=1--fully opaque default_image_width=50 default_image_height=50 --SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP
So where do we set this "weather.txt" up?
there is no output text file required in the lua only version, which is why the setting was removed
terminal:
09:54:49 ~ $ killall conky && conky -c ~/Conky/w9000/S11_Weather9000 & [1] 21491 09:55:00 ~ $ Conky: desktop window (1ff) is root window Conky: window type - normal Conky: drawing to created window (0x1600002) Conky: drawing to double buffer % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 68231 100 68231 0 0 58482 0 0:00:01 0:00:01 --:--:-- 82704 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 68231 100 68231 0 0 80831 0 --:--:-- --:--:-- --:--:-- 102k processing complete Conky: llua_do_call: function conky_weather execution failed: /home/sector11/Conky/LUA/weather9000.lua:658: attempt to concatenate field '?' (a nil value) Conky: llua_do_call: function conky_weather execution failed: /home/sector11/Conky/LUA/weather9000.lua:658: attempt to concatenate field '?' (a nil value) Conky: llua_do_call: function conky_weather execution failed: /home/sector11/Conky/LUA/weather9000.lua:658: attempt to concatenate field '?' (a nil value)
can you post what is on line 658?
it should be this
out({c=0xffffff,a=1,f="mono",fs=12,x=100,y=100,txt="Hello World"})
check the following
font name is in quotes
commas are separating entries
any plain text is in quotes
Last edited by mrpeachy (2012-01-10 18:55:25)
Offline
Mrpeachy, What resolution are you running your monitor at? I have a 20" LCD monitor running at 1600X900 (16.9) That would make the difference, wouldn't it?
my screen is 1024 x 600
but resolution shouldn't affect the output of the script in any way (other than you wont be able to see it if its larger than the resolution you have)
if you are still getting problems, i would try to fet the files again, perhaps something got messed up in a cut or paste.
Offline
Thanks for the feedback sector11
can you post what is on line 658?
Not a problem, glad to help.
The reason I asked for:
Your tutorial should reflect in Section 1
was I used the lines from a previous weather LUA version ='ing OH CRAP!
I'm learning ... I went searching for the main function.
Ahhhhhhhhhhhhhhhhhh the infamous colourless brackets!!
656 addx=45
657 - out({c=c5,x=mcx+addx,y=l2,txt=precipitation[1].." %"})
658 - out({c=c5,x=mcx+addx,y=l3,txt=uv_index_num[1].."("..uv_index_txt[1]..")"})
659 - out({c=c7,x=mcx+addx,y=l4,txt=sun_rise[1]})
660 - out({c=c7,x=mcx+addx,y=l5,txt=moon_rise[1]})
661 - --cloud
May not get back - first clouds in weeks showing up - BLACK - we are in for a HUGE thunderstorm c/w hail.
34°C and dropping, was 38.6° ---- C*O*M*E O*N R*A*I*N
Last edited by Sector11 (2012-01-10 19:13:50)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
658 - [b]out({c=c5,x=mcx+addx,y=l3,txt=uv_index_num[1].."("..uv_index_txt[1]..")"})[/b]
i cant see anything that should cause an error on that line
put these lines just above 658
print (uv_index_num[1],uv_index_txt[1])
and watch the terminal to see what it outputs
ah!
here is the culprit, line 324
s,f,tuv=string.find(allweather,"UV Index:</strong> (%d%s*%(%a*%)) <br />",start)
it only takes into account single digit uv index numbers!
just took a look at Buenos Aires weather and see that the uv index for today is 11!
you can edit that line and ill update the dropbox entry
just change (%d%s*%(%a*%)) to (%d*%s*%(%a*%))
Last edited by mrpeachy (2012-01-10 19:22:43)
Offline
Tomorrow what I am going to try is delete all of the weather and unpack it in my home folder instead of in my ~/Conky /wea_conky folder. The way it seems is that one of the links in the weather conky is messed up and I keep overlooking it. Dumb it down and keep it simple. If I remember right I had the same problem with the last weather I had.What do you think Sector11? I thought that it was possibly the Lua's like everyone else was having. Looks like it's just me. Imagine that!
Offline
@ dodge ram
sorry i couldnt fix it for you!
the recent lua bugs have been with v9000
which is almost entirely different from v6 which is in use in sector11's setup
v6 was actually written some time ago and went through its own bug fixing stage, and works quite reliably as far as i know
and while i can think of some reasons why the script might give blank info as in your first screenshot
i cant think of anything that would give the jumbled output
hopefully a "reinstall" will sort things out
make sure you edit the lua scrip and get the setup right
particularly the file paths
keeping it simple is always a good idea
Offline
^ ditto that Ram. KISS it!
Just one more thing to say: The "/wea_conky" I gave you is self sufficient it relies on nothing outside of that director to run properly. Well, you need conky installed.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
it only takes into account single digit uv index numbers!
just took a look at Buenos Aires weather and see that the uv index for today is 11!
you can edit that line and ill update the dropbox entry
just change (%d%s*%(%a*%)) to (%d*%s*%(%a*%))
Yea, we're close to the ozone hole at the south pole. Made the change - no error - no conky.
Check the times.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
mrpeachy wrote:it only takes into account single digit uv index numbers!
just took a look at Buenos Aires weather and see that the uv index for today is 11!
you can edit that line and ill update the dropbox entry
just change (%d%s*%(%a*%)) to (%d*%s*%(%a*%))Yea, we're close to the ozone hole at the south pole. Made the change - no error - no conky.
Check the times.
Hmmmmmmmmmmmmmmm
so where did the conky go??
so what could have cause this...
how did you set your defaults at the top?
do you have that blank line in the conkyrc after TEXT?
what are your conky settings for width and height?
put something into the conkyrc, and see if you can see that somewhere
what do those times in the terminal mean?
Last edited by mrpeachy (2012-01-11 00:52:02)
Offline
Hmmmmmmmmmmmmmmm
not quite what I said! If I told you what I said I'd be banned!
so where did the conky go??
all squeezed up into a 0x0 pixel window I think.
so what could have cause this...
how did you set your defaults at the top?
Well, I did some heavy editing. It works now.
do you have that blank line in the conkyrc after TEXT?
Oh yea, learned that one the hard way a long time ago!
what are your conky settings for width and height?
They were commented out. <<--- DUH! looking for conky to create an exact size for the window.
put something into the conkyrc, and see if you can see that somewhere
I did try that I put:
mrpeachy you su.... NOOOOOOOOO I'm kidding!!!! I tried:
TEXT
Hello
I love you
I saw 'nada' 'zip' 'zilch'
Got smart; set minimum width height to: 900 900
WOW!!!!!!!!!! Weather!!!!
Then I trimmed it back ...
what do those times in the terminal mean?
Those are from my terminal prompt:
22:36:19 ~
$ hello mrpeachy
bash: hello: command not found
22:36:28 ~
$ cd /media/6
lost+found Wallpapers
22:36:38 /media/6
$
export PS1="$light_gray\n \$(date +%R:%S) \w\n $cyan\\$ $no_color"
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@sector11 good to see!
ive been continually tinkering
got this (notice the colored brackets i had to write a whole new function for that... not included in the dropbox v9000 as it just complicates matters)
while doing so i notice that every time i was trying to place an image it never turned out where i wanted it
so i took a look at the image function and discovered an error
i wasnt actually setting the top left corner of the image (which is why it was always off)
changed that and updated dropbox
/home/benjamin/Dropbox/Public/weatheragain9000.lua.tar.gz
Offline
PART 5 - setting up and using the short conditions option
in the latest update of the script
http://dl.dropbox.com/u/19008369/weathe … lua.tar.gz
there is an addition to the setup section
and additional data options
addition to settings (at top of script)
--short conditions setup
--this section allows you to set your own shorter terms to replace the terms foud in conditions
--to use for current: now["conditions_short"], now["conditions_short_caps"], now["conditions_short_lc"]
--to use for forecast: conditions_short[n], conditions_short_caps[n], conditions_short_lc[n]
con_short={--start of table, put entries below in form eg: ["Thunderstorm"]="T.Strm",
["Thunderstorm"]="T.Strm",--remember to put a comma at the end of every entry
["Scattered"]="Scat",
["Few Snow Showers"]="Fw Sn Shws",
}--this bracket closes the table
setting up the table allows you to change any incoming conditions text into anything you like which can then be output using the new data options listed below
just add entries to the table like so:
["what intellicast spits out"]="what you want to convert it to",
the first part requires square brackets and quotes to allow for the use of spaces
remember to use commas to seperate entries
additional data options
current conditions
now["conditions_short"] --> Scat T.Strms
now["conditions_short_caps"] --> SCAT T.STRMS
now["conditions_short_lc"] --> scat t.strms
forecast conditions, n=day number
conditions_short[n] --> Scat T.Strms
conditions_short_caps[n] --> SCAT T.STRMS
conditions_short_lc[n] --> scat t.strms
NOTE
if you use the conditions_short options and the incoming text does not match any of your entries in the table, the conditions text will be displayes unchanged,
for example the conditions text "Mostly Sunny" will be output from from the conditions_short options unchanged UNLESS you have an entry in the settings to change "Mostly Sunny" to something else
NOTE 2
ive been thinking about how this feature will run and there is a potential for the con short feature not to behave as expected
for instance, you set up your table like so:
con_short={
["Scattered"]="Scat",
["Scattered Thunderstorms"]=" Sc T.St",
you would then expect that when conditions = "Scattered Thunderstorms"
the script should show
Sc T.St
but instead you get
Scat Thunderstorms
this is because the search and replace happens in the order in which the table is written, from top to bottom
so
input="Scattered Thunderstorms"
1st round - search for "Scattered" -> match "Scattered" -> replace with "Scat" ->output "Scat Thunderstorms"
input="Scat Thunderstorms"
2nd round - search for "Scattered Thunderstorms" -> not matched -> output "Scat Thunderstorms"
solution
to get around this, put any "compound" (ie multi word) replacements ahead of single word replacements
here is the new option in action
you can see it in the second day down on the left
all the other forecast days are also using the conditions_short option and display the text unchanged as i have no matching entries in the table
it was the arrival of "Few Snow Showers/Wind" that prompted me to make the additions
NOTE 3
any changes or entries into the con_short table will NOT take effect immediately when you save the script
only when the script updates its weather information of if you killall conky and restart
Last edited by mrpeachy (2012-01-15 03:48:53)
Offline
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
is that v9000 in action?
looks great!
nice work falldown
is that from one of the newer updates?
the ones that have the weather_display function at the bottom?
if so can you post the function
Offline
@MrPeachy.. Thank you!!
I have the newest Weatheragain2 script from two days ago with the weather display settings in the mid section.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Yep, just what I thought. A dumb, stupid truck driver like me can't even do something soooooooo simple. He,he,he. I know what I did wrong. I was thinking and I didn't make the kinks correctly. Like you said mrpeachy, I have to use sector11's code. I can't use your new update. I have to look at it this way, at least I am trying. A little re-aligning and That will be done. Sector11, on my old weather conky I had my longitude and latitude at the bottom and the update time. Will that work on the new one that I have? It should go at the bottom of the Vert-Weather shouldn't it? Thank you VERY much.
Last edited by Dodge ram (2012-01-11 14:35:58)
Offline
@ Dodge ram
I'm betting you are using a different font. All you have to do is change the vertical height of the images.
Example:
${lua weather image.day6 45 450 35 35}${lua weather image.day7 155 450 35 35}
the second set of numbers, 450 in this case, increase that a bit at a time.
lat-long not party of the LUA script I don't think. I'm also not sure if v6 has the update time. mrpeachy would know, I don't worry about it most places update once an hour anyway.
Check out Mark's conkyMisc there are lat long python scripts in there.
Last edited by Sector11 (2012-01-11 16:25:22)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Do you by any chance have the "template" section of that still intact?
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
only what i posted here
http://crunchbanglinux.org/forums/post/177873/#p177873
this fits into the latest update of v9000
copy the entire function called weather_display and paste it over the existing weather_display function at the bottom of the script
was that what you were after?
what i could do is go over that setup code, organise it better and annotate everything with more detail
show the step by step process of putting that display together
Last edited by mrpeachy (2012-01-11 20:23:47)
Offline
Yep, just what I thought. A dumb, stupid truck driver like me can't even do something soooooooo simple. He,he,he. I know what I did wrong. I was thinking and I didn't make the kinks correctly. Like you said mrpeachy, I have to use sector11's code. I can't use your new update. I have to look at it this way, at least I am trying. A little re-aligning and That will be done. Sector11, on my old weather conky I had my longitude and latitude at the bottom and the update time. Will that work on the new one that I have? It should go at the bottom of the Vert-Weather shouldn't it? Thank you VERY much.
the only reason i (at least appear) to know what im talking about (and im sure this goes for others too) is that ive learned from many many many mistakes of my own
not to mention that conky today is much more complicated (or at least can be) than it was a few years ago when i first started conky tinkering
Offline
lat-long not party of the LUA script I don't think. I'm also not sure if v6 has the update time. mrpeachy would know, I don't worry about it most places update once an hour anyway.
.
I had to really play with voffset to use TIME with MrP lua last month.
No time to play and test with latlong right now
Something like
TEXT
${lua conky_draw_bg 20 0 0 630 530 0x000000 0.2}
${lua conky_weather}
${font Liberation Sans Regular L:size=38}${goto 160}${color3}${voffset 360}${time %H:%M:%S}
Here is current running better spaced.
Last edited by BoredOOMM (2012-01-11 20:54:14)
Congratulations, you've figured out the sound of one hand clapping...
Offline
Sector11 wrote:Do you by any chance have the "template" section of that still intact?
only what i posted here
Hmmmmm no that's yours with centre day of 3 columns a bit lower. I was looking for the template you did that was my "look-alike"
OK, I'll try and recreate it with v9000 when I get time.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
mrpeachy wrote:Sector11 wrote:Do you by any chance have the "template" section of that still intact?
only what i posted here
Hmmmmm no that's yours with centre day of 3 columns a bit lower. I was looking for the template you did that was my "look-alike"
OK, I'll try and recreate it with v9000 when I get time.
i think its the same apart from the layout of the forecast days
those are placed using the forecast repeat method, i had to rearrange them to get the info on my screen
you can move the forecast days position by just setting the top left corner in the script here:
--enter coordinates of top left corner for each day
topx1,topx2,topy=15,175,315
gap=80
top_left_x_coordinate[2],top_left_y_coordinate[2]=topx1,topy
top_left_x_coordinate[3],top_left_y_coordinate[3]=topx2,topy
top_left_x_coordinate[4],top_left_y_coordinate[4]=topx1+80,topy+(gap/2)
top_left_x_coordinate[5],top_left_y_coordinate[5]=topx1,topy+gap
top_left_x_coordinate[6],top_left_y_coordinate[6]=topx2,topy+gap
top_left_x_coordinate[7],top_left_y_coordinate[7]=topx1+80,topy+(gap/2)+gap
top_left_x_coordinate[8],top_left_y_coordinate[8]=topx1,topy+gap+gap
top_left_x_coordinate[9],top_left_y_coordinate[9]=topx2,topy+gap+gap
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat