<?xml version="1.0" encoding="UTF-8"?><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>Comments on: Almost too easy</title>
	<atom:link href="http://mgeisler.net/2006/11/almost-too-easy/feed/" rel="self" type="application/rss+xml" />
	<link>http://mgeisler.net/2006/11/almost-too-easy/</link>
	<description>Adventures with Computers</description>
	<pubDate>Tue, 06 Jan 2009 01:33:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6-bleeding</generator>
		<item>
		<title>By: free quotes</title>
		<link>http://mgeisler.net/2006/11/almost-too-easy/#comment-45116</link>
		<dc:creator>free quotes</dc:creator>
		<pubDate>Fri, 16 Feb 2007 17:09:58 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2006/11/27/almost-too-easy/#comment-45116</guid>
		<description>&lt;p&gt;Thank you, I just wanted to give a greeting and tell you I like your website very much.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you, I just wanted to give a greeting and tell you I like your website very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Geisler</title>
		<link>http://mgeisler.net/2006/11/almost-too-easy/#comment-28670</link>
		<dc:creator>Martin Geisler</dc:creator>
		<pubDate>Mon, 04 Dec 2006 00:36:23 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2006/11/27/almost-too-easy/#comment-28670</guid>
		<description>&lt;p&gt;Hi Ryu, I don't know why it doesn't work... maybe it is because the above code is only a snippet of what I ended up using:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/python

from os.path import expanduser
from BeautifulSoup import BeautifulStoneSoup

f = file(expanduser('~/.tvtime/stationlist.xml'), 'r+')
soup = BeautifulStoneSoup(f, selfClosingTags=['station'])

for i, station in enumerate(soup.findAll('station')):
    station['position'] = i+1

f.seek(0)
f.write(soup.prettify())
f.truncate()
f.close()
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That really ought to work! It will overwrite your current &lt;code&gt;~/.tvtime/stationlist.xml&lt;/code&gt; file, so you might want to make a backup of it first, just in case :-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Ryu, I don&#8217;t know why it doesn&#8217;t work&#8230; maybe it is because the above code is only a snippet of what I ended up using:</p>
<pre><code>#!/usr/bin/python

from os.path import expanduser
from BeautifulSoup import BeautifulStoneSoup

f = file(expanduser('~/.tvtime/stationlist.xml'), 'r+')
soup = BeautifulStoneSoup(f, selfClosingTags=['station'])

for i, station in enumerate(soup.findAll(&#8217;station&#8217;)):
    station['position'] = i+1

f.seek(0)
f.write(soup.prettify())
f.truncate()
f.close()
</code></pre>
<p>That really ought to work! It will overwrite your current <code>~/.tvtime/stationlist.xml</code> file, so you might want to make a backup of it first, just in case :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryu</title>
		<link>http://mgeisler.net/2006/11/almost-too-easy/#comment-28611</link>
		<dc:creator>Ryu</dc:creator>
		<pubDate>Sun, 03 Dec 2006 16:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2006/11/27/almost-too-easy/#comment-28611</guid>
		<description>&lt;p&gt;sorry, here are those lines:&lt;/p&gt;

&lt;p&gt;station name="TRT 1" active="1" position="1" band="VHF E2-E12" channel="E8" finetune="0" norm="PAL" audio="auto"
station name="TRT 2" active="1" position="2" band="VHF E2-E12" channel="E9" finetune="0" norm="PAL" audio="auto"
station name="KANAL D" active="1" position="40" band="VHF S1-S41" channel="S28" finetune="0" norm="PAL" audio="auto"
station name="SHOW TV" active="1" position="6" band="VHF E2-E12" channel="E6" finetune="0" norm="PAL" audio="auto"&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>sorry, here are those lines:</p>
<p>station name=&#8221;TRT 1&#8243; active=&#8221;1&#8243; position=&#8221;1&#8243; band=&#8221;VHF E2-E12&#8243; channel=&#8221;E8&#8243; finetune=&#8221;0&#8243; norm=&#8221;PAL&#8221; audio=&#8221;auto&#8221;<br />
station name=&#8221;TRT 2&#8243; active=&#8221;1&#8243; position=&#8221;2&#8243; band=&#8221;VHF E2-E12&#8243; channel=&#8221;E9&#8243; finetune=&#8221;0&#8243; norm=&#8221;PAL&#8221; audio=&#8221;auto&#8221;<br />
station name=&#8221;KANAL D&#8221; active=&#8221;1&#8243; position=&#8221;40&#8243; band=&#8221;VHF S1-S41&#8243; channel=&#8221;S28&#8243; finetune=&#8221;0&#8243; norm=&#8221;PAL&#8221; audio=&#8221;auto&#8221;<br />
station name=&#8221;SHOW TV&#8221; active=&#8221;1&#8243; position=&#8221;6&#8243; band=&#8221;VHF E2-E12&#8243; channel=&#8221;E6&#8243; finetune=&#8221;0&#8243; norm=&#8221;PAL&#8221; audio=&#8221;auto&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryu</title>
		<link>http://mgeisler.net/2006/11/almost-too-easy/#comment-28610</link>
		<dc:creator>Ryu</dc:creator>
		<pubDate>Sun, 03 Dec 2006 16:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2006/11/27/almost-too-easy/#comment-28610</guid>
		<description>&lt;p&gt;Hi Martin, I tried to do this but position attributes didn't reflect document order.&lt;/p&gt;

&lt;p&gt;Here are my first 4 station lines in the output file:&lt;/p&gt;

&lt;p&gt;


&lt;/p&gt;

&lt;p&gt;As you see position attributes aren't correct.&lt;/p&gt;

&lt;p&gt;Am I doing something wrong?&lt;/p&gt;

&lt;p&gt;Could you please reply by e-mail? Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Martin, I tried to do this but position attributes didn&#8217;t reflect document order.</p>
<p>Here are my first 4 station lines in the output file:</p>
</p>
<p>As you see position attributes aren&#8217;t correct.</p>
<p>Am I doing something wrong?</p>
<p>Could you please reply by e-mail? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Geisler</title>
		<link>http://mgeisler.net/2006/11/almost-too-easy/#comment-28023</link>
		<dc:creator>Martin Geisler</dc:creator>
		<pubDate>Tue, 28 Nov 2006 08:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2006/11/27/almost-too-easy/#comment-28023</guid>
		<description>&lt;p&gt;Hehe, thanks! :-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hehe, thanks! :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://mgeisler.net/2006/11/almost-too-easy/#comment-28019</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Tue, 28 Nov 2006 07:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2006/11/27/almost-too-easy/#comment-28019</guid>
		<description>&lt;p&gt;Yeah, that is kinda geeky - great :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yeah, that is kinda geeky - great :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kristian Kristensen</title>
		<link>http://mgeisler.net/2006/11/almost-too-easy/#comment-27965</link>
		<dc:creator>Kristian Kristensen</dc:creator>
		<pubDate>Tue, 28 Nov 2006 00:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2006/11/27/almost-too-easy/#comment-27965</guid>
		<description>&lt;p&gt;You gotta love a solution like that! True geekdom.
Glad to see you're back in "the real world" with TV ;-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>You gotta love a solution like that! True geekdom.<br />
Glad to see you&#8217;re back in &#8220;the real world&#8221; with TV ;-)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
