========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://conky.sourceforge.net/weather.tar.gz"
linktext was:"http://conky.sourceforge.net/weather.tar.gz"
====================================
Requirements:
- Place the two scripts in the same location
- Adjust the parameters for your local situation
- Install curl from the repos
Code: Select all
# s=standard units, m=metric units
UNITS=s
# where this script and the XSLT lives
RUNDIR=/home/jb/scripts
Code: Select all
<xsl:text> Temperature: </xsl:text><xsl:value-of select="tmp"/><xsl:value-of select="/weather/head/ut"/>
<xsl:if test="tmp != /weather/cc/flik">
<xsl:text>
Feels Like: </xsl:text><xsl:value-of select="flik"/><xsl:value-of select="/weather/head/ut"/>
</xsl:if>
<xsl:text>
Conditions: </xsl:text><xsl:value-of select="t"/>
<xsl:text>
Wind: </xsl:text>
<xsl:choose>
<xsl:when test="wind/s = 'calm'"><xsl:text>0</xsl:text></xsl:when>
<xsl:otherwise><xsl:value-of select="wind/s"/></xsl:otherwise>
</xsl:choose>
<xsl:value-of select="/weather/head/us"/>
<xsl:choose>
<xsl:when test="wind/s = 'calm'"><xsl:text>(0mph)</xsl:text></xsl:when>
<xsl:otherwise><xsl:text> (</xsl:text><xsl:value-of select="round(wind/s * 0.6214)"/><xsl:text>mph)</xsl:text></xsl:otherwise>
</xsl:choose>
<xsl:text> (</xsl:text><xsl:value-of select="wind/t"/>
<xsl:text>)</xsl:text>
</xsl:template>
<xsl:template match="dayf/day[@d='1']">
<xsl:text>
Code: Select all
${color white}Weather:
${color green}${execi 1800 /home/jb/scripts/weather.sh 14456}