<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Adrian's Thoughts &#187; faq</title>
	<atom:link href="http://blog.frith.co.za/tag/faq/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.frith.co.za</link>
	<description>Ramblings about life, university, mathematics, computing, Linux, open source, etc.</description>
	<lastBuildDate>Thu, 19 Mar 2009 10:23:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Load shedding bot FAQs</title>
		<link>http://blog.frith.co.za/2008/04/17/load-shedding-bot-faqs/</link>
		<comments>http://blog.frith.co.za/2008/04/17/load-shedding-bot-faqs/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 18:58:28 +0000</pubDate>
		<dc:creator>adrian</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[faq]]></category>
		<category><![CDATA[load shedding]]></category>
		<category><![CDATA[loadshed]]></category>

		<guid isPermaLink="false">http://blog.frith.co.za/2008/04/17/load-shedding-bot-faqs/</guid>
		<description><![CDATA[Since posting about my Jabber load shedding warnings bot I&#8217;ve had a couple of questions asked about it. So here are the answers:
Where does the data come from?
The City of Cape Town has posted on the web the load shedding timetable as an Excel spreadsheet. I do a bit of manual manipulation on the spreadsheet [...]]]></description>
			<content:encoded><![CDATA[<p>Since posting about <a href="http://blog.frith.co.za/2008/04/12/get-load-shedding-warnings-via-jabber/">my Jabber load shedding warnings bot</a> I&#8217;ve had a couple of questions asked about it. So here are the answers:</p>
<p><strong>Where does the data come from?</strong><br />
The City of Cape Town has posted on the web the <a href="http://web.capetown.gov.za/eDocuments/Load_shedding_Apr_08_schedule_1442008113213_.xls">load shedding timetable as an Excel spreadsheet</a>. I do a bit of manual manipulation on the spreadsheet before dumping it to a CSV file. Then I have a script which parses the CSV file and generates a SQLite database.</p>
<p><strong>What&#8217;s the bot coded in?</strong><br />
Python. (<a href="http://www.xkcd.com/353/">Of course.</a>) It uses the <a href="http://xmpppy.sourceforge.net/">xmpppy</a> module to do the Jabber communication, and <a href="http://www.sqlobject.org/">SQLObject</a> for the database.</p>
<p><strong>How does it work?</strong><br />
The bot is actually made up of two separate components. There is a control daemon that is always available on Jabber, which accepts subscriptions and responds to your commands. Then there is a queuerunner fired by <code>cron</code> at the appropriate times, which sends the warning messages; it uses a negative Jabber priority, so your messages to the control daemon will never go to the queuerunner by accident.</p>
<p><strong>How many users do you have?</strong><br />
As of 18 April, there are 20 users. The average user subscribes to warnings for two different locations.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.frith.co.za/2008/04/17/load-shedding-bot-faqs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
