Add :reader

Uses wheezy.template, which is said to be fast and light. Provided template file is really basic, custom css suggested.
This commit is contained in:
2014-05-29 14:12:16 +02:00
parent 814ff46fbd
commit f90958149e
4 changed files with 62 additions and 2 deletions

View File

@@ -644,6 +644,8 @@ def After(rss, options):
return rss.tojson()
elif options.csv:
return rss.tocsv()
elif options.reader:
return rss.tohtml()
else:
return rss.tostring(xml_declaration=True, encoding='UTF-8')
@@ -692,7 +694,7 @@ def cgi_app(environ, start_response):
headers['status'] = '200 OK'
headers['etag'] = '"%s"' % int(time.time())
if options.html:
if options.html or options.reader:
headers['content-type'] = 'text/html'
elif options.debug or options.txt:
headers['content-type'] = 'text/plain'