Added --config option to read an additional config file; this lets you
have multiple output files with different options.
+Allow "outputfile -" to write the output to stdout; useful if you want
+to have cron mail the output to you rather than putting it on a web
+page.
+
- rawdog 1.2
Updated feedparser to 2.5.2, which fixes a bug that was making rawdog
timeformat %H:%M
# Where to write the output HTML to. You should place style.css in the same
-# directory.
+# directory. Specify this as "-" to write the HTML to stdout.
outputfile /home/azz/public_html/rawdog.html
# Whether to use (1) or not use (0) a <meta http-equiv="Refresh" ...> tag
print >>f, """</table>"""
bits["feeds"] = f.getvalue()
- f = open(outputfile + ".new", "w")
s = template
for k in bits.keys():
s = s.replace("__" + k + "__", bits[k])
- print >>f, s
- f.close()
- os.rename(outputfile + ".new", outputfile)
+
+ if outputfile == "-":
+ print s
+ else:
+ f = open(outputfile + ".new", "w")
+ print >>f, s
+ f.close()
+ os.rename(outputfile + ".new", outputfile)
def usage():
"""Display usage information."""