Finished ogg support.

This commit is contained in:
Thomas Gideon 2010-09-16 17:11:50 -04:00
parent 942a30084e
commit e7dea14cdf
2 changed files with 7 additions and 24 deletions

View File

@ -29,15 +29,15 @@ def __append(entry, suffix, append_fn):
try:
for line in f:
if line.find('<item>') != -1 and not first:
append_fn(entry, o)
append_fn(entry, o, suffix)
first = True
o.write(line)
finally:
f.close()
def __append_mp3(entry, output):
(url, mime_type, size) = __enclosure(entry.enclosures, 'http://cmdln.evenflow.nl/mp3', 'mp3')
def __append_non_itunes(entry, output, suffix):
(url, mime_type, size) = __enclosure(entry.enclosures, 'http://cmdln.evenflow.nl/mp3', suffix)
output.write(""" <item>
<title>%(title)s (Comment Line 240-949-2638)</title>
<link>%(link)s</link>
@ -54,7 +54,7 @@ def __append_mp3(entry, output):
'url' : url,
'mime_type' : mime_type,
'size' : size })
logging.info('Insert new MP3 item.')
logging.info('Inserted new %s item.' % suffix)
def __permalink(title):
@ -95,7 +95,8 @@ def main():
logging.error('Failed to fetch feed.')
sys.exit(1)
__append(entry, 'mp3', __append_mp3)
__append(entry, 'mp3', __append_non_itunes)
__append(entry, 'ogg', __append_non_itunes)
if __name__ == "__main__":

View File

@ -20,24 +20,6 @@
<description>Logo thanks to Jared Axelrod of Free Planet X.</description>
</image>
<atom:link href="http://idisk.me.com/cmdln/Public/cmdln_ogg.xml" rel="self" type="application/rss+xml"/>
<item>
<title>TCLP 2010-09-15 Interview: Randy Chertkow of Beatnik Turtle (Comment Line 240-949-2638)</title>
<link>http://thecommandline.net/2010/09/15/beatnik_turtle4/</link>
<description><![CDATA[<p>This is a feature cast, an episode of The Command Line Podcast.</p>
<p>There is no new hacker word of the week this week.</p>
<p>The feature this week is the interview I recorded with Randy Chertkow of <a href="http://beatnikturtle.com/">Beatnik Turtle</a>. If you are interested, here are the <a href="http://thecommandline.net/2007/09/05/beatnik_turtle/">2007</a>, <a href="http://thecommandline.net/2008/09/10/beatnik_turtle_2/">2008</a>, and <a href="http://thecommandline.net/2009/09/09/beatnik_turtle3/">2009</a> interviews as well. In the interview, we mention <a href="http://www.indieguide.com/">the Indie Guide web site</a>, <a href="http://emusician.com/searchresults/?ord=d&amp;terms=chertkow&amp;x=0&amp;y=0">Randy and Jason's columns at Electronic Musician</a>, and <a href="http://trackmydisc.com/">TrackMyDisc.com</a>.</p>
<p>More news and commentary and alternate feeds available at http://thecommandline.net/. View the <a href="http://thecommandline.net/wiki/2010_09_15">detailed show notes online</a>. You can grab the <a href="http://www.archive.org/details/Tclp2010-09-15InterviewRandyChertkowOfBeatnikTurtle">flac encoded audio</a> from the Internet Archive.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/"><img style="border-width: 0px;" src="http://thecommandline.net/wp-content/uploads/cc-by-sa.png" alt="Creative Commons License" /></a></p>
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/us/">Creative Commons Attribution-Share Alike 3.0 United States License</a>.</p>]]></description>
<pubDate>Wed, 15 Sep 2010 21:30:38 -0400</pubDate>
<enclosure url="http://cmdln.evenflow.nl/mp3/cmdln.net_2010-09-15.ogg" length="40162067" type="audio/ogg"/>
<guid isPermaLink="false">tclp-20100915-interview-randy-chertkow-of-beatn</guid>
</item>
<item>
<title>TCLP 2010-09-08 Creative Commons, Legal Issue Panel from Dragon*Con 2010 (Comment Line 240-949-2638)</title>
<link>http://thecommandline.net/2010/09/08/dragoncon_cc_4/</link>
@ -3767,4 +3749,4 @@
<guid isPermaLink="false">tclp-20080723-the-last-hope-comment-line-24094</guid>
</item>
</channel>
</rss>
</rss>