SEARCH

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

You are not logged in.

#51 2011-10-21 17:13:36

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 350

Re: {SOLVED} Conky Weather Disaster

mea culpa!

The program is weather-util

I found the variables (headers) here about 80% down the page and there is limited understandable information at weather -help

Sector11, although I posted screen prints of wunderground, alas I cannot get it running again with a US address.

sigh

I have real life things today and cannot play with conky


Congratulations, you've figured out the sound of one hand clapping...

Offline

Help fund CrunchBang, donate to the project!

#52 2011-10-21 17:56:29

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

BoredOOMM wrote:

mea culpa!

The program is weather-util

I found the variables (headers) here about 80% down the page and there is limited understandable information at weather -help

Sector11, although I posted screen prints of wunderground, alas I cannot get it running again with a US address.

sigh

I have real life things today and cannot play with conky

well "weather" does work, just need the program  big_smile
I'm going to play with Wunderground again today

Don't ya just hate Real Life at times ...
interfering with conky indeed!  hahahahahahahaha

Have a good day!

Online

#53 2011-10-22 02:29:18

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 350

Re: {SOLVED} Conky Weather Disaster

Sector11 - add for US users who are Metrically challenged.

temperature_unit fahrenheit

TEXT

sector11-noaa.png


Congratulations, you've figured out the sound of one hand clapping...

Offline

#54 2011-10-22 03:00:31

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

BoredOOMM wrote:

Sector11 - add for US users who are Metrically challenged.

temperature_unit fahrenheit

TEXT

sector11-noaa.png

Ummmmmmmmm does "mea culpa!" sound familiar   lol
Looks good though - hey - you left me in there as well.

EDIT:

# and for US users who are Metrically challenged
temperature_unit fahrenheit

TEXT

Do you realize how many people would be chasing me with sticks - BIG STICKS - SMALL TREE TRUNK TYPE STICKS!!!!

No wait, new plan:

# and for US users who are Metrically challenged
# blame BoredOOMM@MetricallyChallenged.com
temperature_unit fahrenheit

TEXT

- that just might work.

Last edited by Sector11 (2011-10-22 03:05:50)

Online

#55 2011-10-22 05:13:00

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 350

Re: {SOLVED} Conky Weather Disaster

Sector11, you know this scripting will catch on like wildfire after Nov 15 when EVERYONE has a broken conky..

As far as I can tell there is NO way to script the Barometer in inches as the scripting will not allow it.   I choose to remove pressure from my few lines.

I added your lines of script below text to my working conkyrc file and fired it up.

Last edited by BoredOOMM (2011-10-22 05:14:19)


Congratulations, you've figured out the sound of one hand clapping...

Offline

#56 2011-10-22 14:25:46

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

BoredOOMM wrote:

Sector11, you know this scripting will catch on like wildfire after Nov 15 when EVERYONE has a broken conky..

As far as I can tell there is NO way to script the Barometer in inches as the scripting will not allow it.   I choose to remove pressure from my few lines.

I added your lines of script below text to my working conkyrc file and fired it up.

The extreme top of your code looks different is that NOAA as well?

Can you show the code?

Online

#57 2011-10-22 16:42:08

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 350

Re: {SOLVED} Conky Weather Disaster

Sector11 wrote:
BoredOOMM wrote:

Sector11, you know this scripting will catch on like wildfire after Nov 15 when EVERYONE has a broken conky..

As far as I can tell there is NO way to script the Barometer in inches as the scripting will not allow it.   I choose to remove pressure from my few lines.

I added your lines of script below text to my working conkyrc file and fired it up.

The extreme top of your code looks different is that NOAA as well?

Can you show the code?

Conky http://pastebin.com/ty3VFUdV

Weather.sh http://pastebin.com/VNm8uLfw


Congratulations, you've figured out the sound of one hand clapping...

Offline

#58 2011-10-22 16:52:27

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

BoredOOMM wrote:
Sector11 wrote:
BoredOOMM wrote:

Sector11, you know this scripting will catch on like wildfire after Nov 15 when EVERYONE has a broken conky..

As far as I can tell there is NO way to script the Barometer in inches as the scripting will not allow it.   I choose to remove pressure from my few lines.

I added your lines of script below text to my working conkyrc file and fired it up.

The extreme top of your code looks different is that NOAA as well?

Can you show the code?

Conky http://pastebin.com/ty3VFUdV

Weather.sh http://pastebin.com/VNm8uLfw

Is that teoBigusGeekus's code for accuweather?

I shoulda guessed:
Forecast For: 
Porterville CA (Elev. 479 ft)
Lat/Lon: 36.0650/-119.0130

Have you seen conkyLatLong?

  14:01:06 ~
         $ conkyLatLong
-34.6130 / -58.4700

  14:01:18 ~
         $ conkyLatLong -l
-58.4700

  14:01:30 ~
         $ conkyLatLong -L
-34.6130

  14:01:43 ~
         $ conkyLatLong -i
34°36"46.8'S / 58°28"12.0'W

  14:01:52 ~
         $ 

Which would probably be neat in a laptop if you travel a lot!

Last edited by Sector11 (2011-10-22 17:04:28)

Online

#59 2011-10-22 21:04:39

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

My first sample of TeoBigusGeekus's HOW TO: Conky weather info using Accuweather/WUnderground/NWS

1a)Accuweather - INTERNATIONAL USERS
7951bf155240482.jpg

conky

## killall conky && conky -c ~/TBG/ACC/.conkyrc

 ###  Begin Window Settings  ##################################################
 # Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class Conky
own_window_title AccuWeather Bs As

 ### ARGB can be used for real transparency
 ### NOTE that a composite manager is required for real transparency.
 ### This option will not work as desired (in most cases) in conjunction with
 ### 'own_window_type override'
# own_window_argb_visual yes
 ### When ARGB visuals are enabled, this use this to modify the alpha value
 ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. 
#own_window_argb_value 0

minimum_size 150 0    ## width, height
maximum_width 150    ## width - usually a good idea to equal minimum width.

gap_x 10    ## left &right
gap_y 10    ## up & down

alignment top_right
 ####################################################  End Window Settings  ###
 ###  Font Settings  ##########################################################
 # Use Xft (anti-aliased font and stuff) 
use_xft yes
xftfont monospace:size=8
 # Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
 # Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
draw_outline no
uppercase no

draw_outline no # amplifies text if yes
 ######################################################  End Font Settings  ###
 ###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
 #####################################################  End Color Settings  ###
 ###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 0
 #####################################################  End Borders Secton  ###


 # Use the Xdbe extension? (eliminates flicker)
 # It is highly recommended to use own window with this one so
 # double buffer won't be so big
double_buffer yes

 # Adds spaces around certain objects to stop them
 # from moving other things around.
 # only works with mono fonts
use_spacer right
 # Arguments are left, right, and none (default)

 # Size of the standard text buffer (default is 256 bytes).
 # Will allow for more text display per variable.
text_buffer_size 256

 # Sets bars size even for bars that do not hace that function
 # IE: execbar and execibar
default_bar_size 335 9

 # 0 makes Conky run forever
total_run_times 0
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes

 # Defaults to 4MiB
 # Set to 0 to disable the image cache
 # Increase this value if you use $image lots
imlib_cache_size 0

update_interval 3

lua_load ~/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg

TEXT
${alignc}${color}Buenos Aires${color}${execi 1800 bash $HOME/accuweather_conky/accuw_script}

${font Orbitron:size=16}Today${font}
${color6}${font conkyweather:size=30}${execi 1800  sed -n '5p' ~/accuweather_conky/images}${font}${color}${goto 60}${voffset -25}${font digitalk:size=30}${execpi 1800 sed -n '1p' $HOME/accuweather_conky/temperatures}${font Orbitron:size=30}°c${font}
${execpi 1800 sed -n '1p' $HOME/accuweather_conky/messages|fold -s -w 22}

${font Orbitron:size=16}${execpi 1800 sed -n '1p' $HOME/accuweather_conky/days}${font}
${color6}${font conkyweather:size=30}${execi 1800  sed -n '6p' ~/accuweather_conky/images}${font}${color}${voffset -25}${goto 60}H: ${font digitalk:bold:size=15}${execpi 1800 sed -n '2p' $HOME/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${goto 60}L: ${font digitalk:bold:size=15}${execpi 1800 sed -n '3p' $HOME/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${execpi 1800 sed -n '3p' $HOME/accuweather_conky/messages|fold -s -w 22}

${font Orbitron:size=16}${execpi 1800 sed -n '3p' $HOME/accuweather_conky/days}${font}
${color6}${font conkyweather:size=30}${execi 1800  sed -n '7p' ~/accuweather_conky/images}${font}${color}${voffset -25}${goto 60}H: ${font digitalk:bold:size=15}${execpi 1800 sed -n '4p' $HOME/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${goto 60}L: ${font digitalk:bold:size=15}${execpi 1800 sed -n '5p' $HOME/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${execpi 1800 sed -n '5p' $HOME/accuweather_conky/messages|fold -s -w 22}

${font Orbitron:size=16}${execpi 1800 sed -n '5p' $HOME/accuweather_conky/days}${font}
${color6}${font conkyweather:size=30}${execi 1800  sed -n '8p' ~/accuweather_conky/images}${font}${color}${voffset -25}${goto 60}H: ${font digitalk:bold:size=15}${execpi 1800 sed -n '6p' $HOME/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${goto 60}L: ${font digitalk:bold:size=15}${execpi 1800 sed -n '7p' $HOME/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${execpi 1800 sed -n '7p' $HOME/accuweather_conky/messages|fold -s -w 22}

Next I do Wunderground Weather.

Last edited by Sector11 (2011-10-22 21:06:24)

Online

#60 2011-10-25 00:38:52

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

BoredOOMM wrote:
Sector11 wrote:
BoredOOMM wrote:

Sector11, you know this scripting will catch on like wildfire after Nov 15 when EVERYONE has a broken conky..

As far as I can tell there is NO way to script the Barometer in inches as the scripting will not allow it.   I choose to remove pressure from my few lines.

I added your lines of script below text to my working conkyrc file and fired it up.

The extreme top of your code looks different is that NOAA as well?

Can you show the code?

Conky http://pastebin.com/ty3VFUdV

Weather.sh http://pastebin.com/VNm8uLfw

Thanks I haven't tried the Accuweather RSS feed yet, it's next!

Online

#61 2011-10-25 00:45:05

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

My first post of TeoBigusGeekus's HOW TO: Conky weather info using Accuweather/WUnderground/NWS weather scripts for conky was with Accuweather.

My second is with Wunderground weather:

Interesting I took a screenshot and just as I did, the conky updated. Go figure.  TV says 20°C so it's close.
2dfbdb155396158.jpg

Oh the conky ... this uses Accuweather and Wunderground:

## killall conky && conky -c ~/TBG/conkyrc_ACCU_WUG

 ###  Begin Window Settings  ##################################################
 # Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class Conky
own_window_title Accu & WUG Bs As

 ### ARGB can be used for real transparency
 ### NOTE that a composite manager is required for real transparency.
 ### This option will not work as desired (in most cases) in conjunction with
 ### 'own_window_type override'
# own_window_argb_visual yes
 ### When ARGB visuals are enabled, this use this to modify the alpha value
 ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. 
#own_window_argb_value 0

minimum_size 350 0    ## width, height
maximum_width 350    ## width - usually a good idea to equal minimum width.

gap_x 10    ## left &right
gap_y 10    ## up & down

alignment top_left
 ####################################################  End Window Settings  ###
 ###  Font Settings  ##########################################################
 # Use Xft (anti-aliased font and stuff) 
use_xft yes
xftfont monospace:size=8
 # Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
 # Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
draw_outline no
uppercase no

draw_outline no # amplifies text if yes
 ######################################################  End Font Settings  ###
 ###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
 #####################################################  End Color Settings  ###
 ###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 0
 #####################################################  End Borders Secton  ###


 # Use the Xdbe extension? (eliminates flicker)
 # It is highly recommended to use own window with this one so
 # double buffer won't be so big
double_buffer yes

 # Adds spaces around certain objects to stop them
 # from moving other things around.
 # only works with mono fonts
use_spacer right
 # Arguments are left, right, and none (default)

 # Size of the standard text buffer (default is 256 bytes).
 # Will allow for more text display per variable.
text_buffer_size 256

 # Sets bars size even for bars that do not hace that function
 # IE: execbar and execibar
default_bar_size 335 9

 # 0 makes Conky run forever
total_run_times 0
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes

 # Defaults to 4MiB
 # Set to 0 to disable the image cache
 # Increase this value if you use $image lots
imlib_cache_size 0

update_interval 3

lua_load ~/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg

TEXT
${execi 1800 bash $HOME/accuweather_conky/accuw_script}${font Orbitron:size=16}  Current:  ${time %a. %d %b. %Y}${font}
${voffset 5}${alignc}${execi 86400 conkyLatLong -i}
${voffset 5}${color6}${font conkyweather:size=30}${execi 1800  sed -n '5p' ~/accuweather_conky/images}${font}${color}${goto 120}${voffset -25}${font digitalk:size=30}${execi 1800 sed -n '1p' $HOME/accuweather_conky/temperatures}${font Orbitron:size=30}°c${font}
${voffset 5}${execi 1800 sed -n '1p' $HOME/accuweather_conky/messages|fold -s -w 50}
More for Today:
${execi 1800 sed -n '3p' $HOME/accuweather_conky/messages|fold -s -w 50}
${alignc}${color6}${cpubar cpu2 1,50} Forecast Information ${cpubar cpu2 1,50}${color}
${execi 1800 bash $HOME/conky_wunderground2/wunderground-script}\
${color8}${execi 1800  sed -n '1p' $HOME/conky_wunderground2/messages.wun}${alignr}${color1}${execi 1800 sed -n '5p' $HOME/conky_wunderground2/messages.wun}${color}${color}

${execi 1800 sed -n '3p' $HOME/conky_wunderground2/messages.wun}${alignr -10}${execi 1800 sed -n '7p' $HOME/conky_wunderground2/messages.wun}
${execi 1800 sed -n '4p' $HOME/conky_wunderground2/messages.wun}${alignr 2}${execi 1800 sed -n '8p' $HOME/conky_wunderground2/messages.wun}
${voffset -45}${goto 110}${color8}${font conkyweather:size=35}${execi 1800  sed -n '1p' $HOME/conky_wunderground2/weather_icons}\
${goto 200}${color1}${execi 1800  sed -n '3p' $HOME/conky_wunderground2/weather_icons}${font}${color}
${execi 1800 sed -n '2p' $HOME/conky_wunderground2/messages.wun}${alignr}${execi 1800 sed -n '6p' $HOME/conky_wunderground2/messages.wun}
${hr}
${color8}${execi 1800  sed -n '9p' $HOME/conky_wunderground2/messages.wun}${alignr}${color1}${execi 1800 sed -n '13p' $HOME/conky_wunderground2/messages.wun}${color}${color}

${execi 1800 sed -n '11p' $HOME/conky_wunderground2/messages.wun}${alignr -10}${execi 1800 sed -n '15p' $HOME/conky_wunderground2/messages.wun}
${execi 1800 sed -n '16p' $HOME/conky_wunderground2/messages.wun}${alignr 2}${execi 1800 sed -n '20p' $HOME/conky_wunderground2/messages.wun}
${voffset -45}${goto 110}${color8}${font conkyweather:size=35}${execi 1800  sed -n '5p' $HOME/conky_wunderground2/weather_icons}\
${goto 200}${color1}${execi 1800  sed -n '7p' $HOME/conky_wunderground2/weather_icons}${font}${color}
${execi 1800 sed -n '10p' $HOME/conky_wunderground2/messages.wun}${alignr}${execi 1800 sed -n '14p' $HOME/conky_wunderground2/messages.wun}
${hr}
${color8}${execi 1800  sed -n '17p' $HOME/conky_wunderground2/messages.wun}${alignr}${color1}${execi 1800 sed -n '21p' $HOME/conky_wunderground2/messages.wun}${color}${color}

${execi 1800 sed -n '19p' $HOME/conky_wunderground2/messages.wun}${alignr -10}${execi 1800 sed -n '23p' $HOME/conky_wunderground2/messages.wun}
${execi 1800 sed -n '20p' $HOME/conky_wunderground2/messages.wun}${alignr 2}${execi 1800 sed -n '24p' $HOME/conky_wunderground2/messages.wun}
${voffset -45}${goto 110}${color8}${font conkyweather:size=35}${execi 1800  sed -n '9p' $HOME/conky_wunderground2/weather_icons}\
${goto 200}${color1}${execi 1800  sed -n '11p' $HOME/conky_wunderground2/weather_icons}${font}${color}
${execi 1800 sed -n '18p' $HOME/conky_wunderground2/messages.wun}${alignr}${execi 1800 sed -n '22p' $HOME/conky_wunderground2/messages.wun}
${hr}
${color8}${execi 1800  sed -n '25p' $HOME/conky_wunderground2/messages.wun}${alignr}${color1}${execi 1800 sed -n '29p' $HOME/conky_wunderground2/messages.wun}${color}${color}

${execi 1800 sed -n '27p' $HOME/conky_wunderground2/messages.wun}${alignr -10}${execi 1800 sed -n '31p' $HOME/conky_wunderground2/messages.wun}
${execi 1800 sed -n '28p' $HOME/conky_wunderground2/messages.wun}${alignr 2}${execi 1800 sed -n '32p' $HOME/conky_wunderground2/messages.wun}
${voffset -45}${goto 110}${color8}${font conkyweather:size=35}${execi 1800  sed -n '9p' $HOME/conky_wunderground2/weather_icons}\
${goto 200}${color1}${execi 1800  sed -n '11p' $HOME/conky_wunderground2/weather_icons}${font}${color}
${execi 1800 sed -n '26p' $HOME/conky_wunderground2/messages.wun}${alignr}${execi 1800 sed -n '30p' $HOME/conky_wunderground2/messages.wun}
${hr}
${color8}${execi 1800  sed -n '33p' $HOME/conky_wunderground2/messages.wun}${alignr}${color1}${execi 1800 sed -n '37p' $HOME/conky_wunderground2/messages.wun}${color}${color}

${execi 1800 sed -n '35p' $HOME/conky_wunderground2/messages.wun}${alignr -10}${execi 1800 sed -n '39p' $HOME/conky_wunderground2/messages.wun}
${execi 1800 sed -n '36p' $HOME/conky_wunderground2/messages.wun}${alignr 2}${execi 1800 sed -n '40p' $HOME/conky_wunderground2/messages.wun}
${voffset -45}${goto 110}${color8}${font conkyweather:size=35}${execi 1800  sed -n '17p' $HOME/conky_wunderground2/weather_icons}\
${goto 200}${color1}${execi 1800  sed -n '19p' $HOME/conky_wunderground2/weather_icons}${font}${color}
${execi 1800 sed -n '34p' $HOME/conky_wunderground2/messages.wun}${alignr}${execi 1800 sed -n '38p' $HOME/conky_wunderground2/messages.wun}
${hr}
${color8}${execi 1800  sed -n '41p' $HOME/conky_wunderground2/messages.wun}${alignr}${color1}${execi 1800 sed -n '45p' $HOME/conky_wunderground2/messages.wun}${color}${color}

${execi 1800 sed -n '43p' $HOME/conky_wunderground2/messages.wun}${alignr -10}${execi 1800 sed -n '47p' $HOME/conky_wunderground2/messages.wun}
${execi 1800 sed -n '44p' $HOME/conky_wunderground2/messages.wun}${alignr 2}${execi 1800 sed -n '48p' $HOME/conky_wunderground2/messages.wun}
${voffset -45}${goto 110}${color8}${font conkyweather:size=35}${execi 1800  sed -n '21p' $HOME/conky_wunderground2/weather_icons}\
${goto 200}${color1}${execi 1800  sed -n '23p' $HOME/conky_wunderground2/weather_icons}${font}${color}
${execi 1800 sed -n '42p' $HOME/conky_wunderground2/messages.wun}${alignr}${execi 1800 sed -n '46p' $HOME/conky_wunderground2/messages.wun}
${hr}
${color8}${execi 1800  sed -n '49p' $HOME/conky_wunderground2/messages.wun}${alignr}${color1}${execi 1800 sed -n '53p' $HOME/conky_wunderground2/messages.wun}${color}${color}

${execi 1800 sed -n '51p' $HOME/conky_wunderground2/messages.wun}${alignr -10}${execi 1800 sed -n '55p' $HOME/conky_wunderground2/messages.wun}
${execi 1800 sed -n '52p' $HOME/conky_wunderground2/messages.wun}${alignr 2}${execi 1800 sed -n '56p' $HOME/conky_wunderground2/messages.wun}
${voffset -45}${goto 110}${color8}${font conkyweather:size=35}${execi 1800  sed -n '25p' $HOME/conky_wunderground2/weather_icons}\
${goto 200}${color1}${execi 1800  sed -n '27p' $HOME/conky_wunderground2/weather_icons}${font}${color}
${execi 1800 sed -n '50p' $HOME/conky_wunderground2/messages.wun}${alignr}${execi 1800 sed -n '54p' $HOME/conky_wunderground2/messages.wun}
${if_existing $HOME/conky_wunderground2/yes}${hr}
${color8}${execi 1800  sed -n '57p' $HOME/conky_wunderground2/messages.wun}${alignr}${color1}${execi 1800 sed -n '61p' $HOME/conky_wunderground2/messages.wun}${color}${color}

${execi 1800 sed -n '59p' $HOME/conky_wunderground2/messages.wun}${alignr -10}${execi 1800 sed -n '63p' $HOME/conky_wunderground2/messages.wun}
${execi 1800 sed -n '60p' $HOME/conky_wunderground2/messages.wun}${alignr 2}${execi 1800 sed -n '62p' $HOME/conky_wunderground2/messages.wun}
${voffset -45}${goto 110}${color8}${font conkyweather:size=35}${execi 1800  sed -n '29p' $HOME/conky_wunderground2/weather_icons}\
${goto 200}${color1}${execi 1800  sed -n '31p' $HOME/conky_wunderground2/weather_icons}${font}${color}
${execi 1800 sed -n '50p' $HOME/conky_wunderground2/messages.wun}${alignr}${execi 1800 sed -n '54p' $HOME/conky_wunderground2/messages.wun}${else}${hr}
${alignc}No Extra Day${endif}${voffset -295}

Online

#62 2011-10-25 00:47:59

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

Next come's a marriage of the two; Accuweather and Wunderground in one

OK, since Accuweather has a bit more data ... I created a conky that uses that data for three days and continues from that point on with Wunderground forecasts.  Forecasts change anyway, so it's only a guess. Weathermen lie!!!!!

43f2b6155598357.jpg

conky

## killall conky && conky -c ~/TBG/conkyrc_ACCU_WUG

 ###  Begin Window Settings  ##################################################
 # Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class Conky
own_window_title Accu & WUG Bs As

 ### ARGB can be used for real transparency
 ### NOTE that a composite manager is required for real transparency.
 ### This option will not work as desired (in most cases) in conjunction with
 ### 'own_window_type override'
# own_window_argb_visual yes
 ### When ARGB visuals are enabled, this use this to modify the alpha value
 ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. 
#own_window_argb_value 0

minimum_size 350 0    ## width, height
maximum_width 310    ## width - usually a good idea to equal minimum width.

gap_x 10    ## left &right
gap_y 10    ## up & down

alignment top_left
 ####################################################  End Window Settings  ###
 ###  Font Settings  ##########################################################
 # Use Xft (anti-aliased font and stuff) 
use_xft yes
xftfont Anonymous Pro:size=8.5  #monospace:size=8 #
 # Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
 # Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
draw_outline no
uppercase no

draw_outline no # amplifies text if yes
 ######################################################  End Font Settings  ###
 ###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
 #####################################################  End Color Settings  ###
 ###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 0
 #####################################################  End Borders Secton  ###


 # Use the Xdbe extension? (eliminates flicker)
 # It is highly recommended to use own window with this one so
 # double buffer won't be so big
double_buffer yes

 # Adds spaces around certain objects to stop them
 # from moving other things around.
 # only works with mono fonts
use_spacer right
 # Arguments are left, right, and none (default)

 # Size of the standard text buffer (default is 256 bytes).
 # Will allow for more text display per variable.
text_buffer_size 256

 # Sets bars size even for bars that do not hace that function
 # IE: execbar and execibar
default_bar_size 335 9

 # 0 makes Conky run forever
total_run_times 0
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes

 # Defaults to 4MiB
 # Set to 0 to disable the image cache
 # Increase this value if you use $image lots
imlib_cache_size 0

update_interval 3

lua_load ~/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg

TEXT
${execi 600 bash /home/sector11/accuweather_conky/accuw_script}${execi 600 bash /home/sector11/conky_wunderground2/wunderground-script}${font Orbitron:size=16}${alignc}${time %a. %d %b. %Y}
${alignc}Buenos Aires${font}
${voffset 5}${alignc}${execi 86400 conkyLatLong -i}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '5p' ~/accuweather_conky/images}${font}${color}${goto 90}${voffset -25}${font digitalk:size=30}${execi 600 sed -n '1p' /home/sector11/accuweather_conky/temperatures}${font Orbitron:size=30}°c${font}\
${voffset -20}${goto 220}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '2p' /home/sector11/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${goto 220}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '3p' /home/sector11/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${voffset 5}${execi 600 sed -n '1p' /home/sector11/accuweather_conky/messages|fold -s -w 50}

${font Orbitron:size=16}${execpi 600 sed -n '3p' /home/sector11/accuweather_conky/days}${goto 170}${execpi 600 sed -n '5p' /home/sector11/accuweather_conky/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '7p' ~/accuweather_conky/images}${font}${color}${voffset -25}${goto 60}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '4p' /home/sector11/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${goto 60}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '5p' /home/sector11/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}\
${voffset -27}${goto 170}${color6}${font conkyweather:size=30}${execi 600  sed -n '8p' ~/accuweather_conky/images}${font}${color}${voffset -25}${goto 220}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '6p' /home/sector11/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}
${goto 220}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '7p' /home/sector11/accuweather_conky/temperatures}${font Orbitron:size=15}°c${font}

${color6}More for Today:${color}
${execi 600 sed -n '3p' /home/sector11/accuweather_conky/messages|fold -s -w 50}
${color6}More for: ${execpi 600 sed -n '3p' /home/sector11/accuweather_conky/days}${color}
${execpi 600 sed -n '5p' /home/sector11/accuweather_conky/messages|fold -s -w 50}
${color6}More for: ${execpi 600 sed -n '5p' /home/sector11/accuweather_conky/days}${color}
${execpi 600 sed -n '7p' /home/sector11/accuweather_conky/messages|fold -s -w 50}

${alignc}${color6}${cpubar cpu2 1,50} More Forecast Information ${cpubar cpu2 1,50}${color}
${color8}${execi 600  sed -n '25p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${color1}${execi 600 sed -n '29p' /home/sector11/conky_wunderground2/messages.wun}${color}

${execi 600 sed -n '27p' /home/sector11/conky_wunderground2/messages.wun}${alignr -10}${execi 600 sed -n '31p' /home/sector11/conky_wunderground2/messages.wun}
${execi 600 sed -n '28p' /home/sector11/conky_wunderground2/messages.wun}${alignr 2}${execi 600 sed -n '32p' /home/sector11/conky_wunderground2/messages.wun}
${voffset -37}${goto 100}${color8}${font conkyweather:size=30}${execi 600  sed -n '9p' /home/sector11/conky_wunderground2/weather_icons}\
${goto 180}${color1}${execi 600  sed -n '11p' /home/sector11/conky_wunderground2/weather_icons}${font}${color}
${execi 600 sed -n '26p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${execi 600 sed -n '30p' /home/sector11/conky_wunderground2/messages.wun}
${hr}
${color8}${execi 600  sed -n '33p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${color1}${execi 600 sed -n '37p' /home/sector11/conky_wunderground2/messages.wun}${color}

${execi 600 sed -n '35p' /home/sector11/conky_wunderground2/messages.wun}${alignr -10}${execi 600 sed -n '39p' /home/sector11/conky_wunderground2/messages.wun}
${execi 600 sed -n '36p' /home/sector11/conky_wunderground2/messages.wun}${alignr 2}${execi 600 sed -n '40p' /home/sector11/conky_wunderground2/messages.wun}
${voffset -37}${goto 100}${color8}${font conkyweather:size=30}${execi 600  sed -n '17p' /home/sector11/conky_wunderground2/weather_icons}\
${goto 180}${color1}${execi 600  sed -n '19p' /home/sector11/conky_wunderground2/weather_icons}${font}${color}
${execi 600 sed -n '34p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${execi 600 sed -n '38p' /home/sector11/conky_wunderground2/messages.wun}
${hr}
${color8}${execi 600  sed -n '41p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${color1}${execi 600 sed -n '45p' /home/sector11/conky_wunderground2/messages.wun}${color}

${execi 600 sed -n '43p' /home/sector11/conky_wunderground2/messages.wun}${alignr -10}${execi 600 sed -n '47p' /home/sector11/conky_wunderground2/messages.wun}
${execi 600 sed -n '44p' /home/sector11/conky_wunderground2/messages.wun}${alignr 2}${execi 600 sed -n '48p' /home/sector11/conky_wunderground2/messages.wun}
${voffset -37}${goto 100}${color8}${font conkyweather:size=30}${execi 600  sed -n '21p' /home/sector11/conky_wunderground2/weather_icons}\
${goto 180}${color1}${execi 600  sed -n '23p' /home/sector11/conky_wunderground2/weather_icons}${font}${color}
${execi 600 sed -n '42p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${execi 600 sed -n '46p' /home/sector11/conky_wunderground2/messages.wun}
${hr}
${color8}${execi 600  sed -n '49p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${color1}${execi 600 sed -n '53p' /home/sector11/conky_wunderground2/messages.wun}${color}

${execi 600 sed -n '51p' /home/sector11/conky_wunderground2/messages.wun}${alignr -10}${execi 600 sed -n '55p' /home/sector11/conky_wunderground2/messages.wun}
${execi 600 sed -n '52p' /home/sector11/conky_wunderground2/messages.wun}${alignr 2}${execi 600 sed -n '56p' /home/sector11/conky_wunderground2/messages.wun}
${voffset -37}${goto 100}${color8}${font conkyweather:size=30}${execi 600  sed -n '25p' /home/sector11/conky_wunderground2/weather_icons}\
${goto 180}${color1}${execi 600  sed -n '27p' /home/sector11/conky_wunderground2/weather_icons}${font}${color}
${execi 600 sed -n '50p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${execi 600 sed -n '54p' /home/sector11/conky_wunderground2/messages.wun}
${if_existing /home/sector11/conky_wunderground2/yes}${hr}
${color8}${execi 600  sed -n '57p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${color1}${execi 600 sed -n '61p' /home/sector11/conky_wunderground2/messages.wun}${color}

${execi 600 sed -n '59p' /home/sector11/conky_wunderground2/messages.wun}${alignr -10}${execi 600 sed -n '63p' /home/sector11/conky_wunderground2/messages.wun}
${execi 600 sed -n '60p' /home/sector11/conky_wunderground2/messages.wun}${alignr 2}${execi 600 sed -n '64p' /home/sector11/conky_wunderground2/messages.wun}
${voffset -37}${goto 100}${color8}${font conkyweather:size=30}${execi 600  sed -n '29p' /home/sector11/conky_wunderground2/weather_icons}\
${goto 180}${color1}${execi 600  sed -n '31p' /home/sector11/conky_wunderground2/weather_icons}${font}${color}
${execi 600 sed -n '58p' /home/sector11/conky_wunderground2/messages.wun}${alignr}${execi 600 sed -n '62p' /home/sector11/conky_wunderground2/messages.wun}
${hr}${else}${hr}
${alignc}No Extra Day${endif}${voffset -160}

draw-bg.lua

--[[    Background by londonali1010 (2009)
    VinDSL Background Hack (2010-2011)

This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish.

To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
    lua_load ~/scripts/draw_bg.lua
    lua_draw_hook_pre draw_bg

Changelog:
    + v3.0    VinDSL Hack (01.28.2011) Killed memory leak.
    + v2.4    VinDSL Hack (01.25.2011) Declared all variables in local.
    + v2.3    VinDSL Hack (12.31.2010) Added shading example(s).
    + v2.2    VinDSL Hack (12.30.2010) Cleaned up the code a bit.
    + v2.1    VinDSL Hack (12.24.2010) Added cairo destroy function(s).
    + v2.0    VinDSL Hack (12.21.2010) Added height adjustment variable.
    + v1.0    Original release (07.10.2009)

]]

-- Change these settings to affect your background:

-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.

    local corner_r = 25

-- Set the colour and transparency (alpha) of your background (0.00 - 0.99).

--    (Light Shading Example)
--    local bg_colour = 0x4d4d4d
--    local bg_alpha = 0.50

--    (Medium Shading Example)
--    local bg_colour = 0x222222
--    local bg_alpha = 0.50

--    (Dark Shading Example)
    local bg_colour = 0x000000
    local bg_alpha = 0.50

--    local bg_colour = 0x222222
--    local bg_alpha = 0.50

-- Tweaks the height of your background, in pixels. If you don't need to adjust the height, use 0.

--    (Default Setting)
    local vindsl_hack_height = 0
--    local vindsl_hack_height = -8

require 'cairo'
local    cs, cr = nil

local function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end

function conky_draw_bg()
    if conky_window == nil then return end
    if cs == nil then cairo_surface_destroy(cs) end
    if cr == nil then cairo_destroy(cr) end
    local w = conky_window.width
    local h = conky_window.height
    local v = vindsl_hack_height
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local cr = cairo_create(cs)
    
    cairo_move_to(cr,corner_r,0)
    cairo_line_to(cr,w-corner_r,0)
    cairo_curve_to(cr,w,0,w,0,w,corner_r)
    cairo_line_to(cr,w,h+v-corner_r)
    cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
    cairo_line_to(cr,corner_r,h+v)
    cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
    cairo_line_to(cr,0,corner_r)
    cairo_curve_to(cr,0,0,0,0,corner_r,0)
    cairo_close_path(cr)

    cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
    cairo_fill(cr)

    cairo_surface_destroy(cs)
    cairo_destroy(cr)
    end

You'll need to visit the first post here: TeoBigusGeekus's HOW TO: Conky weather info using Accuweather/WUnderground/NWS to get the scripts required and read the instructions.  DEAD SIMPLE!

Last edited by Sector11 (2011-10-25 00:49:57)

Online

#63 2011-10-25 14:40:45

demarsjcd
#! Member
Registered: 2011-09-28
Posts: 94

Re: {SOLVED} Conky Weather Disaster

sector,
I tried using your script to get the accuweather for my conky but I'm in the US so I just replaced everyting with USA.  Obviously that wasnt right because mines not working.  It worked for a little bit then I erased the raw script and now this is showing.  Oh and when it was showing it was definetly not updated.  thanks!

.conkyrc

## killall conky && conky -c ~/conky/.conkyrc

 ###  Begin Window Settings  ##################################################
 # Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class Conky
own_window_title AccuWeather Bs As

 ### ARGB can be used for real transparency
 ### NOTE that a composite manager is required for real transparency.
 ### This option will not work as desired (in most cases) in conjunction with
 ### 'own_window_type override'
# own_window_argb_visual yes
 ### When ARGB visuals are enabled, this use this to modify the alpha value
 ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. 
#own_window_argb_value 0

minimum_size 150 0    ## width, height
maximum_width 150    ## width - usually a good idea to equal minimum width.

gap_x 10    ## left &right
gap_y 10    ## up & down

alignment top_left
 ####################################################  End Window Settings  ###
 ###  Font Settings  ##########################################################
 # Use Xft (anti-aliased font and stuff) 
use_xft yes
xftfont monospace:size=8
 # Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
 # Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
draw_outline no
uppercase no

draw_outline no # amplifies text if yes
 ######################################################  End Font Settings  ###
 ###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
 #####################################################  End Color Settings  ###
 ###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 0
 #####################################################  End Borders Secton  ###


 # Use the Xdbe extension? (eliminates flicker)
 # It is highly recommended to use own window with this one so
 # double buffer won't be so big
double_buffer yes

 # Adds spaces around certain objects to stop them
 # from moving other things around.
 # only works with mono fonts
use_spacer right
 # Arguments are left, right, and none (default)

 # Size of the standard text buffer (default is 256 bytes).
 # Will allow for more text display per variable.
text_buffer_size 256

 # Sets bars size even for bars that do not hace that function
 # IE: execbar and execibar
default_bar_size 335 9

 # 0 makes Conky run forever
total_run_times 0
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes

 # Defaults to 4MiB
 # Set to 0 to disable the image cache
 # Increase this value if you use $image lots
imlib_cache_size 0

update_interval 1

lua_load ~/conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg

TEXT
${alignc}${color}${color}${execi 1800 bash /home/jason/accuweather_conky_USA/accuw_USA_script}

${font Orbitron:size=16}Today${font}
${color6}${font conkyweather:size=30}${execi 1800  sed -n '5p' /home/jason/accuweather_conky_USA/images}${font}${color}${goto 60}${voffset -25}${font digitalk:size=30}${execpi 1800 sed -n '1p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=30}°f${font}
${execpi 1800 sed -n '1p' /home/jason/accuweather_conky_USA/messages|fold -s -w 22}

${font Orbitron:size=16}${execpi 1800 sed -n '2p' /home/jason/accuweather_conky_USA/days}${font}
${color6}${font conkyweather:size=30}${execi 1800  sed -n '6p' /home/jason/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 60}H: ${font digitalk:bold:size=15}${execpi 1800 sed -n '2p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 60}L: ${font digitalk:bold:size=15}${execpi 1800 sed -n '3p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 1800 sed -n '3p' /home/jason/accuweather_conky_USA/messages|fold -s -w 22}

${font Orbitron:size=16}${execpi 1800 sed -n '3p' /home/jason/accuweather_conky_USA/days}${font}
${color6}${font conkyweather:size=30}${execi 1800  sed -n '7p' /home/jason/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 60}H: ${font digitalk:bold:size=15}${execpi 1800 sed -n '4p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 60}L: ${font digitalk:bold:size=15}${execpi 1800 sed -n '5p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 1800 sed -n '5p' /home/jason/accuweather_conky_USA/messages|fold -s -w 22}

${font Orbitron:size=16}${execpi 1800 sed -n '4p' /home/jason/accuweather_conky_USA/days}${font}
${color6}${font conkyweather:size=30}${execi 1800  sed -n '8p' /home/jason/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 60}H: ${font digitalk:bold:size=15}${execpi 1800 sed -n '6p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 60}L: ${font digitalk:bold:size=15}${execpi 1800 sed -n '7p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 1800 sed -n '7p' /home/jason/accuweather_conky_USA/messages|fold -s -w 22}

accuw_USA_script

#!/bin/bash

#function: test_image
test_image () {
    case $1 in
     c|d|f)
       echo e
     ;;
     fl|sn)
       echo q
     ;;
     cl)
       echo A
     ;;
     pc)
       echo C
     ;;
     co)
       echo E
     ;;
     fr|r)
       echo i
     ;;
     h|ic)
       echo b
     ;;
     ho)
       echo 5
     ;;
     i)
       echo r
     ;;
     mcl)
       echo B
     ;;
     mc)
       echo c
     ;;
     mcfl|mcsn|psfl)
       echo o
     ;;
     mcs)
       echo g
     ;;
     pcs)
       echo G
     ;;
     mct|psut)
       echo k
     ;;
     pct)
       echo K
     ;;
     msu|psu)
       echo b
     ;;
     psus)
       echo g
     ;;
     s)
       echo h
     ;;
     rsn|sl)
       echo x
     ;;
     su)
       echo a
     ;;
     t)
       echo m
     ;;
     w)
       echo 6
     ;;
    esac
} 

wget -O ~/accuweather_conky_USA/raw http://www.accuweather.com/us/ga/atlanta/30303/forecast-details.asp
sed -i '/feed-tabs/,/\/.feed-tabs/!d' ~/accuweather_conky_USA/raw

#file: days
grep '#' ~/accuweather_conky_USA/raw > ~/accuweather_conky_USA/days
sed -i 's/<\|>/\n/g' ~/accuweather_conky_USA/days
sed -i '/Today\|Tonight\|Overnight\|Tomorrow\|Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday/!d' ~/accuweather_conky_USA/days

#file: messages
grep 'cond' ~/accuweather_conky_USA/raw > ~/accuweather_conky_USA/messages
sed -i 's/<\|>/\n/g' ~/accuweather_conky_USA/messages
sed -i '/span class="cond"\|\/span/d' ~/accuweather_conky_USA/messages

#file: temperatures
grep 'temp' ~/accuweather_conky_USA/raw > ~/accuweather_conky_USA/temperatures
sed -i 's/"temp">\|<span>&\|&\|<\/span>\ /\n/g' ~/accuweather_conky_USA/temperatures
sed -i '/<strong class=\|deg;<\/span><\/strong><span class="low"><span>Lo\|deg;<\/span>/d' ~/accuweather_conky_USA/temperatures
day1=$(sed -n '1p' ~/accuweather_conky_USA/days)
if [[ $day1 == Overnight || $day1 == Tonight ]]; then
   sed -i 1i"-" ~/accuweather_conky_USA/temperatures
fi

#file: images
grep 'icon' ~/accuweather_conky_USA/raw > ~/accuweather_conky_USA/images
sed -i 's/\ i-alarm//g' ~/accuweather_conky_USA/images
sed -i 's/\ i-\|"></\n/g' ~/accuweather_conky_USA/images
sed -i '/<div class="icon\|\/div>/d' ~/accuweather_conky_USA/images
for (( i=1; i<=5; i++ ))
  do
   test_number=$(sed -n "${i}p" ~/accuweather_conky_USA/images)
   test_image $test_number >> ~/accuweather_conky_USA/images
  done
messag1=$(sed -n '1p' ~/accuweather_conky_USA/days)
if [[ $messag1 == Tonight || $messag1 == Overnight ]]; then
   imag1=$(sed -n '1p' ~/accuweather_conky_USA/images)
   case $imag1 in
    h|ic)
      sed -i '6s/b/B/' ~/accuweather_conky_USA/images
    ;;
    mc)
      sed -i '6s/c/C/' ~/accuweather_conky_USA/images
    ;;
    mcfl|mcsn)
      sed -i '6s/o/O/' ~/accuweather_conky_USA/images
    ;;
    mcs)
      sed -i '6s/g/G/' ~/accuweather_conky_USA/images
    ;;
    mct)
      sed -i '6s/k/K/' ~/accuweather_conky_USA/images
    ;;
    esac
fi

When I execute conky -c ~/conky/.conkyrc in terminal

screenshot-10252011-103545am.png

Last edited by demarsjcd (2011-10-25 15:56:32)

Offline

#64 2011-10-25 16:33:58

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

demarsjcd wrote:

sector,
I tried using your script to get the accuweather for my conky but I'm in the US so I just replaced everyting with USA.  Obviously that wasnt right because mines not working.  It worked for a little bit then I erased the raw script and now this is showing.  Oh and when it was showing it was definetly not updated.  thanks!

A couple of things ... did you get archive and install the file according to Teo's instructions:

1b)Accuweather - USA USERS

Go to www.accuweather.com, type in your location and press enter. If your location is found, you should be directed to a page with the forecast. Press the Extended Forecast tab...

Copy and keep the web address somewhere.

Now, download and extract the attached archive (accuweather_conky_new_non_rss_USA.tar.gz)
Put the ConkyWeather.ttf file in your ~/.fonts folder (create it if you don't have one) and put the accuweather_conky_USA folder in your home folder.
Navigate inside the folder and make the script executable:
Either by right clicking it or

chmod +x ~/accuweather_conky_USA/accuw_USA_script

Open the script with your favourite text editor and replace my location's address (Black Oak Arkansas) at the wget command with yours. (The URL you kept above.)
Save and exit.

I have not used that script, I'm not in the USA, but will test it later today.

Also it looks like you do not have two fonts: Orbitron and digitalk which will change things.

I'll grab the file and apply the "example" location with my layout.  Obviously the changing of the lines like you did will be necessary.  I'll be back with results.

UPDATE:  I get the same errors you do --- let me explore more!

Last edited by Sector11 (2011-10-25 16:48:08)

Online

#65 2011-10-25 18:22:47

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

@ demarsjcd]

OK, things are "different" for Accuweather "USA".

I had to figure out what "xxp" variables to use - not so hard.
Then get the spacing right for -25°f and or 100°f - maybe not for you but ...
Anyway, the finished conky using my format shows this:
ce9548155727852.jpg

You should be able to use this conky directly as your location code is not in this but in:

~/accuweather_conky_USA/accuw_USA_script
## killall conky && conky -c ~/TBG/ACC/conkyrc_USA

 ###  Begin Window Settings  ##################################################
 # Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class Conky
own_window_title AccuWeather USA

 ### ARGB can be used for real transparency
 ### NOTE that a composite manager is required for real transparency.
 ### This option will not work as desired (in most cases) in conjunction with
 ### 'own_window_type override'
# own_window_argb_visual yes
 ### When ARGB visuals are enabled, this use this to modify the alpha value
 ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. 
#own_window_argb_value 0

minimum_size 120 0    ## width, height
maximum_width 120    ## width - usually a good idea to equal minimum width.

gap_x 10    ## left &right
gap_y 10    ## up & down

alignment top_right
 ####################################################  End Window Settings  ###
 ###  Font Settings  ##########################################################
 # Use Xft (anti-aliased font and stuff) 
use_xft yes
xftfont monospace:size=8
 # Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
 # Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
draw_outline no
uppercase no

draw_outline no # amplifies text if yes
 ######################################################  End Font Settings  ###
 ###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
 #####################################################  End Color Settings  ###
 ###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 0
 #####################################################  End Borders Secton  ###


 # Use the Xdbe extension? (eliminates flicker)
 # It is highly recommended to use own window with this one so
 # double buffer won't be so big
double_buffer yes

 # Adds spaces around certain objects to stop them
 # from moving other things around.
 # only works with mono fonts
use_spacer right
 # Arguments are left, right, and none (default)

 # Size of the standard text buffer (default is 256 bytes).
 # Will allow for more text display per variable.
text_buffer_size 256

 # Sets bars size even for bars that do not hace that function
 # IE: execbar and execibar
default_bar_size 335 9

 # 0 makes Conky run forever
total_run_times 0
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes

 # Defaults to 4MiB
 # Set to 0 to disable the image cache
 # Increase this value if you use $image lots
imlib_cache_size 0

update_interval 3

lua_load ~/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg

TEXT
${execi 600 bash $HOME/accuweather_conky_USA/accuw_script}${font Orbitron:size=12}${font Orbitron:size=15}${execpi 600 sed -n '1p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '6p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '1p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '2p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '2p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '2p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '7p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '3p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '4p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '5p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '3p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '8p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '5p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '6p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '8p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '4p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '9p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '7p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '8p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '11p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '5p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '10p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '9p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '10p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '14p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

Keep one blank line after the last line of code:

${execpi 600 sed -n '14p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

so the condition text will display.

Would be nice if they gave international users 5 days vs 3 days

Last edited by Sector11 (2011-10-25 18:28:13)

Online

#66 2011-10-25 19:26:04

demarsjcd
#! Member
Registered: 2011-09-28
Posts: 94

Re: {SOLVED} Conky Weather Disaster

Sector11 wrote:

@ demarsjcd]

OK, things are "different" for Accuweather "USA".

I had to figure out what "xxp" variables to use - not so hard.
Then get the spacing right for -25°f and or 100°f - maybe not for you but ...
Anyway, the finished conky using my format shows this:
ce9548155727852.jpg

You should be able to use this conky directly as your location code is not in this but in:

~/accuweather_conky_USA/accuw_USA_script
## killall conky && conky -c ~/TBG/ACC/conkyrc_USA

 ###  Begin Window Settings  ##################################################
 # Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class Conky
own_window_title AccuWeather USA

 ### ARGB can be used for real transparency
 ### NOTE that a composite manager is required for real transparency.
 ### This option will not work as desired (in most cases) in conjunction with
 ### 'own_window_type override'
# own_window_argb_visual yes
 ### When ARGB visuals are enabled, this use this to modify the alpha value
 ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. 
#own_window_argb_value 0

minimum_size 120 0    ## width, height
maximum_width 120    ## width - usually a good idea to equal minimum width.

gap_x 10    ## left &right
gap_y 10    ## up & down

alignment top_right
 ####################################################  End Window Settings  ###
 ###  Font Settings  ##########################################################
 # Use Xft (anti-aliased font and stuff) 
use_xft yes
xftfont monospace:size=8
 # Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
 # Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
draw_outline no
uppercase no

draw_outline no # amplifies text if yes
 ######################################################  End Font Settings  ###
 ###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
 #####################################################  End Color Settings  ###
 ###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 0
 #####################################################  End Borders Secton  ###


 # Use the Xdbe extension? (eliminates flicker)
 # It is highly recommended to use own window with this one so
 # double buffer won't be so big
double_buffer yes

 # Adds spaces around certain objects to stop them
 # from moving other things around.
 # only works with mono fonts
use_spacer right
 # Arguments are left, right, and none (default)

 # Size of the standard text buffer (default is 256 bytes).
 # Will allow for more text display per variable.
text_buffer_size 256

 # Sets bars size even for bars that do not hace that function
 # IE: execbar and execibar
default_bar_size 335 9

 # 0 makes Conky run forever
total_run_times 0
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes

 # Defaults to 4MiB
 # Set to 0 to disable the image cache
 # Increase this value if you use $image lots
imlib_cache_size 0

update_interval 3

lua_load ~/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg

TEXT
${execi 600 bash $HOME/accuweather_conky_USA/accuw_script}${font Orbitron:size=12}${font Orbitron:size=15}${execpi 600 sed -n '1p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '6p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '1p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '2p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '2p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '2p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '7p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '3p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '4p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '5p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '3p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '8p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '5p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '6p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '8p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '4p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '9p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '7p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '8p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '11p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '5p' $HOME/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '10p' ~/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '9p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '10p' $HOME/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '14p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

Keep one blank line after the last line of code:

${execpi 600 sed -n '14p' $HOME/accuweather_conky_USA/messages|fold -s -w 18}

so the condition text will display.

Would be nice if they gave international users 5 days vs 3 days

Hell yeah man!
You were spot on.  I didn't download the fonts so now those work.  I also changed the ~/ to /home/"username"/
another thing was the accuw_script I had to change to accuw_USA_script. 
Here are all my supporting files.

.conkyrc

## killall conky && conky -c ~/TBG/ACC/conkyrc_USA

 ###  Begin Window Settings  ##################################################
 # Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class Conky
own_window_title AccuWeather USA

 ### ARGB can be used for real transparency
 ### NOTE that a composite manager is required for real transparency.
 ### This option will not work as desired (in most cases) in conjunction with
 ### 'own_window_type override'
# own_window_argb_visual yes
 ### When ARGB visuals are enabled, this use this to modify the alpha value
 ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. 
#own_window_argb_value 0

minimum_size 120 0    ## width, height
maximum_width 120    ## width - usually a good idea to equal minimum width.

gap_x 10    ## left &right
gap_y 10    ## up & down

alignment top_left
 ####################################################  End Window Settings  ###
 ###  Font Settings  ##########################################################
 # Use Xft (anti-aliased font and stuff) 
use_xft yes
xftfont monospace:size=8
 # Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
 # Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
draw_outline no
uppercase no

draw_outline no # amplifies text if yes
 ######################################################  End Font Settings  ###
 ###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
 #####################################################  End Color Settings  ###
 ###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 0
 #####################################################  End Borders Secton  ###


 # Use the Xdbe extension? (eliminates flicker)
 # It is highly recommended to use own window with this one so
 # double buffer won't be so big
double_buffer yes

 # Adds spaces around certain objects to stop them
 # from moving other things around.
 # only works with mono fonts
use_spacer right
 # Arguments are left, right, and none (default)

 # Size of the standard text buffer (default is 256 bytes).
 # Will allow for more text display per variable.
text_buffer_size 256

 # Sets bars size even for bars that do not hace that function
 # IE: execbar and execibar
default_bar_size 335 9

 # 0 makes Conky run forever
total_run_times 0
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes

 # Defaults to 4MiB
 # Set to 0 to disable the image cache
 # Increase this value if you use $image lots
imlib_cache_size 0

update_interval 3

lua_load /home/jason/conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg

TEXT
${execi 600 bash /home/jason/accuweather_conky_USA/accuw_USA_script}${font Orbitron:size=12}${font Orbitron:size=15}${execpi 600 sed -n '1p' /home/jason/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '6p' /home/jason/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '1p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '2p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '2p' /home/jason/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '2p' /home/jason/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '7p' /home/jason/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '3p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '4p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '5p' /home/jason/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '3p' /home/jason/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '8p' /home/jason/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '5p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '6p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '8p' /home/jason/accuweather_conky_USA/messages|fold -s -w 18}

${font Orbitron:size=12}${execpi 600 sed -n '4p' /home/jason/accuweather_conky_USA/days}${font}
${voffset 5}${color6}${font conkyweather:size=30}${execi 600  sed -n '9p' /home/jason/accuweather_conky_USA/images}${font}${color}${voffset -25}${goto 55}H: ${font digitalk:bold:size=15}${execpi 600 sed -n '7p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${goto 55}L: ${font digitalk:bold:size=15}${execpi 600 sed -n '8p' /home/jason/accuweather_conky_USA/temperatures}${font Orbitron:size=15}°f${font}
${execpi 600 sed -n '11p' /home/jason/accuweather_conky_USA/messages|fold -s -w 18}

conkyrc

# conky -c ~/conky/kruijf/kruijf
# LMDE-CONKY
# A comprehensive conky script, configured for use on
# Debian Gnome, without the need for any external scripts.
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages 
# - netstat connections to your computer
#
# -- Pengo (conky@pengo.us)

use_xft yes  ## added by Sector11
xftalpha 0.8
xftfont Bitstream Vera Sans Mono:size=8   ## Added by Sector11
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_transparent yes
    own_window_type desktop
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 170 0
maximum_width 170

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 5 ## changed: border_margin change to border_inner_margin or border_outter_margin

# border width
border_width 1

# Default colors and also border colors
default_color white
own_window_colour white

# Text alignment, other possible values are commented
alignment top_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 5
gap_y 5

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none
if_up_strictness address

default_bar_size 40 8

TEXT
TIME & DATE ${hr 2}
${alignc 25}${font Trebuchet MS:size=26}${time %H:%M}${font}
${alignc}${time %a %d %b %Y}

SYSTEM ${hr 2}

Kernel: liquorix 3.0.0-6
RAM: $memperc% ${alignr 5}${membar}
Uptime: ${alignr 5}${uptime}

Processor info: ${hr 2}

${voffset 5}${freq}MHz
Load: ${color #88ECE0}${loadavg}${color}
Core 1 Usage:${color} ${color #DFEC88}${cpu cpu1}% ${color}${alignr 5}${cpubar cpu1}
Core 2 Usage:${color} ${color #DFEC88}${cpu cpu0}% ${color}${alignr 5}${cpubar cpu0}
CPU Temp: ${color #88ECE0}85° F${color}

HD ${hr 2}

Home:
${fs_free /home}/${fs_size /home} ${alignr 5}${fs_bar /home}
Root:
${fs_free /root}/${fs_size /root} ${alignr 5}${fs_bar /root}
SWAP:
${swap}/${swapmax}${alignr 5}${swapperc}%${swapbar}

Network info ${hr 2}


${if_up wlan0}${voffset -20}${font size=12}Wireless Stuff!${font}
Int IP: ${addr wlan0}
Ext IP: ${exec wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'}
${downspeedgraph wlan0 25,100 110000 520000 -t} ${upspeedgraph wlan0 25,100 001100 005200 -t}

${voffset -40} Down ${downspeedf wlan0}${alignr 5}Total Dn ${totaldown wlan0}
 UP ${upspeedf wlan0}${alignr 5}Total UP ${totalup wlan0}


${else}${if_up eth0}${voffset -20}${font style=bold}${font}
Int IP: ${addr eth0}
Ext IP: ${exec wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'}
${downspeedgraph eth0 25,80 110000 520000 -t} ${upspeedgraph eth0 25,80 001100 005200 -t}
${voffset -28} Dn: ${downspeedf eth0}${goto 100}T: ${totaldown eth0}

startconky.sh

#!/bin/bash

sleep 1 &&
conky -c ~/conky/.conkyrc &
sleep 1 &&
conky -c ~/conky/conkyrc &
exit

accuw_USA_script

#!/bin/bash

#function: test_image
test_image () {
    case $1 in
     c|d|f)
       echo e
     ;;
     fl|sn)
       echo q
     ;;
     cl)
       echo A
     ;;
     pc)
       echo C
     ;;
     co)
       echo E
     ;;
     fr|r)
       echo i
     ;;
     h|ic)
       echo b
     ;;
     ho)
       echo 5
     ;;
     i)
       echo r
     ;;
     mcl)
       echo B
     ;;
     mc)
       echo c
     ;;
     mcfl|mcsn|psfl)
       echo o
     ;;
     mcs)
       echo g
     ;;
     pcs)
       echo G
     ;;
     mct|psut)
       echo k
     ;;
     pct)
       echo K
     ;;
     msu|psu)
       echo b
     ;;
     psus)
       echo g
     ;;
     s)
       echo h
     ;;
     rsn|sl)
       echo x
     ;;
     su)
       echo a
     ;;
     t)
       echo m
     ;;
     w)
       echo 6
     ;;
    esac
} 

wget -O ~/accuweather_conky_USA/raw http://www.accuweather.com/us/ga/atlanta/30303/forecast-details.asp
sed -i '/feed-tabs/,/\/.feed-tabs/!d' ~/accuweather_conky_USA/raw

#file: days
grep '#' ~/accuweather_conky_USA/raw > ~/accuweather_conky_USA/days
sed -i 's/<\|>/\n/g' ~/accuweather_conky_USA/days
sed -i '/Today\|Tonight\|Overnight\|Tomorrow\|Monday\|Tuesday\|Wednesday\|Thursday\|Friday\|Saturday\|Sunday/!d' ~/accuweather_conky_USA/days

#file: messages
grep 'cond' ~/accuweather_conky_USA/raw > ~/accuweather_conky_USA/messages
sed -i 's/<\|>/\n/g' ~/accuweather_conky_USA/messages
sed -i '/span class="cond"\|\/span/d' ~/accuweather_conky_USA/messages

#file: temperatures
grep 'temp' ~/accuweather_conky_USA/raw > ~/accuweather_conky_USA/temperatures
sed -i 's/"temp">\|<span>&\|&\|<\/span>\ /\n/g' ~/accuweather_conky_USA/temperatures
sed -i '/<strong class=\|deg;<\/span><\/strong><span class="low"><span>Lo\|deg;<\/span>/d' ~/accuweather_conky_USA/temperatures
day1=$(sed -n '1p' ~/accuweather_conky_USA/days)
if [[ $day1 == Overnight || $day1 == Tonight ]]; then
   sed -i 1i"-" ~/accuweather_conky_USA/temperatures
fi

#file: images
grep 'icon' ~/accuweather_conky_USA/raw > ~/accuweather_conky_USA/images
sed -i 's/\ i-alarm//g' ~/accuweather_conky_USA/images
sed -i 's/\ i-\|"></\n/g' ~/accuweather_conky_USA/images
sed -i '/<div class="icon\|\/div>/d' ~/accuweather_conky_USA/images
for (( i=1; i<=5; i++ ))
  do
   test_number=$(sed -n "${i}p" ~/accuweather_conky_USA/images)
   test_image $test_number >> ~/accuweather_conky_USA/images
  done
messag1=$(sed -n '1p' ~/accuweather_conky_USA/days)
if [[ $messag1 == Tonight || $messag1 == Overnight ]]; then
   imag1=$(sed -n '1p' ~/accuweather_conky_USA/images)
   case $imag1 in
    h|ic)
      sed -i '6s/b/B/' ~/accuweather_conky_USA/images
    ;;
    mc)
      sed -i '6s/c/C/' ~/accuweather_conky_USA/images
    ;;
    mcfl|mcsn)
      sed -i '6s/o/O/' ~/accuweather_conky_USA/images
    ;;
    mcs)
      sed -i '6s/g/G/' ~/accuweather_conky_USA/images
    ;;
    mct)
      sed -i '6s/k/K/' ~/accuweather_conky_USA/images
    ;;
    esac
fi

Here's what it looks like.

Thanks again sector and everyone that has helped out.  Hopefully I dont look at any more of your conky's because I will most likely feel the need to change this one lol.

screenshot-10252011-032036pm.php

Last edited by demarsjcd (2011-10-25 19:27:28)

Offline

#67 2011-10-25 19:41:10

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

demarsjcd wrote:

Hell yeah man!
You were spot on.  I didn't download the fonts so now those work.  I also changed the ~/ to /home/"username"/
another thing was the accuw_script I had to change to accuw_USA_script.

So there you go, five days weather.  big_smile
Glad to have helped.

Online

#68 2011-10-28 21:54:56

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,410
Website

Re: {SOLVED} Conky Weather Disaster

OK, I'm back with another marriage of Accuweather and Wunderground.

ada303156267742.jpg

I have done extensive testing with possible outputs be it text or the conkyweather font.  Everything works.  I have more thing's I'm working on but this is ready to go.

Other than the fonts used by the script I'm using Unispace, a monospace font, and monospace so you'll need those as well.  I dropped the "digitalk" font I used before as it doesn't do " - " or " ° " where Unispace does.

There are changes made to wunderground-script and accuw_script so grab those as well if you want this conky.

The conky: conkyrc_AW_R (call it what you want)

## killall conky && conky -c ~/TBG/conkyrc_AW_R &

 ###  Begin Window Settings  ##################################################
 # Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class Conky
own_window_title AccuWeather Bs As

 ### ARGB can be used for real transparency
 ### NOTE that a composite manager is required for real transparency.
 ### This option will not work as desired (in most cases) in conjunction with
 ### 'own_window_type override'
# own_window_argb_visual yes
 ### When ARGB visuals are enabled, this use this to modify the alpha value
 ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. 
#own_window_argb_value 0

minimum_size 150 0    ## width, height
maximum_width 150    ## width - usually a good idea to equal minimum width.

gap_x 10    ## left &right
gap_y 10    ## up & down

alignment top_right
 ####################################################  End Window Settings  ###
 ###  Font Settings  ##########################################################
 # Use Xft (anti-aliased font and stuff) 
use_xft yes
xftfont monospace:size=8
 # Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
 # Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
draw_outline no
uppercase no

draw_outline no # amplifies text if yes
 ######################################################  End Font Settings  ###
 ###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
 #####################################################  End Color Settings  ###
 ###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 0
 #####################################################  End Borders Secton  ###


 # Use the Xdbe extension? (eliminates flicker)
 # It is highly recommended to use own window with this one so
 # double buffer won't be so big
double_buffer yes

 # Adds spaces around certain objects to stop them
 # from moving other things around.
 # only works with mono fonts
use_spacer right
 # Arguments are left, right, and none (default)

 # Size of the standard text buffer (default is 256 bytes).
 # Will allow for more text display per variable.
text_buffer_size 256

 # Sets bars size even for bars that do not hace that function
 # IE: execbar and execibar
default_bar_size 335 9

 # 0 makes Conky run forever
total_run_times 0
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes

 # Defaults to 4MiB
 # Set to 0 to disable the image cache
 # Increase this value if you use $image lots
imlib_cache_size 0

update_interval 3

lua_load ~/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg

TEXT
${execi 1200 bash /home/sector11/accuweather_conky/accuw_script}${execi 1200 bash /home/sector11/conky_wunderground2/wunderground-script}${alignc}Buenos Aires
${alignc}${time %d %b. %Y}${font}
${voffset 5}${color8}Sunrise${alignr}${color1}Sunset${color}
${color8}${execi 1200 sed -n '8p' /home/sector11/accuweather_conky/today}${alignr}${color1}${execi 1200 sed -n '9p' /home/sector11/accuweather_conky/today}${color}
${voffset -25}${font Unispace:bold:size=15}${goto 63}${execi 1200 sed -n '1p' /home/sector11/accuweather_conky/days}${font}
${voffset 5}${font Unispace:bold:size=15}${execi 1200 sed -n '2p' /home/sector11/accuweather_conky/temperatures}°${alignr}${execi 1200 sed -n '3p' /home/sector11/accuweather_conky/temperatures}°${font}
High${alignr}Low
${execi 1200 sed -n '3p' /home/sector11/accuweather_conky/messages|fold -s -w 21}
${voffset 5}Current${alignr}Feels
${font Unispace:bold:size=15}${execi 1200 sed -n '1p' /home/sector11/accuweather_conky/temperatures}°${alignr}${execi 1200 sed -n '1p' /home/sector11/accuweather_conky/today}°${font}
${goto 63}${voffset -30}${color6}${font conkyweather:size=30}${execi 1200  sed -n '5p' ~/accuweather_conky/images}${font}${color}
${color6}Now:${color}${goto 50}${execi 1200 sed -n '1p' /home/sector11/accuweather_conky/messages|fold -s -w 15}
${voffset 5}${color6}WND: ${color}${execi 1200 sed -n '2p' /home/sector11/accuweather_conky/today}
${color6}VIS: ${color}${execi 1200 sed -n '7p' /home/sector11/accuweather_conky/today}
${color6}HUM: ${color}${execi 1200 sed -n '3p' /home/sector11/accuweather_conky/today}${goto 90}${color6}DWP: ${color}${execi 1200 sed -n '4p' /home/sector11/accuweather_conky/today}°
${color6}BRM: ${color}${execi 1200 sed -n '5p' /home/sector11/accuweather_conky/today} ${execi 1200 sed -n '6p' /home/sector11/accuweather_conky/today}
${alignc}${cpubar 1,80}
${goto 63}${font Unispace:bold:size=12}${color1}${execpi 600 sed -n '5p' /home/sector11/conky_wunderground2/messages.wun}${color}${font}
${goto 63}${execpi 600 sed -n '8p' /home/sector11/conky_wunderground2/messages.wun}
${font monospace:size=7.5}${execpi 600 sed -n '6p' /home/sector11/conky_wunderground2/messages.wun}${font}
 ${voffset -45}${color1}${font conkyweather:size=26}${execpi 600  sed -n '3p' /home/sector11/conky_wunderground2/weather_icons}${font}${color}
${voffset 5}${alignc}${color6}${cpubar 1,150}${color}
${font Unispace:bold:size=15}${goto 63}${execi 1200 sed -n '3p' /home/sector11/accuweather_conky/days}${font}
${goto 63}High${alignr}Low
${font Unispace:bold:size=13}${goto 63}${execi 1200 sed -n '4p' /home/sector11/accuweather_conky/temperatures}°${alignr}${execi 1200 sed -n '5p' /home/sector11/accuweather_conky/temperatures}°${font}
 ${voffset -50}${color6}${font conkyweather:size=30}${execi 1200  sed -n '7p' ~/accuweather_conky/images}${font}${color}

${execi 1200 sed -n '5p' /home/sector11/accuweather_conky/messages|fold -s -w 21}
${alignc}${cpubar 1,80}
${goto 63}${font Unispace:bold:size=12}${color1}${execpi 600 sed -n '13p' /home/sector11/conky_wunderground2/messages.wun}${color}${font}
${goto 63}${execpi 600 sed -n '16p' /home/sector11/conky_wunderground2/messages.wun}
${font monospace:size=7.5}${execpi 600 sed -n '14p' /home/sector11/conky_wunderground2/messages.wun}${font}
 ${voffset -45}${color1}${font conkyweather:size=26}${execpi 600  sed -n '7p' /home/sector11/conky_wunderground2/weather_icons}${font}${color}
${voffset 5}${alignc}${color6}${cpubar 1,150}${color}
${font Unispace:bold:size=15}${goto 63}${execi 1200 sed -n '5p' /home/sector11/accuweather_conky/days}${font}
${goto 63}High${alignr}Low
${font Unispace:bold:size=13}${goto 63}${execi 1200 sed -n '6p' /home/sector11/accuweather_conky/temperatures}°${alignr}${execi 1200 sed -n '7p' /home/sector11/accuweather_conky/temperatures}°${font}
 ${voffset -50}${color6}${font conkyweather:size=30}${execi 1200  sed -n '8p' ~/accuweather_conky/images}${font}${color}

${execi 1200 sed -n '7p' /home/sector11/accuweather_conky/messages|fold -s -w 21}
${alignc}${cpubar 1,80}
${font Unispace:bold:size=12}${goto 63}${color1}${execpi 600 sed -n '21p' /home/sector11/conky_wunderground2/messages.wun}${color}${font}
${goto 63}${execpi 600 sed -n '24p' /home/sector11/conky_wunderground2/messages.wun}
${font monospace:size=7.5}${execpi 600 sed -n '22p' /home/sector11/conky_wunderground2/messages.wun}${font}
 ${voffset -45}${color1}${font conkyweather:size=26}${execpi 600  sed -n '11p' /home/sector11/conky_wunderground2/weather_icons}${font}${color}
${voffset 5}${alignc}${color6}${cpubar 1,150}${color}${voffset -280}

wunderground-script

#!/bin/bash

#function: test_weather_message
test_weather_message () {
  if [[ $1 == "Chance of Flurries" || $1 == Flurries ]]; then
      echo p
    elif [[ $1 == "Chance of Rain" ]]; then
      echo h
    elif [[ $1 == "Chance of Freezing Rain" || $1 == "Light Freezing Rain" || $1 == "Freezing Rain" ]]; then
      echo v
    elif [[ $1 == "Chance of Sleet" || $1 == Sleet ]]; then
      echo w
    elif [[ $1 == "Chance of Snow" ]]; then
      echo q 
    elif [[ $1 ==  "Chance of Thunderstorms" || $1 == Thunderstorms || $1 == Thunderstorm ]]; then
      echo n
    elif [[ $1 ==  "Chance of a Thunderstorm" ]]; then
      echo m
    elif [[ $1 ==  Clear || $1 == Sunny ]]; then
      echo a
    elif [[ $1 ==  Cloudy ]]; then
      echo d
    elif [[ $1 ==  Fog || $1 == Haze ]]; then
      echo 0
    elif [[ $1 ==  "Mostly Cloudy" || $1 == "Partly Cloudy" || $1 == "Partly Sunny" ]]; then
      echo c
    elif [[ $1 ==  "Mostly Sunny" || $1 == "Scattered Clouds" ]]; then
      echo b
    elif [[ $1 ==  Rain ]]; then
      echo i
    elif [[ $1 ==  Snow ]]; then
      echo r
    elif [[ $1 ==  Overcast ]]; then
      echo e
    else echo -
  fi    
} 

#function: test_weather_message_night
test_weather_message_night () {
  if [[ $1 == "Chance of Flurries" || $1 == Flurries || $1 == "Chance of Snow" || $1 ==  Snow ]]; then
      echo O
    elif [[ $1 == "Chance of Rain" || $1 == "Chance of Freezing Rain" || $1 == "Light Freezing Rain" || $1 == "Freezing Rain" || $1 == "Chance of Sleet" || $1 == Sleet || $1 ==  Rain ]]; then
      echo G
    elif [[ $1 ==  "Chance of Thunderstorms" || $1 == Thunderstorms || $1 == Thunderstorm ]]; then
      echo K
    elif [[ $1 ==  "Chance of a Thunderstorm" ]]; then
      echo m
    elif [[ $1 ==  Clear || $1 == Sunny ]]; then
      echo A
    elif [[ $1 ==  Cloudy ]]; then
      echo D
    elif [[ $1 ==  Fog || $1 == Haze ]]; then
      echo 0
    elif [[ $1 ==  "Mostly Cloudy" || $1 == "Partly Cloudy" || $1 == "Partly Sunny" ]]; then
      echo C
    elif [[ $1 ==  "Mostly Sunny" || $1 == "Scattered Clouds" ]]; then
      echo B
    elif [[ $1 ==  Overcast ]]; then
      echo D
    else echo -
  fi    
} 

#function: test_wind_message
test_wind_message () {
  if [[ $1 == Sou ]]; then
      echo 1
    elif [[ $1 == SSW ]]; then
      echo 2
    elif [[ $1 == "SW " ]]; then
      echo 3
    elif [[ $1 == WSW || $1 == Sleet ]]; then
      echo 4
    elif [[ $1 == Wes ]]; then
      echo 5 
    elif [[ $1 ==  WNW ]]; then
      echo 6
    elif [[ $1 ==  "NW " ]]; then
      echo 7
    elif [[ $1 ==  NNW ]]; then
      echo 8
    elif [[ $1 ==  Nor ]]; then
      echo 9
    elif [[ $1 ==  NNE ]]; then
      echo ":"
    elif [[ $1 ==  "NE " ]]; then
      echo ";"
    elif [[ $1 ==  ENE ]]; then
      echo "<"
    elif [[ $1 ==  Eas ]]; then
      echo "="
    elif [[ $1 ==  ESE ]]; then
      echo ">"
    elif [[ $1 ==  "SE " ]]; then
      echo "?"
    elif [[ $1 ==  SSE ]]; then
      echo "@"
    else echo "-"
  fi    
} 

rm ~/conky_wunderground2/yes
rm ~/conky_wunderground2/weather_icons
wget -O ~/conky_wunderground2/ics [url]http://ical.wunderground.com/auto/ical/global/stations/87582.ics?units=metric[/url]
egrep -i 'DESCRIPTION' ~/conky_wunderground2/ics > ~/conky_wunderground2/messages.wun
sed -i 's/\\n/\n/g' ~/conky_wunderground2/messages.wun
sed -i 's/DESCRIPTION://g' ~/conky_wunderground2/messages.wun
sed -i 's/ - /\n/g' ~/conky_wunderground2/messages.wun
sed -i 's/High/\nHigh/g' ~/conky_wunderground2/messages.wun
sed -i 's/Low/\nLow/g' ~/conky_wunderground2/messages.wun
sed -i 's/Wind /\n/g' ~/conky_wunderground2/messages.wun
sed -i 's/\..*//g' ~/conky_wunderground2/messages.wun

### Edit these to your tastes ###
# Change to short weekday names
sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' ~/conky_wunderground2/messages.wun
# Change Full Word compass points to Single Letter
sed -i -e 's/North/N/' -e 's/East/E/' -e 's/South/S/' -e 's/West/W/' ~/conky_wunderground2/messages.wun
# Change High Low to H: L:
sed -i -e 's/High/H:/' -e 's/Low/L:/' ~/conky_wunderground2/messages.wun
# Change double spaces for single spaces
sed -i -e 's/  / /' ~/conky_wunderground2/messages.wun
# Delete space after ' C '
#sed -i -e 's/ C / C/' ~/conky_wunderground2/messages.wun
# Chance ' C ' to '°'
sed -i -e 's/ C /°/' ~/conky_wunderground2/messages.wun
### End of Edited Section ###
for (( i=2; i<=100; i+=8 ))
  do
   test_line=$(sed -n "${i}p" ~/conky_wunderground2/messages.wun)
   if [[ $test_line == "" ]]; then
     break
   fi
   test_weather_message "$test_line" >> ~/conky_wunderground2/weather_icons
   j=$((i+2))
   test_line=$(sed -n "${j}p" ~/conky_wunderground2/messages.wun|cut -c1-3)
   if [[ $test_line == "" ]]; then
     break
   fi
   test_wind_message "$test_line" >> ~/conky_wunderground2/weather_icons
   j=$((i+4))
   test_line=$(sed -n "${j}p" ~/conky_wunderground2/messages.wun)
   if [[ $test_line == "" ]]; then
     break
   fi
   test_weather_message_night "$test_line" >> ~/conky_wunderground2/weather_icons
   j=$((i+6))
   test_line=$(sed -n "${j}p" ~/conky_wunderground2/messages.wun|cut -c1-3)
   if [[ $test_line == "" ]]; then
     break
   fi
   test_wind_message "$test_line" >> ~/conky_wunderground2/weather_icons
  done
days_no=$(($(cat ~/conky_wunderground2/weather_icons|wc -l)/4))
if [[ $days_no == 8 ]]; then
   touch ~/conky_wunderground2/yes
fi

and accuw_script

#!/bin/bash

#function: test_image
test_image () {
    case $1 in
     1)
       echo a
     ;;
     2)
       echo b
     ;;
     [3-5])
       echo c
     ;;
     6)
       echo d
     ;;
     [7-8])
       echo e
     ;;
     11)
       echo 0
     ;;
     12)
       echo h
     ;;
     13|14)
       echo g
     ;;
     15)
       echo l
     ;;
     16|17)
       echo k
     ;;
     18|26)
       echo i
     ;;
     19)
       echo p
     ;;
     20|21|23)
       echo o
     ;;
     22)
       echo r
     ;;
     24|31)
       echo E
     ;;
     25)
       echo u
     ;;
     29)
       echo v
     ;;
     30)
       echo 5
     ;;
     32)
       echo 6
     ;;
     33)
       echo A
     ;;
     34|36|37)
       echo B
     ;;
     35|38)
       echo C
     ;;
     39|40)
       echo G
     ;;
     41|42)
       echo K
     ;;
     43|44)
       echo O
     ;;
    esac
} 

wget -O ~/accuweather_conky/raw [url]http://www.accuweather.com/en-us/ar/buenos-aires---capital-federal/buenos-aires/quick-look.aspx?cityid=7894[/url]
sed -i '/Current Conditions Pannel/,/End 3 Day Pannel/!d' ~/accuweather_conky/raw

#file: images 
egrep -i 'jpg' ~/accuweather_conky/raw > ~/accuweather_conky/images
sed -i 's/"/\n/g' ~/accuweather_conky/images
sed -i '/.*jpg/!d' ~/accuweather_conky/images
sed -i 's/\//\n/g' ~/accuweather_conky/images
sed -i '/jpg/!d' ~/accuweather_conky/images
sed -i 's/_int.jpg//g' ~/accuweather_conky/images
for (( i=1; i<=4; i++ ))
  do
   test_number=$(sed -n "${i}p" ~/accuweather_conky/images)
   test_image $test_number >> ~/accuweather_conky/images
  done

#file: today - just the data no headings
egrep -i 'RealFeelValue|WindsValue|HumidityValue|DewPointValue|PressureValue|PressureTenValue|VisibilityValue|SunRiseValue|SunSetValue' ~/accuweather_conky/raw > ~/accuweather_conky/today
sed -i 's/^.*block;">//g' ~/accuweather_conky/today
sed -i 's/Value.*">/ /g' ~/accuweather_conky/today
sed -i 's/<\/span>.*$//g' ~/accuweather_conky/today
sed -i 's/&deg;C//g' ~/accuweather_conky/today

#file: extra_info - for today - has headings
egrep -i 'RealFeelValue|WindsValue|HumidityValue|DewPointValue|PressureValue|PressureTenValue|VisibilityValue|SunRiseValue|SunSetValue' ~/accuweather_conky/raw > ~/accuweather_conky/extra_info
sed -i 's/^.*_lbl//g' ~/accuweather_conky/extra_info
sed -i 's/Value.*">/ /g' ~/accuweather_conky/extra_info
sed -i 's/<\/span>.*$//g' ~/accuweather_conky/extra_info
sed -i 's/&deg;//g' ~/accuweather_conky/extra_info

#file: days
egrep -i 'monday|tuesday|wednesday|thursday|friday|saturday|sunday' ~/accuweather_conky/raw > ~/accuweather_conky/days
sed -i 's/px;">/\n/g;s/<\/span>/\n/g' ~/accuweather_conky/days
sed -i '/padding/d' ~/accuweather_conky/days
# Change weekday names to short names
sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' ~/accuweather_conky/days

#file: temperatures
egrep -i 'currenttemp|high|low' ~/accuweather_conky/raw > ~/accuweather_conky/temperatures
sed -i 's/: /\n/g;s/>/\n/g;s/;/\n/g' ~/accuweather_conky/temperatures
sed -i '/.*&/!d' ~/accuweather_conky/temperatures
sed -i 's/&deg//g' ~/accuweather_conky/temperatures

#file: messages
egrep -i 'currenttext|txtforecast' ~/accuweather_conky/raw > ~/accuweather_conky/messages
sed -i 's/px;">/\n/g;s/<\/span>/\n/g' ~/accuweather_conky/messages
sed -i '/<span/d' ~/accuweather_conky/messages

NOTE: the creation of two new files by accuw_script:

  1. #file: today - just the data no headings

  2. #file: extra_info - for today - has headings

I use the no heading version as I prefer my own text to format.

Enjoy.

Last edited by Sector11 (2011-11-02 00:51:43)

Online

#69 2011-11-01 15:38:27

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 350

Re: {SOLVED} Conky Weather Disaster

Teo Accuweather USA updated to include Current, Sun and Moon times.

Link to post over on The Orange Side

My code is a bit different than presence uses. 

screenshot-1286.png

${font Nimbus Sans L:bold:size=8.25}${color4}Chronometer  ${color8}${hr 2}
${goto 80}${font Droid Sans:size=38}${color4}${time %H:%M:%S}${font}
${goto 40}${color 778899}Sunrise: ${execpi 1800 sed -n '14p' /home/bkberger/accuweather_conky_USA/current}   ${goto 170}Moonrise: ${execpi 600 sed -n '16p' /home/bkberger/accuweather_conky_USA/current}
${goto 40}Sunset:  ${execpi 1800 sed -n '18p' /home/bkberger/accuweather_conky_USA/current}   ${goto 170}Moonset:  ${execpi 1800 sed -n '20p' /home/bkberger/accuweather_conky_USA/current}
${goto 90}${time %A %B %e %Y}
#${color4}
${goto 10}Forecast For:  ${alignr}Porterville CA (Elev. 479 ft)
${goto 10}Lat/Lon: ${execi 86400 conkyLatLong}
${execi 1800 bash /home/bkberger/accuweather_conky_USA/accuw_USA_script}${goto 10}Feels Like:     ${execpi 1800 sed -n '3p' /home/bkberger/accuweather_conky_USA/current}° ${alignr}Wind:           ${execpi 1800 sed -n '12p' /home/bkberger/accuweather_conky_USA/current} ${execpi 1800 sed -n '13p' /home/bkberger/accuweather_conky_USA/current}mph
${goto 10}Humidity:       ${execpi 1800 sed -n '5p' /home/bkberger/accuweather_conky_USA/current}% ${goto 180}Dew Point:      ${execpi 1800 sed -n '9p' /home/bkberger/accuweather_conky_USA/current}°
${goto 10}Precipitation:  ${execpi 1800 sed -n '10p' /home/bkberger/accuweather_conky_USA/current}in ${alignr}Pressure:       ${execpi 1800 sed -n '6p' /home/bkberger/accuweather_conky_USA/current}in
${goto 10}Cloud Cover:    ${execpi 1800 sed -n '7p' /home/bkberger/accuweather_conky_USA/current}% ${alignr}Visibility:     ${execpi 1800 sed -n '11p' /home/bkberger/accuweather_conky_USA/current} miles

${goto 40}${font conkyweather:size=36}${color3}${execpi 1800  sed -n '23p' /home/bkberger/accuweather_conky_USA/current}${color4}
${font Nimbus Sans L:size=26}${goto 138}${voffset -75}${execpi 1800 sed -n '2p' /home/bkberger/accuweather_conky_USA/current}°
${font}${goto 138}${voffset -33}${execpi 1800 sed -n '1p' /home/bkberger/accuweather_conky_USA/current|fold -w30}

${goto 40}${font conkyweather:size=36}${color3}${execpi 1800  sed -n '6p' /home/bkberger/accuweather_conky_USA/images}${color4}${font Nimbus Sans L:bold:size=8}${goto 138}${voffset -40}${execpi 1800 sed -n '1p' /home/bkberger/accuweather_conky_USA/days}
${font}${goto 138}${execpi 1800 sed -n '2p' /home/bkberger/accuweather_conky_USA/messages|fold -w30}
${goto 138}High: ${execpi 1800 sed -n '1p' /home/bkberger/accuweather_conky_USA/temperatures}°  Low: ${execpi 1800 sed -n '2p' /home/bkberger/accuweather_conky_USA/temperatures}°

${goto 40}${font conkyweather:size=36}${color3}${execpi 1800  sed -n '7p' /home/bkberger/accuweather_conky_USA/images}${color4}${font Nimbus Sans L:bold:size=8}${goto 138}${voffset -35}${execpi 1800 sed -n '2p' /home/bkberger/accuweather_conky_USA/days}
${font}${goto 138}${execpi 1800 sed -n '5p' /home/bkberger/accuweather_conky_USA/messages|fold -w30}
${goto 138}High: ${execpi 1800 sed -n '3p' /home/bkberger/accuweather_conky_USA/temperatures}°  Low: ${execpi 1800 sed -n '4p' /home/bkberger/accuweather_conky_USA/temperatures}°

${goto 40}${font conkyweather:size=36}${color3}${execpi 1800  sed -n '8p' /home/bkberger/accuweather_conky_USA/images}${color4}${font Nimbus Sans L:bold:size=8}${goto 138}${voffset -35}${execpi 1800 sed -n '3p' /home/bkberger/accuweather_conky_USA/days}
${font}${goto 138}${execpi 1800 sed -n '8p' /home/bkberger/accuweather_conky_USA/messages|fold -w30}
${goto 138}High: ${execpi 1800 sed -n '5p' /home/bkberger/accuweather_conky_USA/temperatures}°  Low: ${execpi 1800 sed -n '6p' /home/bkberger/accuweather_conky_USA/temperatures}°

${goto 40}${font conkyweather:size=36}${color3}${execpi 1800  sed -n '9p' /home/bkberger/accuweather_conky_USA/images}${color4}${font Nimbus Sans L:bold:size=8}${goto 138}${voffset -35}${execpi 1800 sed -n '4p' /home/bkberger/accuweather_conky_USA/days}
${font}${goto 138}${execpi 1800 sed -n '11p' /home/bkberger/accuweather_conky_USA/messages|fold -w30}
${goto 138}High: ${execpi 1800 sed -n '7p' /home/bkberger/accuweather_conky_USA/temperatures}°  Low: ${execpi 1800 sed -n '8p' /home/bkberger/accuweather_conky_USA/temperatures}°

${goto 40}${font conkyweather:size=36}${color3}${execpi 1800  sed -n '10p' /home/bkberger/accuweather_conky_USA/images}${color4}${font Nimbus Sans L:bold:size=8}${goto 138}${voffset -35}${execpi 1800 sed -n '5p' /home/bkberger/accuweather_conky_USA/days}
${font}${goto 138}${execpi 1800 sed -n '14p' /home/bkberger/accuweather_conky_USA/messages|fold -w30}
${goto 138}High: ${execpi 1800 sed -n '9p' /home/bkberger/accuweather_conky_USA/temperatures}°  Low: ${execpi 1800 sed -n '10p' /home/bkberger/accuweather_conky_USA/temperatures}°
${color3}

Last edited by BoredOOMM (2011-11-02 21:36:36)


Congratulations, you've figured out the sound of one hand clapping...

Offline

#70 2012-01-31 09:28:09

shiv
New Member
Registered: 2012-01-31
Posts: 2

Re: {SOLVED} Conky Weather Disaster

BoredOOMM wrote:

Teo Accuweather USA updated to include Current, Sun and Moon times.

Link to post over on The Orange Side

My code is a bit different than presence uses.

Hi, I just made my first conky (mostly by just doing simple edits from multiple conkys put together) and I was looking into a weather script, which lead me here. Being a complete newbie here, I copied your code into my .conkyrc file and looked through the forum link you posted, but I could not figure out which files to download.

Could you possibly upload your weather script?

Offline

#71 2012-01-31 15:27:31

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 350

Re: {SOLVED} Conky Weather Disaster

shiv, Teo rewrote all the weather scripts and reposted on Post#1 of the thread on the Ubuntu Forum.

Click Active Topics at the top right of this forum to find Current Conky Threads including MrPeachy Lua Weather Scripting.   Welcome to The Dark Side. smile


Congratulations, you've figured out the sound of one hand clapping...

Offline

#72 2012-02-01 05:54:57

shiv
New Member
Registered: 2012-01-31
Posts: 2

Re: {SOLVED} Conky Weather Disaster

BoredOOMM wrote:

shiv, Teo rewrote all the weather scripts and reposted on Post#1 of the thread on the Ubuntu Forum.

Click Active Topics at the top right of this forum to find Current Conky Threads including MrPeachy Lua Weather Scripting.   Welcome to The Dark Side. smile

Thanks.

So I downloaded the script and and put the accuweather_conky_USA folder in my home folder and ran conky. It created the days/messages/raw/temperatures/images scripts, but I get an error in conky saying that the current script isn't located.


sed: can't read /home/steven/accuweather_conky_USA/current: No such file or directory

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.

Debian Logo