diff --git a/append.py b/append.py
index 11c9580..02ac278 100644
--- a/append.py
+++ b/append.py
@@ -1,7 +1,9 @@
import sys
import feedparser
+import urllib2
from urllib2 import HTTPError, URLError
import logging
+import re
def __fetch_feed(url):
try:
@@ -16,36 +18,86 @@ def __fetch_feed(url):
logging.debug('Network failure reason, %s.' % e.reason)
return None
-def __append_mp3(entry):
- latest = __fetch_feed('cmdln_mp3_in.xml')
+def __append(entry, suffix, append_fn):
+ latest = __fetch_feed('cmdln_%s.xml' % suffix)
if entry.title.find(latest.title) != -1:
logging.info('Up to date.')
return
- f = open('cmdln_mp3_in.xml')
- o = open('cmdln_mp3_out.xml', 'w')
+ f = open('cmdln_%s.xml' % suffix)
+ o = open('cmdln_%s_out.xml' % suffix, 'w')
first = False
try:
for line in f:
if line.find('
View the More news, commentary, and alternate feeds available at http://thecommandline.net/. View the Logo thanks to Jared Axelrod of Free Planet X.
There is no new hacker word of the week this week.
- -The feature this week is the interview I recorded with Randy Chertkow of Beatnik Turtle. If you are interested, here are the 2007, 2008, and 2009 interviews as well. In the interview, we mention the Indie Guide web site, Randy and Jason's columns at Electronic Musician, and TrackMyDisc.com.
- -More news and commentary and alternate feeds available at http://thecommandline.net/. View the detailed show notes online. You can grab the flac encoded audio from the Internet Archive.
- - - -This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
]]> -