Page 56 of 122 FirstFirst ... 646545556575866106 ... LastLast
Results 551 to 560 of 1219

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

  1. #551
    Join Date
    Mar 2009
    Beans
    159
    Distro
    Ubuntu 13.04 Raring Ringtail

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

    NVM found it



    Now to find how to change to km/h and get the location to just say "Brussels"
    Last edited by MarcusA; November 10th, 2011 at 08:01 AM.

  2. #552
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    2,810
    Distro
    Ubuntu Development Release

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

    Quote Originally Posted by MarcusA View Post
    Instead of teasing me, tell me what to change exactly already



    I got it like this
    Oh, okay...

    To change from Imperial stats to Metric stats, and vice-versa:

    weather.sh

    Code:
    #!/bin/bash
    
    # weather.sh
    
    #######################################################
    # @Author: Hardik Mehta <hard.mehta@gmail.com>  (2009-2010)
    # @Hackor: VinDSL <perfect.pecker@excite.co.uk> (2011)
    # 
    # @version: 1.2   rewrite to accommodate metric stats (VinDSL)
    #                 added fcTemp.Metric.xslt (VinDSL)
    #                 added fcTemp.Imperial.xslt (VinDSL)  
    #                 added conditionsTempBig.Metric.xslt (VinDSL)
    #                 added conditionsTempBig.Imperial.xslt (VinDSL)  
    # @version: 1.1   code cleanup/added icon (VinDSL) 
    # @version: 1.0   added fcTempToday.xslt (VinDSL)
    # @version: 0.9   added currentConditionBig.xslt (VinDSL) 
    # @version: 0.8   bug fix (VinDSL) 
    # @version: 0.7   code cleanup (VinDSL) 
    # @version: 0.6   added currentTempBig (VinDSL) 
    # @version: 0.5   added comments (VinDSL) 
    # @version: 0.4   code cleanup (VinDSL)
    # @version: 0.3   initial hack (VinDSL)
    # @version: 0.2   optimized 
    # @version: 0.1   basic script
    #
    #######################################################
    # .conkyrc format:
    # ${execi 1800 /path/to/weather/weather.sh "location" option } Note: do not use ~/weather/weather.sh shortcut
    #
    # .conkyrc examples:
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" }     - prints current conditions
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" ccb}  - prints current condition (big format)
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" ccti} - prints today's high/low temps (imperial)
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" cctm} - prints today's high/low temps (metric)
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" cp}   - prints symbol for current condition
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" ctbi} - prints current temp (big format - imperial)
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" ctbm} - prints current temp (big format - metric)
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" dl}   - prints list of days for forecast
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" fcp}  - prints symbols for forecast conditions
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" fcti} - prints forecast high/low temps (imperial)
    # ${execi 1800 /home/user/weather/weather.sh "Munich,Germany" fctm} - prints forecast high/low temps (metric)
    #
    # NOTE:  ++ Be sure to comment/uncomment the necessary CURLURL string
    #           for Imperial or Metric weather stats (as noted below).
    #
    #        ++ Always delete your old weatherInfo.xml cache file, when
    #           changing between Imperial and Metric weather stats.
    #
    #######################################################
    ####
    ##
    # Don't get xml file if created within 30 minutes
    UPDATE=1800
    
    # Local cURL location (cURL required)
    CURLCMD="/usr/bin/curl -s"
    
    # Local xsltcmd location (xsltproc required)
    XSLTCMD=/usr/bin/xsltproc
    
    # Where this script and the XSLT lives
    RUNDIR=`dirname $0`
    
    # Where the weatherInfo.xml file lives
    weather_xml="${RUNDIR}/weatherInfo.xml"
    
    # Location ID string
    # Parsed from .conkyrc
    LOCID=$1
    
    # Conditions string
    # Parsed from weatherInfo.xml
    CONDITIONS=$2
    
    # cURL the Google Weather API (Imperial - Fahrenheit)
    # CURLURL="http://www.google.com/ig/api?weather=${LOCID}&hl=en"
    
    # cURL the Google Weather API (Metric - Celsius)
    CURLURL="http://www.google.com/ig/api?weather=${LOCID}&hl=en-gb"
    
    # The XSLT to use when translating the response
    if [ "$CONDITIONS" = "ccb" ];
    then
        XSLT=$RUNDIR/currentConditionBig.xslt
    elif [ "$CONDITIONS" = "ctbi" ];
    then
        XSLT=$RUNDIR/currentTempBig.Imperial.xslt
    elif [ "$CONDITIONS" = "ctbm" ];
    then
        XSLT=$RUNDIR/currentTempBig.Metric.xslt
    elif [ "$CONDITIONS" = "cp" ];
    then
        XSLT=$RUNDIR/conditions.xslt
    elif [ "$CONDITIONS" = "dl" ];
    then
        XSLT=$RUNDIR/fcDayList.xslt
    elif [ "$CONDITIONS" = "fcp" ];
    then
        XSLT=$RUNDIR/fcConditions.xslt
    elif [ "$CONDITIONS" = "ctti" ];
    then
        XSLT=$RUNDIR/fcTempToday.Imperial.xslt
    elif [ "$CONDITIONS" = "cttm" ];
    then
        XSLT=$RUNDIR/fcTempToday.Metric.xslt
    elif [ "$CONDITIONS" = "fcti" ];
    then
        XSLT=$RUNDIR/fcTemp.Imperial.xslt
    elif [ "$CONDITIONS" = "fctm" ];
    then
        XSLT=$RUNDIR/fcTemp.Metric.xslt
    else
        XSLT=$RUNDIR/weather.xslt
    fi
    
    ################################################################
    # You probably don't need to modify anything below this point. #
    ################################################################
    ####
    ##  Optimization. 
    #   We cache the xml in a file and don't get the file
    #   from internet if it is less than 30 minutes old
    
    function get_file ()
    {
        # echo "get file called"
        # check if the file exists
        if [ -e $weather_xml ];
        then
            size=`stat -c %s $weather_xml`
            if [ $size -ge  1000 ];
            then
                now=`date -u +%s`
                created=`stat -c %Y $weather_xml`
                age=`expr $now - $created`
            else
                age=`expr $UPDATE + 1`
            fi
        else
            # if the file doesn't exist create it
            # and set the age older than update time
            touch $weather_xml
            age=`expr $UPDATE + 1`
        fi
        # echo $age
        # get the file if it is older than update time
        if [ $age -ge  $UPDATE ];
        then
            $CURLCMD -o $weather_xml "$CURLURL"
        fi
        # echo "get file ended"
    }
    
    get_file
    
    eval "$XSLTCMD  $XSLT $weather_xml"

    .conkyrc

    Code:
    <SNIP>
    
    ##################################
    ##     WEATHER (Imperial)       ##
    ##################################
    # ${voffset 4}${font DroidSans:bold:size=8.25}${color4}WEATHER${offset 8}${color8}${voffset -2}${hr 2}${font}
    # ${voffset -55}${font RadioSpace:size=34}${color3}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Scottsdale,AZ" ctbi}${font}${voffset -28}${goto 33}${font Weather:size=42}${color3}y${font}
    # ${voffset -38}${font Ubuntu:size=8.63}${color5}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Scottsdale,AZ" ctti}${font}
    # ${voffset -39}${font KRARound:size=36}${color3}${goto 195}I${font}
    # ${voffset 6}${font Ubuntu:size=23}${color5}${alignc -2}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Scottsdale,AZ" ccb}${font}
    # ${voffset 8}${font DroidSansFallback:size=8.63}${color3}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Scottsdale,AZ"}${font}
    # ${voffset -57}${font ConkyWeather:size=48}${color6}${alignc -55}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Scottsdale,AZ" cp}${font}
    # ${voffset 6}${font DroidSansMono:bold:size=8.62}${color4}${offset 40}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Scottsdale,AZ" dl}${font}
    # ${voffset 0}${font ConkyWeather:size=37.9}${color3}${offset 26}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Scottsdale,AZ" fcp}${font}
    # ${voffset 0}${font DroidSansFallback:bold:size=8.62}${color4}${offset 28}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Scottsdale,AZ" fcti}${font}
    
    ##################################
    ##      WEATHER (Metric)        ##
    ##################################
    ${voffset 4}${font DroidSans:bold:size=8.25}${color4}WEATHER${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset -55}${font RadioSpace:size=34}${color3}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Toronto" ctbm}${font}${voffset -28}${goto 33}${font Weather:size=42}${color3}y${font}
    ${voffset -38}${font Ubuntu:size=8.63}${color5}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Toronto" cttm}${font}
    ${voffset -39}${font KRARound:size=36}${color3}${goto 195}I${font}
    ${voffset 6}${font Ubuntu:size=23}${color5}${alignc -2}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Toronto" ccb}${font}
    ${voffset 8}${font DroidSansFallback:size=8.63}${color3}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Toronto"}${font}
    ${voffset -57}${font ConkyWeather:size=48}${color6}${alignc -55}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Toronto" cp}${font}
    ${voffset 6}${font DroidSansMono:bold:size=8.62}${color4}${offset 40}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Toronto" dl}${font}
    ${voffset 0}${font ConkyWeather:size=37.9}${color3}${offset 26}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Toronto" fcp}${font}
    ${voffset 0}${font DroidSansFallback:bold:size=8.62}${color4}${offset 35}${execi 1800 /home/vindsl/.conky/weather/weather.sh "Toronto" fctm}${font}
    
    <SNIP>

    NOTE: Whenever you switch between Imperial and Metric weather stats, be sure to:

    1. killall conky (stop Conky)
    2. modify weather.sh & .conkyrc (above)
    3. delete your old weatherInfo.xml cache file
    4. conky (start Conky)



    Quote Originally Posted by davesbrain
    Had a question in regards to your latest weather script.

    How can I 'scrunch' the 3 day forecast at the bottom a little closer?

    I did see the '9 spaces for alignment' part in the forecast xml, tried subtracting some spaces, but no change.
    Thanks, for the feedback...


    There are 3 different component parts to the 3 different lines in the 3-day forecast.

    Basically: The 3 files are for (fc)days, (fc)icons, and (fc)temps.

    I obviously didn't document that well enough.

    So, I just redid the comments, in those files.


    Code:
    <!-- fcTemp.Metric.xslt
    
    This XSLT is used to translate an XML response from the www.google.com/ig/ XML API.
    
    This style sheet shows all HIGH/LOW FORECAST METRIC TEMPS in the Conky Weather Section, e.g.
    the high/low metric temperatures that are listed at the bottom of the 3-day forecast.
    
    The first line (forecast day list) in the 3-day forecast is handled by: fcDayList.xslt
    
    The second line (condition icons) in the 3-day forecast is handled by: fcConditions.xslt
    
    Adjust the number of empty spaces (as noted below) to align the horizontal spacing of the
    high/low forecast metric temperatures on your desktop.  This works in conjunction with the font
    size that you chose to use in your .conkyrc file, and will require some patience to setup.  :)
    
    This is a base adjustment.  Once you get the horizontal alignment into the ballpark, the rest
    of the spacing & alignment will be handled, as usual, by making adjustments to the Weather Section
    in your .conkyrc file.
    
    NOTE:   ++ Enable the following line, in the weather.sh file, for Metric Stats:
    
            # cURL the Google Weather API (Metric - Celsius)
            CURLURL="http://www.google.com/ig/api?weather=${LOCID}&hl=en-gb"
    -->
    
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
        <xsl:output method="text" disable-output-escaping="yes" encoding="utf-8"/>
        <xsl:template match="xml_api_reply">
            <xsl:apply-templates select="weather"/>
        </xsl:template>
    
        <xsl:template match="weather">
            <xsl:variable name="celsius"><xsl:text>º</xsl:text></xsl:variable><!-- Sets celcius variable / adds degree symbol -->
            <xsl:for-each select="forecast_conditions[position() >= 2 ]"><!-- Selects days, other than today -->
                <xsl:value-of select="high/@data"/> <xsl:value-of select="$celsius"/>
                <xsl:text>/</xsl:text>
                <xsl:value-of select="low/@data"/> <xsl:value-of select="$celsius"/>
                    <xsl:if test="position() != 3">
                        <xsl:text>          </xsl:text><!-- 10 spaces. Add/subtract spaces for proper Forecast Temperature alignment -->
                    </xsl:if>
            </xsl:for-each>
        </xsl:template>
    </xsl:stylesheet>

    Code:
    <!-- fcTemp.Imperial.xslt
    
    This XSLT is used to translate an XML response from the www.google.com/ig/ XML API.
    
    This style sheet shows all HIGH/LOW FORECAST IMPERIAL TEMPS in the Conky Weather Section, e.g.
    the high/low imperial temperatures that are listed at the bottom of the 3-day forecast.
    
    The first line (forecast day list) in the 3-day forecast is handled by: fcDayList.xslt
    
    The second line (condition icons) in the 3-day forecast is handled by: fcConditions.xslt
    
    Adjust the number of empty spaces (as noted below) to align the horizontal spacing of the
    high/low forecast imperial temperatures on your desktop.  This works in conjunction with the
    font size that you chose to use in your .conkyrc file, and will require some patience to setup.  :)
    
    This is a base adjustment.  Once you get the horizontal alignment into the ballpark, the rest
    of the spacing & alignment will be handled, as usual, by making adjustments to the Weather Section
    in your .conkyrc file.
    
    NOTE:   ++ Enable the following line, in the weather.sh file, for Imperial Stats:
    
            # cURL the Google Weather API (Imperial - Fahrenheit)
            CURLURL="http://www.google.com/ig/api?weather=${LOCID}&hl=en"
    -->
    
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
        <xsl:output method="text" disable-output-escaping="yes" encoding="utf-8"/>
        <xsl:template match="xml_api_reply">
            <xsl:apply-templates select="weather"/>
        </xsl:template>
    
        <xsl:template match="weather">
            <xsl:variable name="fahrenheit"><xsl:text>º</xsl:text></xsl:variable><!-- Sets fahrenheit variable / adds degree symbol -->
            <xsl:for-each select="forecast_conditions[position() >= 2 ]"><!-- Selects days, other than today -->
                <xsl:value-of select="high/@data"/> <xsl:value-of select="$fahrenheit"/>
                <xsl:text>/</xsl:text>
                <xsl:value-of select="low/@data"/> <xsl:value-of select="$fahrenheit"/>
                    <xsl:if test="position() != 3">
                        <xsl:text>         </xsl:text><!-- 9 spaces. Add/subtract spaces for proper Forecast Temperature alignment -->
                    </xsl:if>
            </xsl:for-each>
        </xsl:template>
    </xsl:stylesheet>

    Code:
    <!-- fcConditions.xslt
    
    This XSLT is used to translate an XML response from the www.google.com/ig/ XML API.
    
    This style sheet shows all FORECAST WEATHER CONDITION ICONS in the Conky Weather Section, e.g.
    the 3 weather condition icons that are displayed in the middle of the 3-day forecast.
    
    The first line (forecast day list) in the 3-day forecast is handled by: fcDayList.xslt
    
    The third line (temperatures) is handled by: FcTemp.Imperial.xslt and/or FcTemp.Metric.xslt
    
    Adjust the number of empty spaces (as noted below) to align the horizontal spacing of the
    forecast weather condition icons on your desktop.  This works in conjunction with the font
    size that you chose to use in your .conkyrc file, and will require some patience to setup.  :)
    
    This is a base adjustment.  Once you get the horizontal alignment into the ballpark, the rest
    of the spacing & alignment will handled, as usual, by making adjustments to the Weather Section
    in your .conkyrc file.
    
    NOTE:   ++ Use WEATHER DINGBAT FONTS for the FORECAST WEATHER CONDITION ICONS, in your .conkyrc file!
    -->
    
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
        <xsl:include href="conditionsInclude.xslt"/>
        <xsl:output method="text" disable-output-escaping="yes" encoding="utf-8"/>
        <xsl:template match="xml_api_reply">
            <xsl:apply-templates select="weather"/>
        </xsl:template>
    
        <xsl:template match="weather">
            <xsl:for-each select="forecast_conditions[position() >= 2]"><!-- Fetches Forecast Conditions for next 3 days -->
               <xsl:call-template name="get-condition-symbol"><!-- Fetches "conditionsInclude.xslt" -->
                    <xsl:with-param name="condition"><!-- Loads your "condition" icon parameters -->
                        <xsl:value-of select="condition/@data"/><!-- Fetches forecast conditions from Google API -->
                    </xsl:with-param>
                </xsl:call-template>
                <xsl:if test="position() != 3"><!-- Matches your weather icons with Google API data -->
                    <xsl:text>  </xsl:text><!-- 2 spaces. Add/subtract spaces for proper Forecast Weather Condition Icon spacing -->
                </xsl:if>
            </xsl:for-each>
        </xsl:template>
    </xsl:stylesheet>

    Code:
    <!-- fcDayList.xslt
    
    This XSLT is used to translate an XML response from the www.google.com/ig/ XML API.
    
    This style sheet shows the FORECAST DAYS-OF-THE-WEEK in the Conky Weather Section, e.g.
    the 3 days that are listed at the top of the 3-day forecast.
    
    The second line (condition icons) in the 3-day forecast is handled by: fcConditions.xslt
    
    The third line (temperatures) is handled by: FcTemp.Imperial.xslt and/or FcTemp.Metric.xslt
    
    Adjust the number of empty spaces (as noted below) to align the horizontal spacing of the
    forecast days-of-the-week on your desktop.  This works in conjunction with the font size
    that you chose to use in your .conkyrc file, and will require some patience to setup.  :)
    
    This is a base adjustment.  Once you get the horizontal alignment into the ballpark, the rest
    of the spacing & alignment will handled, as usual, by making adjustments to the Weather Section
    in your .conkyrc file.
    
    NOTE:   ++ Use MONO FONTS ONLY for the FORECAST DAYS-OF-THE-WEEK, in your .conkyrc file!
    -->
    
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
        <xsl:output method="text" disable-output-escaping="yes" encoding="utf-8"/>
        <xsl:template match="xml_api_reply">
            <xsl:apply-templates select="weather"/>
        </xsl:template>
    
        <xsl:template match="weather">
            <xsl:for-each select="forecast_conditions/day_of_week"><!-- Fetches all available Forecasts -->
                <xsl:choose>
                    <xsl:when test="position() = 1"><!-- Don't display Today's Forecast. Ww will handle current stats elsewhere -->
                        <xsl:text></xsl:text>
                    </xsl:when>
                    <xsl:when test="position() = 2"><!-- Choose Forecasts for the next three days only -->
                        <xsl:value-of select="@data"/>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:text>        </xsl:text><!-- 8 spaces. Add/subtract spaces for proper Forecast Day alignment -->
                        <xsl:value-of select="@data"/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
        </xsl:template>
    </xsl:stylesheet>
    Last edited by VinDSL; December 4th, 2011 at 07:31 AM. Reason: addendum
    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

  3. #553
    Join Date
    Apr 2007
    Beans
    195

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

    West Macedonia IS Greece, Vin. Kastoria, Greece is located in West Macedonia.

  4. #554
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    2,810
    Distro
    Ubuntu Development Release

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

    Quote Originally Posted by 42dorian View Post
    West Macedonia IS Greece, Vin. Kastoria, Greece is located in West Macedonia.
    Yep. The thing is, if you use the postal data, it shows Kastoria, Greece, the zip code, of whatever you put in the .conkyc file.

    If you use the city data, Google put's the real name in that field.

    Google is smart that way! LoL!
    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

  5. #555
    Join Date
    Mar 2009
    Beans
    159
    Distro
    Ubuntu 13.04 Raring Ringtail

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

    Quote Originally Posted by VinDSL View Post
    Getting rid of the exclamation point(!) should do the trick. That's what I did.

    The original script made use of a UNITS string in the bash file, but Google deprecated it. Now it's unit_system.
    Ah yes, that does the trick. I changed the US to UK which also seems to do the trick.

    Quote Originally Posted by VinDSL View Post
    BTW, I need to change the city code back to a postal code.

    Kastoria, Greece came up as Kastoria, West Macedonia, and it was into the weather icon too.
    Atleast that's better than "city of Brussels, Brussels"

  6. #556
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    2,810
    Distro
    Ubuntu Development Release

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

    Man, how do ppl take 93%-94% humidity?!?!? It's 20% here!

    I'll bet it isn't 94% humidity in my shower stall...
    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

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

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

    Awesome job VinDSL - thanks for posting it in the thread.
    I'll add a link in the first page.

  8. #558
    Join Date
    Feb 2010
    Location
    SR11 Cockpit
    Beans
    Hidden!

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

    Accuweather International
    Warning - HUGE CONKY!


    Ok, here's the first.
    Under Construction:


    While creating this I took out the ${texeci 500 bash ~/Conky/TBG/acc_int_images} call after the first start and changed the time to one second. That way for the entire "construction period" it was using the files here without need to access the internet.

    Code:
    update_interval 1 #90
    # ${texeci 500 bash ~/Conky/TBG/acc_int_images}
    
    TEXT
    ${image ~/Conky/images/bk-40.png -p 0,0 -s 350x450}
    I've also changed my update interval to 90 seconds. Why? Just because!

    I use
    Code:
    nnn 999°/999°
    spacing because some people live where they see:
    Code:
    Mon -19°/-25°
    -40° is equal for both °c & °F, or may see;
    Code:
    Mon 101°/110°
    Hopefully in °F only for 101°C = HOTTER than HOT!!!!

    And the finished product:


    Code:
    ## killall conky && conky -c ~/Conky/TBG/conkyrc_acc_ii &
    
     ###  Begin Window Settings  ##################################################
     # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type override
    # own_window_type normal # creates conky in a window.
    own_window_transparent yes
    own_window_hints below,sticky,skip_taskbar,skip_pager
    # own_window_colour grey
    own_window_class Conky AccuWeather - Hoeizontal
    own_window_title 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 255
    
    minimum_size 1200 0    ## width, height
    maximum_width 1200        ## 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 DejaVu Sans Mono:bold: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 191970   #MidnightBlue #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 512 # default is 256
    
    max_user_text 32000 # default is 16384 bytes
    max_specials 2048 # default is 512
    
     # 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 90
    
    # ${texeci 500 bash ~/Conky/TBG/acc_int_images}
    
    TEXT
    ${texeci 500 bash ~/Conky/TBG/acc_int_images}${image ~/Conky/images/bk-40.png -p 0,0 -s 350x450}${voffset 5}${goto 195}${color7}Ahora:${color} ${execpi 600 sed -n '2p' ~/Conky/TBG/curr_cond}° ${goto 290}${color7}ST:${color} ${execpi 600 sed -n '4p' ~/Conky/TBG/curr_cond}°\
       ${goto 360}${color8}${execpi 600 sed -n '7p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '9p' ~/Conky/TBG/week}°/${execpi 600 sed -n '10p' ~/Conky/TBG/week}°${goto 465}${color8}${execpi 600 sed -n '12p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '14p' ~/Conky/TBG/week}°/${execpi 600 sed -n '15p' ~/Conky/TBG/week}°${goto 570}${color8}${execpi 600 sed -n '17p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '19p' ~/Conky/TBG/week}°/${execpi 600 sed -n '20p' ~/Conky/TBG/week}°${goto 675}${color8}${execpi 600 sed -n '22p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '24p' ~/Conky/TBG/week}°/${execpi 600 sed -n '25p' ~/Conky/TBG/week}°${goto 780}${color8}${execpi 600 sed -n '27p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '29p' ~/Conky/TBG/week}°/${execpi 600 sed -n '30p' ~/Conky/TBG/week}°${goto 885}${color8}${execpi 600 sed -n '32p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '34p' ~/Conky/TBG/week}°/${execpi 600 sed -n '35p' ~/Conky/TBG/week}°\
       ${image ~/Conky/TBG/6.png -p 360,19 -s 72x43}${image ~/Conky/TBG/11.png -p 465,19 -s 72x43}${image ~/Conky/TBG/16.png -p 570,19 -s 72x43}${image ~/Conky/TBG/21.png -p 675,19 -s 72x43}${image ~/Conky/TBG/26.png -p 780,19 -s 72x43}${image ~/Conky/TBG/31.png -p 885,19 -s 72x43}
    ${voffset 5}${goto 195}${color7}Viento:${color} ${execpi 600 sed -n '5p' ~/Conky/TBG/curr_cond}
    ${goto 195}${color7}   Hum:${color} ${execpi 600 sed -n '6p' ~/Conky/TBG/curr_cond}
    ${goto 195}${color7}P de R:${color} ${execpi 600 sed -n '7p' ~/Conky/TBG/curr_cond}°
    ${goto 195}${color7}Presión:${color} ${execpi 600 sed -n '8p' ~/Conky/TBG/curr_cond}
    ${goto 195}${color7}y${color}  ${execpi 600 sed -n '9p' ~/Conky/TBG/curr_cond}\
       ${goto 360}${color2}${execpi 600 sed -n '42p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '44p' ~/Conky/TBG/week}°/${execpi 600 sed -n '45p' ~/Conky/TBG/week}°${goto 465}${color2}${execpi 600 sed -n '47p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '49p' ~/Conky/TBG/week}°/${execpi 600 sed -n '50p' ~/Conky/TBG/week}°${goto 570}${color2}${execpi 600 sed -n '52p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '54p' ~/Conky/TBG/week}°/${execpi 600 sed -n '55p' ~/Conky/TBG/week}°${goto 675}${color2}${execpi 600 sed -n '57p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '59p' ~/Conky/TBG/week}°/${execpi 600 sed -n '60p' ~/Conky/TBG/week}°${goto 780}${color2}${execpi 600 sed -n '62p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '64p' ~/Conky/TBG/week}°/${execpi 600 sed -n '65p' ~/Conky/TBG/week}°${goto 885}${color2}${execpi 600 sed -n '67p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '69p' ~/Conky/TBG/week}°/${execpi 600 sed -n '70p' ~/Conky/TBG/week}°\
       ${image ~/Conky/TBG/41.png -p 360,88 -s 72x43}${image ~/Conky/TBG/46.png -p 465,88 -s 72x43}${image ~/Conky/TBG/51.png -p 570,88 -s 72x43}${image ~/Conky/TBG/56.png -p 675,88 -s 72x43}${image ~/Conky/TBG/61.png -p 780,88 -s 72x43}${image ~/Conky/TBG/66.png -p 885,88 -s 72x43}
    ${goto 195}${color7}Visibilidad:${color} ${execpi 600 sed -n '10p' ~/Conky/TBG/curr_cond}
     ${voffset 5}${color7}Sol: Salida:${color} ${execpi 600 sed -n '11p' ~/Conky/TBG/curr_cond}\
    ${goto 195}${color7}Puesta:${color} ${execpi 600 sed -n '12p' ~/Conky/TBG/curr_cond}
     ${voffset 5}${execpi 600 sed -n '3p' ~/Conky/TBG/curr_cond|fold -s -w 48}
      ${color7}${cpubar 1,50} Pronóstico para Hoy ${cpubar 1,50}${color}${image ~/Conky/TBG/cc.png -p 0,0 -s 180x108}\
    ${goto 360}${color8}${execpi 600 sed -n '7p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '8p' ~/Conky/TBG/week}\
       ${goto 675}${color8}${execpi 600 sed -n '22p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '23p' ~/Conky/TBG/week}
     ${color8}Día:${color} ${execpi 600 sed -n '4p' ~/Conky/TBG/week}°${goto 83}${color8}ST:${color} ${execpi 600 sed -n '5p' ~/Conky/TBG/week}°${goto 147}\
    ${color2}Noche:${color} ${execpi 600 sed -n '39p' ~/Conky/TBG/week}°${goto 230}${color2}ST:${color} ${execpi 600 sed -n '40p' ~/Conky/TBG/week}°\
    ${goto 360}${color8}${execpi 600 sed -n '12p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '13p' ~/Conky/TBG/week}\
       ${goto 675}${color8}${execpi 600 sed -n '27p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '28p' ~/Conky/TBG/week}
    ${image ~/Conky/TBG/1.png -p 25,170 -s 72x43}${image ~/Conky/TBG/36.png -p 170,170 -s 72x43}\
    ${goto 360}${color8}${execpi 600 sed -n '17p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '18p' ~/Conky/TBG/week}\
       ${goto 675}${color8}${execpi 600 sed -n '32p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '33p' ~/Conky/TBG/week}
    ${goto 360}${color2}${execpi 600 sed -n '42p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '43p' ~/Conky/TBG/week}\
       ${goto 675}${color2}${execpi 600 sed -n '57p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '58p' ~/Conky/TBG/week}
    ${goto 360}${color2}${execpi 600 sed -n '47p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '48p' ~/Conky/TBG/week}\
       ${goto 675}${color2}${execpi 600 sed -n '62p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '63p' ~/Conky/TBG/week}
    ${goto 360}${color2}${execpi 600 sed -n '52p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '53p' ~/Conky/TBG/week}\
       ${goto 675}${color2}${execpi 600 sed -n '67p' ~/Conky/TBG/week}${color} ${execpi 600 sed -n '68p' ~/Conky/TBG/week}${color}
     ${color8}${execpi 600 sed -n '1p' ~/Conky/TBG/messages_curr|fold -s -w 45}${color}
     ${color2}${execpi 600 sed -n '3p' ~/Conky/TBG/messages_curr|fold -s -w 45}${color}
    The second is a modification of this that will get posted later today, I'm off to the doc's at the moment! I'm seeing far to much of that guy lately.
    Last edited by Sector11; November 10th, 2011 at 07:58 PM.

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

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

    Beautiful as always Sector11, thanks for posting it!!!
    I haven't been idle myself, so....

    Weather.com conky script - all users

    Deleted - see first page.
    Last edited by TeoBigusGeekus; November 13th, 2011 at 09:28 PM.

  10. #560
    Join Date
    Aug 2005
    Location
    Mars
    Beans
    245

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

    Teo, there is a typo.

    $ chmod +x ~/Conky_WeatherCom/weath_com)
    bash: syntax error near unexpected token `)'
    Should read
    Code:
    $ chmod +x ~/Conky_WeatherCom/weath_com
    I tested for USCA0894 and I get Metrically_Challenged Output. I think that is due to my system settings. Since the xoap.weather.com works until 15 Nov, I will hope that your script will also work next Wed.

    /Conky_WeatherCom/RightNow/temperatures_rn

    58
    68
    40
    73
    58
    Last edited by BoredOutOfMyMind; November 10th, 2011 at 07:57 PM.

Page 56 of 122 FirstFirst ... 646545556575866106 ... 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
  •