aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-10-25 00:05:21 +0200
committercedricbonhomme <devnull@localhost>2011-10-25 00:05:21 +0200
commit4a6706c867582b44f0fa8f6a8ea0223bf9376342 (patch)
treebb4a016a11d59b8fed2dc9fa23703900907b847d /pyAggr3g470r.py
parentRefactored export functions properly. The appropriate export function of the ... (diff)
downloadnewspipe-4a6706c867582b44f0fa8f6a8ea0223bf9376342.tar.gz
newspipe-4a6706c867582b44f0fa8f6a8ea0223bf9376342.tar.bz2
newspipe-4a6706c867582b44f0fa8f6a8ea0223bf9376342.zip
It is now possible to export all the database in the ePub format.
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-xpyAggr3g470r.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index de8485a1..7ecae80b 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -281,7 +281,8 @@ class Root:
html += "<h1>Export articles</h1>\n\n"
html += """<form method=get action="/export/"><select name="export_method">\n"""
html += """\t<option value="export_webzine" selected='selected'>Simple Webzine</option>\n"""
- html += """\t<option value="export_html" selected='selected'>HTML</option>\n"""
+ html += """\t<option value="export_html">HTML</option>\n"""
+ html += """\t<option value="export_epub">ePub</option>\n"""
html += """\t<option value="export_txt">Text</option>\n"""
html += """</select>\n\t<input type="submit" value="Export">\n</form>\n"""
html += "<hr />\n\n"
@@ -1207,7 +1208,10 @@ class Root:
Export articles currently loaded from the SQLite database with
the appropriate function of the 'export' module.
"""
- getattr(export, export_method)(self.feeds)
+ try:
+ getattr(export, export_method)(self.feeds)
+ except Exception, e:
+ return self.error_page(e)
return self.management()
export.exposed = True
bgstack15