<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
>
	<channel>
		<title>Conceited Forums Topic: A different weather script - great for Canadians</title>
		<link>http://conceitedsoftware.com/forums/topic/a-different-weather-script-great-for-canadians</link>
		<description>We have a very active and passionate community and our forums is the place to get tips and chat with other users about all our products. Join today and meet some great people!  Note: if you have a feature to request or a bug to report, make sure you use &lt;a href="http://conceitedsoftware.com/submit-ticket"&gt;this contact form&lt;/a&gt;.</description>
		<language>en-US</language>
		<pubDate>Fri, 12 Mar 2010 13:36:50 +0000</pubDate>
		<generator>bbpress 1.0-alpha-4</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://conceitedsoftware.com/forums/search.php</link>
		</textInput>
		<atom:link href="http://conceitedsoftware.com/forums/rss/topic/a-different-weather-script-great-for-canadians" rel="self" type="application/rss+xml" />

		<item>
			<title>chapel on "A different weather script - great for Canadians"</title>
			<link>http://conceitedsoftware.com/forums/topic/a-different-weather-script-great-for-canadians#post-469</link>
			<pubDate>Tue, 11 Aug 2009 05:27:12 +0000</pubDate>
			<dc:creator>chapel</dc:creator>
			<guid isPermaLink="false">469@http://conceitedsoftware.com/forums/</guid>
			<description>&#60;p&#62;I created the existing weather script and as far as I know any location will work as long as you put in the name that is understood. It might not be perfect, but even canadian zip codes work for me. Though the output is not perfect. I can update the script to be better of course.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>wnvoss on "A different weather script - great for Canadians"</title>
			<link>http://conceitedsoftware.com/forums/topic/a-different-weather-script-great-for-canadians#post-404</link>
			<pubDate>Tue, 30 Jun 2009 06:32:19 +0000</pubDate>
			<dc:creator>wnvoss</dc:creator>
			<guid isPermaLink="false">404@http://conceitedsoftware.com/forums/</guid>
			<description>&#60;p&#62;Thanks, looks great!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Zippo on "A different weather script - great for Canadians"</title>
			<link>http://conceitedsoftware.com/forums/topic/a-different-weather-script-great-for-canadians#post-388</link>
			<pubDate>Mon, 29 Jun 2009 17:08:31 +0000</pubDate>
			<dc:creator>Zippo</dc:creator>
			<guid isPermaLink="false">388@http://conceitedsoftware.com/forums/</guid>
			<description>&#60;p&#62;I forgot to edit the last part of the script... it should read:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;return &#34;The current temperature in &#34; &#38;#38; City &#38;#38; &#34; is &#34; &#38;#38; Temperature &#38;#38; &#34;°C&#34; &#38;#38; FeelsLike &#38;#38; &#34;, and the weather condition for right now is &#34; &#38;#38; CurrentWeather &#38;#38; &#34;.&#34; &#38;#38; WeatherWarning&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;This allows the script to grab the city name from the site automatically... so you don't have to manually type it in yourself.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Zippo on "A different weather script - great for Canadians"</title>
			<link>http://conceitedsoftware.com/forums/topic/a-different-weather-script-great-for-canadians#post-371</link>
			<pubDate>Fri, 26 Jun 2009 13:58:48 +0000</pubDate>
			<dc:creator>Zippo</dc:creator>
			<guid isPermaLink="false">371@http://conceitedsoftware.com/forums/</guid>
			<description>&#60;p&#62;I was never able to get the included weather script to work for me, so I (with the help of some people on the Apple forums) wrote this one:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;on linkinuscmd(WebAddress)&#60;br /&#62;
	set WebAddress to &#34;http://mobile.theweathernetwork.com/weather/canf0253&#34;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;	&#60;code&#62;do shell script &#34;/usr/bin/curl &#34; &#38;#38; WebAddress &#38;#38; &#34; &#124; /usr/bin/textutil -stdin -convert txt -stdout&#34; -- get source and strip HTML&#60;br /&#62;
	tell the result -- get the various elements&#60;br /&#62;
		set City to paragraph 5&#60;br /&#62;
		set WeatherWarning to paragraph 8&#60;br /&#62;
		if (count WeatherWarning) &#38;gt; 1 then -- there is a weather warning&#60;br /&#62;
			set CurrentWeather to paragraph 11&#60;br /&#62;
			set Temperature to paragraph 12&#60;br /&#62;
			set FeelsLike to paragraph 13&#60;br /&#62;
			set WeatherWarning to &#34;- There is currently a &#34; &#38;#38; WeatherWarning &#38;#38; &#34; in effect.&#34;&#60;br /&#62;
		else&#60;br /&#62;
			set CurrentWeather to paragraph 9&#60;br /&#62;
			set Temperature to paragraph 10&#60;br /&#62;
			set FeelsLike to paragraph 11&#60;br /&#62;
		end if&#60;br /&#62;
	end tell&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;	&#60;code&#62;set City to text 1 thru -4 of City -- strip off extra space&#60;br /&#62;
	set Temperature to text 1 thru -3 of Temperature -- strip off the ending degree and C characters&#60;br /&#62;
	if FeelsLike contains &#34;wind&#34; then -- not a valid wind chill or humidity index&#60;br /&#62;
		set FeelsLike to &#34;&#34;&#60;br /&#62;
	else&#60;br /&#62;
		set FeelsLike to text 13 thru -2 of FeelsLike -- strip off everything but numbers&#60;br /&#62;
		set FeelsLike to &#34; and feels like &#34; &#38;#38; FeelsLike &#38;#38; &#34;°C&#34;&#60;br /&#62;
	end if&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;	&#60;code&#62;return &#34;The current temperature in St. John's, NL is &#34; &#38;#38; Temperature &#38;#38; &#34;°C&#34; &#38;#38; FeelsLike &#38;#38; &#34;, and the weather condition for right now is &#34; &#38;#38; CurrentWeather &#38;#38; WeatherWarning&#60;br /&#62;
end linkinuscmd&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;This polls the Canadian Weather Network's mobile website (for simplicity) and then returns a line similar to the following: &#34;The current temperature in St. John's, NL is 21°C, and the weather condition for right now is A few clouds&#34;.&#60;/p&#62;
&#60;p&#62;If there's a humidex or wind chill in effect, it'll add that too.&#60;br /&#62;
Example: &#34;The current temperature in Tokyo is 24°C and feels like 32°C, and the weather condition for right now is A few clouds&#34;.&#60;/p&#62;
&#60;p&#62;The only thing you'd need to do in order to customize it to your own city or town, is change the city code in web address at the top of the script to your own. (you can find this out by going to the site and clicking the Edit button, then find your own city/town and copy the address.&#60;/p&#62;
&#60;p&#62;Enjoy!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
