Page 54 of 122 FirstFirst ... 444525354555664104 ... LastLast
Results 531 to 540 of 1219

Thread: Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com

  1. #531
    Join Date
    Apr 2007
    Beans
    195

    Re: HOW TO: Conky weather info using Accuweather/WUnderground/NWS

    Quote Originally Posted by BoredOutOfMyMind View Post
    This is why I was asking what scripting you are using to NOT see wind. What script generated the images and temps you showed? Is wind in the message file for the same script?
    Using Teo's guide on how he created the files, and using your links could be a help to finding what you are seeking (wind direction and speed estimates). I can use "inspect element" tools and find the section with the wind forecasts.

    I see in the accuw_USA_Script there are variables for #file: days #file: messages #File:temperatures and file:images Nothing for wind unless in the raw messages file. I have the non_USA script also here.
    Yeah, the Weather Underground page for my city doesn't have any wind data. So, the messages file as well as the icons file are blank in the areas where the wind data and font would be. There's no line there in the messages, and it's a dash, meaning N/A, in the icons file.

    My problem with the 1d method... honestly... is the idea of the icons. I prefer the weather fonts, since they don't take as much CPU, and I can resize them in a heartbeat as I rebuild their place in the Conky. I know, since I'll be skipping it and only using the wind data from the script that seems kinda moot and stupid. But, I don't know enough about the scripts to edit that out without serious confusion. It's nitpicky, I know. I'm good with Conky, but much else with code and I get a headache.

    I'm... kinda particular in how I do things... I know I can be a pain in the butt, but I don't mean it out of malice toward any of you. I'm just slow on the uptake with code.

  2. #532
    Join Date
    Feb 2008
    Beans
    5,636

    Re: HOW TO: Conky weather info using Accuweather/WUnderground/NWS

    Quote Originally Posted by 42dorian View Post
    Okay... weird one... What if this is the page I want to draw data from?

    Or if it's actually a composite of 2? That one and this one?

    I tried a straight substitution of the URLs and a change of the file location in the script, but the files it creates are blank. I'd like to get it going before putting anything in Conky.

    Any ideas?
    Oh sorry man, mea culpa!!! For some reason your post ended with no links in opera (see screenshot) and I couldn't undestand what you were talking about.
    Anyway, I've tried your links, but when I downloaded them with wget, they had no weather info.
    I don't know where they pull their forecast from, but the pages, when downloaded as text files, have no mention of the words Currently, Monday, Temperature, Cloudy, etc.
    Attached Images Attached Images
    Last edited by TeoBigusGeekus; November 9th, 2011 at 05:20 PM.

  3. #533
    Join Date
    Feb 2008
    Beans
    5,636

    Re: HOW TO: Conky weather info using Accuweather/WUnderground/NWS

    Quote Originally Posted by 42dorian View Post
    1. Find a web page or online source that gives you weather data for your local area.
    2. Insert the link to that web page into a script designed to re-format the web page's hypertext/xml into a simple output text file with the weather results, weather font codes, and day names in it.
    3. Have Conky run the script at a specific interval.
    4. Use a series of well placed sed calls inside of Conky that call up a specific line in one of the text files to output them in Conky. How each sed call is placed in Conky determines it's placement in the output, regardless of what order the bash script wrote it in.
    Spot on!!!

  4. #534
    Join Date
    Feb 2008
    Beans
    5,636

    Re: HOW TO: Conky weather info using Accuweather/WUnderground/NWS

    Quote Originally Posted by 42dorian View Post
    My problem with the 1d method... honestly... is the idea of the icons. I prefer the weather fonts, since they don't take as much CPU, and I can resize them in a heartbeat as I rebuild their place in the Conky. I know, since I'll be skipping it and only using the wind data from the script that seems kinda moot and stupid. But, I don't know enough about the scripts to edit that out without serious confusion. It's nitpicky, I know. I'm good with Conky, but much else with code and I get a headache.

    I'm... kinda particular in how I do things... I know I can be a pain in the butt, but I don't mean it out of malice toward any of you. I'm just slow on the uptake with code.
    I order to make the script use the ConkyWeather font instead of the images, all you have to do is copy the function (test_image) from the 1a script and replace the function of the 1d script. This function translates the international accuweather images into conkyweather letters.
    Then, delete all the cp commands of the script and you're done.
    Finally, create an appropriate conky to show the results.
    I've created both the script
    Code:
    #!/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
    } 
    
    #put your Accuweather address here
    address="http://www.accuweather.com/en-us/gr/kastoria/kastoria/quick-look.aspx"
    
    kill -STOP $(pidof conky)
    killall wget
    rm /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/*.png
    rm /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_raw
    wget --save-cookies /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/cookie -O /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond_raw $address
    addr_week=$(echo $address|sed 's/quick.*$/forecast.aspx/')
    wget --load-cookies /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/cookie -O /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week_raw $addr_week
    
    #Current Conditions - curr_cond file
    egrep -i 'CurrentTemp|CurrentText|RealFeelValue|WindsValue|HumidityValue|DewPointValue|PressureValue|PressureTenValue|VisibilityValue|SunriseValue|SunsetValue|imgCurConCondition' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond_raw > /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i '1s/^.*blue\///' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i '1s/_int.*$//' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i 's/^.*">//g' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i 's/<\/span>.*$//g' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i 's/&deg;C//g' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    curr_cond_raw_image=$(sed -n 1p /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond)
    sed -i 1s/$curr_cond_raw_image/$(test_image $curr_cond_raw_image)/ /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i 's/Unavailable/N\/A/g' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    
    #Forecast of the week - week file
    egrep -i 'monday|tuesday|wednesday|thursday|friday|saturday|sunday|&deg|lblDesc|imgIcon' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week_raw > /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
    sed -i '1d' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
    sed -i -e 's/^.*lblDate">//g' -e 's/^.*lblDesc">//g' -e 's/^.*Label1">//g' -e 's/^.*lblRealFeel">//g' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
    sed -i -e 's/^.*lblHigh">//g' -e 's/^.*lblRealFeelValue">//g' -e 's/^.*blue\///g' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
    sed -i 's/_int.jpg.*$//g' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
    sed -i 's/<\/span>.*$//g' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
    sed -i 's/&deg;C//g' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
    sed -i -e 's/Monday/MONDAY/' -e 's/Tuesday/TUESDAY/' -e 's/Wednesday/WEDNESDAY/' -e 's/Thursday/THURSDAY/' -e 's/Friday/FRIDAY/' -e 's/Saturday/SATURDAY/' -e 's/Sunday/SUNDAY/' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
    for (( i=2; i<=67; i+=5 ))
      do
          sed -i "${i}s/ .*$//" /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
      done
    for (( i=1; i<=66; i+=5 ))
      do
          image_raw=$(sed -n "${i}"p /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week)
          sed -i ${i}s/$image_raw/$(test_image $image_raw)/ /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week
      done
      
    #messages and messages_curr files
    for (( i=3; i<=68; i+=5 ))
      do
          sed -n ${i}p /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week >> /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_raw
      done
    sed -n 1p /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_raw | cut -c -60 > /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_curr
    sed -n 8p /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_raw | cut -c -60 >> /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_curr
    for (( i=1; i<=4; i++))
    	do
    		no=$(sed -n ${i}p /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_curr|wc -c)
    		if (( no<=31 )); then
    			sed -i $i"s/$/\n/" /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_curr
    			i=$((i+1))
    		elif (( no>31 )); then
    			sed -i $i"s/^\(.\{31\}\)/\1\n/" /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_curr
    			i=$((i+1))
    		fi
    	done
    cat /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_raw| cut -c -40 > /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages
    for (( i=1; i<=28; i++))
    	do
    		no=$(sed -n ${i}p /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages|wc -c)
    		if (( no<=21 )); then
    			sed -i $i"s/$/\n/" /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages
    			i=$((i+1))
    		elif (( no>21 )); then
    			sed -i $i"s/^\(.\{21\}\)/\1\n/" /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages
    			i=$((i+1))
    		fi
    	done
    
    kill -CONT $(pidof conky)
    and the conkyrc
    Code:
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,skip_taskbar,skip_pager
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # fiddle with window
    use_spacer yes
    use_xft yes
    
    # Update interval in seconds
    update_interval 3
    
    # Minimum size of text area
    minimum_size 355 500
    maximum_width 355
    
    override_utf8_locale yes
    
    # Draw shades?
    draw_shades yes
    
    # Text stuff
    draw_outline yes # amplifies text if yes
    draw_borders no
    #font freesans -12
    xftfont Arial:size=9
    uppercase no # set to yes if you want all text to be in uppercase
    
    # Stippled borders?
    stippled_borders 3
    
    # border margins
    border_margin 9
    
    # border width
    border_width 10
    
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color cbcbcb
    
    own_window_colour brown
    own_window_transparent yes
    
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    
    # Gap between borders of screen and text
    gap_x 10
    gap_y 30
    
    imlib_cache_size 0
    # stuff after 'TEXT' will be formatted on screen
    
    TEXT
    ${font Arial:size=12}${color ffe595}WEATHER ${font}${hr 2}$color${texeci 500 bash /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/acc_int_cwfont}
    ${font Arial:size=10}${execpi 600 sed -n '3p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}${font}
    ${font conkyweather:size=100}${execi 600  sed -n '1p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}${font}
    ${voffset -110}${goto 200}${color ffe595}TEMP: $color${alignr}${execpi 600 sed -n '2p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}C (${execpi 600 sed -n '4p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}C)
    ${goto 200}${color ffe595}WIND: $color${alignr}${execpi 600 sed -n '5p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
    ${goto 200}${color ffe595}HUM: $color${alignr}${execpi 600 sed -n '6p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
    ${goto 200}${color ffe595}DEW POINT: $color${alignr}${execpi 600 sed -n '7p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}C
    ${goto 200}${color ffe595}PR: $color${alignr}${execpi 600 sed -n '8p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
    ${goto 200}${color ffe595}PR TEND: $color${alignr}${execpi 600 sed -n '9p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
    ${goto 200}${color ffe595}VISIB: $color${alignr}${execpi 600 sed -n '10p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
    ${goto 200}${color ffe595}SUNRISE: $color${alignr}${execpi 600 sed -n '11p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
    ${goto 200}${color ffe595}SUNSET: $color${alignr}${execpi 600 sed -n '12p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
    ${hr 1}
    ${goto 50}${font Arial:size=10}${color ffe595}TODAY$color$font${goto 230}${font Arial:size=10}${color ffe595}TONIGHT$color$font
    
    ${goto 30}${font conkyweather:size=75}${execi 600  sed -n '1p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}${goto 210}${voffset -75}${font conkyweather:size=75}${execi 600  sed -n '36p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}
    ${font Arial:size=8}${execpi 600 sed -n '1p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_curr}${goto 195}${execpi 600 sed -n '3p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_curr}$font
    ${font Arial:size=8}${execpi 600 sed -n '2p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_curr}${goto 195}${execpi 600 sed -n '4p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages_curr}$font
    ${color ffe595}TEMP: $color${execpi 600 sed -n '4p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C${goto 195}${color ffe595}TEMP: $color${execpi 600 sed -n '39p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C
    ${color ffe595}REAL FEEL: $color${execpi 600 sed -n '5p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C${goto 195}${color ffe595}REAL FEEL: $color${execpi 600 sed -n '40p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C
    ${hr 1}
    ${font Arial:size=9}${goto 30}${color ffe595}${execpi 600 sed -n '7p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${goto 145}${execpi 600 sed -n '12p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${goto 260}${execpi 600 sed -n '17p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}$color${font}
    ${goto 30}${font conkyweather:size=50}${execi 600  sed -n '6p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}${goto 140}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '11p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}${goto 260}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '16p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}
    ${goto 35}${font Arial:size=8}${execpi 600 sed -n '9p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '10p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)${goto 150}${execpi 600 sed -n '14p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '15p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)${goto 270}${execpi 600 sed -n '19p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '20p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)
    ${execpi 600 sed -n '3p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '5p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '7p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}
    ${execpi 600 sed -n '4p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '6p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '8p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}
    
    ${goto 30}${font conkyweather:size=50}${execi 600  sed -n '41p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}${goto 140}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '46p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}${goto 260}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '51p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}
    ${goto 35}${font Arial:size=8}${execpi 600 sed -n '44p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '45p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)${goto 150}${execpi 600 sed -n '49p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '50p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)${goto 270}${execpi 600 sed -n '54p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '55p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)
    ${execpi 600 sed -n '17p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '19p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '21p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}
    ${execpi 600 sed -n '18p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '20p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '22p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}
    
    ${font Arial:size=9}${goto 30}${color ffe595}${execpi 600 sed -n '22p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${goto 145}${execpi 600 sed -n '27p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${goto 260}${execpi 600 sed -n '32p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}$color${font}
    ${goto 30}${font conkyweather:size=50}${execi 600  sed -n '21p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}${goto 140}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '26p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}${goto 260}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '31p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}
    ${goto 35}${font Arial:size=8}${execpi 600 sed -n '24p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '25p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)${goto 150}${execpi 600 sed -n '29p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '30p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)${goto 270}${execpi 600 sed -n '34p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '35p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)
    ${execpi 600 sed -n '9p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '11p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '13p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}
    ${execpi 600 sed -n '10p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '12p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '14p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}
    
    ${goto 30}${font conkyweather:size=50}${execi 600  sed -n '56p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}${goto 140}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '61p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}${goto 260}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '66p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}${font}
    ${goto 35}${font Arial:size=8}${execpi 600 sed -n '59p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '60p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)${goto 150}${execpi 600 sed -n '64p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '65p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)${goto 270}${execpi 600 sed -n '69p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C(${execpi 600 sed -n '70p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/week}C)
    ${execpi 600 sed -n '23p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '25p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '27p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}
    ${execpi 600 sed -n '24p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '26p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '28p' /home/teo/Accuweather_Conky_Int_ConkyWeatherFont/messages}
    for you.
    Save the script in a folder in your home partition named Accuweather_Conky_Int_ConkyWeatherFont as acc_int_cwfont.
    Save the conkyrc in your home partition as .conky_acc_int_cwfont.
    Don't forget to change the /home/teo string to /home/yourusername in both.
    Then run it with
    Code:
    conky -c ~/.conky_acc_int_cwfont
    Last edited by TeoBigusGeekus; November 9th, 2011 at 05:21 PM.

  5. #535
    Join Date
    Feb 2008
    Beans
    5,636

    Re: HOW TO: Conky weather info using Accuweather/WUnderground/NWS

    Quote Originally Posted by BoredOutOfMyMind View Post
    Isn't the page is parsing the same information as this page.

    In that the title says "NEW" Accuweather Global, I am wondering if this will be the new homepage.

    Teo, I read your PDF. Nice write up Friend!
    Thanks mate!

  6. #536
    Join Date
    Aug 2005
    Location
    Mars
    Beans
    245

    Re: HOW TO: Conky weather info using Accuweather/WUnderground/NWS

    Teo, if I understand correctly-

    42dorian is attempting to parse this page.

    Pulling only "content_column_435" and extracting each days Wind.

    by pulling from <div class="fcstTextBox">

    Winds from the ESE at 17

    Winds from the S at 25

    Winds from the WSW at 22

    Winds from the W at 22

  7. #537
    Join Date
    Feb 2008
    Beans
    5,636

    Re: HOW TO: Conky weather info using Accuweather/WUnderground/NWS

    Quote Originally Posted by BoredOutOfMyMind View Post
    Teo, if I understand correctly-

    42dorian is attempting to parse this page.

    Pulling only "content_column_435" and extracting each days Wind.

    by pulling from <div class="fcstTextBox">

    Winds from the ESE at 17

    Winds from the S at 25

    Winds from the WSW at 22

    Winds from the W at 22
    I can't find any weather info on this page - I don't know where it gets the weather from.
    However, I've prepared a small script for 42Dorian that gets wind info from weather.com
    Code:
    #!/bin/bash
    
    wget -O /home/teo/Desktop/weathercom_raw http://www.weather.com/weather/tenday/CAXX0342
    egrep -i 'Today |Tonight |Overnight |Mon |Tue |Wed |Thu |Fri |Sat |Sun ' /home/teo/Desktop/weathercom_raw > /home/teo/Desktop/days_and_wind_values
    sed -i 's/<\/span>.*$//g' /home/teo/Desktop/days_and_wind_values
    sed -i '/</d' /home/teo/Desktop/days_and_wind_values
    sed -i 's/^\t*//g' /home/teo/Desktop/days_and_wind_values
    sed -i 's/ .*$//g' /home/teo/Desktop/days_and_wind_values
    sed -i '/<td class="twc-col-1 twc-line-wind">/,/<\/div><!-- twc-tombstone-bg-container  -->/!d' /home/teo/Desktop/weathercom_raw
    egrep -i '<br>at<br>' /home/teo/Desktop/weathercom_raw > wind_values
    sed -i 's/^.*<strong>//g' /home/teo/Desktop/wind_values
    sed -i 's/<\/strong>.*$//g' /home/teo/Desktop/wind_values
    sed -i 's/<br>/ /g' /home/teo/Desktop/wind_values
    for (( i=1; i<=10; i++))
    	do 
    		wv_string=$(sed -n ${i}p /home/teo/Desktop/wind_values)
    		sed -i $(( 2*i ))c"$wv_string" /home/teo/Desktop/days_and_wind_values
    	done
    It creates 2 files: wind_values
    Code:
    SSW at 18
    WSW at 15
    W at 18
    SW at 14
    SSW at 18
    SSW at 14
    SSW at 12
    SSW at 11
    SW at 10
    W at 13
    and days_and_wind_values
    Code:
    Wed
    SSW at 18
    Thu
    WSW at 15
    Fri
    W at 18
    Sat
    SW at 14
    Sun
    SSW at 18
    Mon
    SSW at 14
    Tue
    SSW at 12
    Wed
    SSW at 11
    Thu
    SW at 10
    Fri
    W at 13
    It takes the data from this page.

  8. #538
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: HOW TO: Conky weather info using Accuweather/WUnderground/NWS

    Been busy with other things ...

    Just downloaded and read your PDF file TEO.

    WELL DONE! If I can understand that, anyone can. If you're not, you should be a teacher!

    I have 2 new "International" versions I'm am working on, they suffered abandonment for a few days but will get it working on them a bit tonight and hopefully enough time to finish them by tomorrow or the weekend.

  9. #539
    Join Date
    Feb 2008
    Beans
    5,636

    Re: HOW TO: Conky weather info using Accuweather/WUnderground/NWS

    Quote Originally Posted by Sector11 View Post
    Been busy with other things ...

    Just downloaded and read your PDF file TEO.

    WELL DONE! If I can understand that, anyone can. If you're not, you should be a teacher!

    I have 2 new "International" versions I'm am working on, they suffered abandonment for a few days but will get it working on them a bit tonight and hopefully enough time to finish them by tomorrow or the weekend.
    Thanks mate. I'm looking forward to your versions.

  10. #540
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    2,952
    Distro
    Ubuntu Development Release

    HOW TO: Conky weather info using Google Weather API

    Quote Originally Posted by Taman View Post
    Thank you for your help. I want weather forecast like this pic


    sorry for my english its not my language.
    Quote Originally Posted by TeoBigusGeekus View Post
    I'm sorry but the layout you're providing is not yet available through these scripts.
    Hello TBG!

    The above conversation got me thinking...

    I've been looking for a script that would afford a "classic" conkyForecast look, without relying on Weather.com for the XML feed.


    Quote Originally Posted by chicom9 View Post
    I have tried the the options listed above. But they are too complex. Take too much space on the desktop [...]
    Quote Originally Posted by hallansing View Post
    What we need is a simple replacement [...] something like 2 inches wide by 3 inches high section that will supply weather forecast for today and at most for 3 days in the future but simplified.

    I've been playing around with a script that's stupid simple.

    The thing is, it uses the uber-secretive, wholly undocumented, and unsupported, Google Weather API. LoL!

    Here's how it looks, so far...


    (Click image to expand)

    Imperial Weather Stats




    (Click image to expand)

    Metric Weather Stats


    Although the XML output is rather limited (Google Weather API was made for iGoogle and Google Gadgets) it seems to be stable.

    Anyone interested in giving it a toss?!?!?

    I'll zip the files, and attach them here, for public consumption.

    Check back for updates: [ v1.2, 28-Nov-2011, 1:50 AM ] / [ v2.0, 8-Jan-2012, 11:06 PM ]
    Attached Files Attached Files
    Last edited by VinDSL; January 9th, 2012 at 07:06 AM. Reason: attached latest package (several tweaks)
    Intel P4 Extreme Edition 3.4 (Gallatin) || DFI LanParty PRO875B rev B1
    Crucial Ballistix Tracer PC4000 1GB || Mountain Mods U2-UFO Opti-1203
    XFX 7600GT 560M AGP (PV-T73A-UDF3) || Corsair HX520W Modular PSU

Page 54 of 122 FirstFirst ... 444525354555664104 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •