From eca60dbc11ff490715e866fda6c18740144c433c Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 13 Feb 2013 22:48:54 +0100 Subject: HTML_HEADER is now a function. This enables to set a title for the generated HTML page when exporting articles. --- source/export.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'source') diff --git a/source/export.py b/source/export.py index 8b72bfcc..92fcee5d 100644 --- a/source/export.py +++ b/source/export.py @@ -40,10 +40,11 @@ import os import conf import utils -HTML_HEADER = """ +def HTML_HEADER(title="pyAggr3g470r"): + return """ -pyAggr3g470r +%s -""" +""" % (title,) HTML_FOOTER = """

This archive has been generated with @@ -82,7 +83,7 @@ def export_html(mongo_db): """ nb_articles = format(mongo_db.nb_articles(), ",d") feeds = mongo_db.get_all_feeds() - index = HTML_HEADER + index = HTML_HEADER("News archive") index += "

List of feeds

\n" index += """

%s articles.

\n