Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 9 lines (6 sloc) 491 Bytes
#!/usr/bin/env ruby
# Intended for use with geektool.
require 'rubygems'
require "#{File.expand_path(File.dirname(__FILE__))}/support/helpers"
options_for __FILE__, :code => { :required => true, :text => 'Weather station code.'}
puts `curl --silent "http://xml.weather.yahoo.com/forecastrss?p=#{@code}&u=f" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \\/>//' -e 's/<b>//' -e 's/<\\/b>//' -e 's/<BR \\/>//' -e 's///' -e 's/<\\/description>//'`.strip
Jump to Line
Something went wrong with that request. Please try again.