From dbbc1147b83612cb13b47d262507989f2fc11c81 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Tue, 7 Dec 2010 14:41:28 +0100 Subject: Renamed 2 dynamic pages. --- pyAggr3g470r.py | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 8ea569d7..dd962144 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -189,13 +189,13 @@ class Root: # a description line per article (date, title of the article and # CSS description tooltips on mouse over) html += article.article_date + " - " + \ - """%s%s%s%s""" % \ + """%s%s%s%s""" % \ (feed.feed_id, article.article_id, not_read_begin, \ article_title, not_read_end, description) + like + "
\n" html += "
\n" # some options for the current feed - html += """All articles   """ % (feed.feed_id,) + html += """All articles   """ % (feed.feed_id,) html += """  Mark all as read""" % (feed.feed_id,) if feed.nb_unread_articles != 0: html += """     Unread article(s) (%s)""" % (feed.feed_id, feed.nb_unread_articles) @@ -341,7 +341,7 @@ class Root: not_read_end = "" html += article.article_date + " - " + not_read_begin + \ - """%s""" % \ + """%s""" % \ (feed_id, article.article_id, article.article_title) + \ not_read_end + """
\n""" else: @@ -384,7 +384,7 @@ class Root: # a description line per article (date, title of the article and # CSS description tooltips on mouse over) html += article.article_date + " - " + \ - """%s%s%s%s""" % \ + """%s%s%s%s""" % \ (feed.feed_id, article.article_id, not_read_begin, \ article.article_title[:150], not_read_end, description) + like + "
\n" html += "
" @@ -405,9 +405,9 @@ class Root: fetch.exposed = True - def description(self, param): + def article(self, param): """ - Display the description of an article in a new Web page. + Display the article in parameter in a new Web page. """ try: feed_id, article_id = param.split(':') @@ -444,7 +444,7 @@ class Root: html += '\n
\n' # Title of the article - html += """

%s from %s

\n
\n""" % \ + html += """

%s from %s

\n
\n""" % \ (article.article_title, feed_id, feed.feed_title) if article.like == "1": html += """""" % \ @@ -466,13 +466,13 @@ class Root: # Previous and following articles try: following = feed.articles.values()[feed.articles.keys().index(article_id) - 1] - html += """
\n""" % \ + html += """
\n""" % \ (feed_id, following.article_id, following.article_title) except: pass try: previous = feed.articles.values()[feed.articles.keys().index(article_id) + 1] - html += """
\n""" % \ + html += """
\n""" % \ (feed_id, previous.article_id, previous.article_title) except: pass @@ -536,10 +536,10 @@ class Root: html += "
\n" + htmlfooter return html - description.exposed = True + article.exposed = True - def all_articles(self, feed_id): + def articles(self, feed_id): """ Display all articles of a feed. """ @@ -582,7 +582,7 @@ class Root: # a description line per article (date, title of the article and # CSS description tooltips on mouse over) html += article.article_date + " - " + \ - """%s%s%s%s""" % \ + """%s%s%s%s""" % \ (feed.feed_id, article.article_id, not_read_begin, \ article.article_title[:150], not_read_end, description) + like + "
\n" @@ -591,7 +591,7 @@ class Root: html += htmlfooter return html - all_articles.exposed = True + articles.exposed = True def unread(self, feed_id=""): @@ -629,7 +629,7 @@ class Root: # a description line per article (date, title of the article and # CSS description tooltips on mouse over) html += article.article_date + " - " + \ - """%s%s
\n""" % \ + """%s%s
\n""" % \ (feed.feed_id, article.article_id, article.article_title[:150], description) if nb_unread == feed.nb_unread_articles: @@ -641,7 +641,7 @@ class Root: feed = self.feeds[feed_id] except: self.error_page("This feed do not exists.") - html += """

Unread article(s) of the feed %s

+ html += """

Unread article(s) of the feed %s


""" % (feed.feed_id, feed.feed_title) for article in feed.articles.values(): if article.article_readed == "0": @@ -655,7 +655,7 @@ class Root: # a description line per article (date, title of the article and # CSS description tooltips on mouse over) html += article.article_date + " - " + \ - """%s%s
\n""" % \ + """%s%s
\n""" % \ (feed.feed_id, article.article_id, article.article_title[:150], description) html += """
\nMark all as read""" % (feed.feed_id,) @@ -730,7 +730,7 @@ class Root: (feed.feed_id, feed.feed_site_link, feed.feed_title, feed.feed_link, feed.feed_image) html += article.article_date + " - " + not_read_begin + \ - """%s""" % \ + """%s""" % \ (feed.feed_id, article.article_id, \ utils.clear_string(article.article_title)) + not_read_end + like + "
\n" @@ -767,7 +767,7 @@ class Root: html += htmlnav html += """
""" feed_id, article_id = target.split(':') - html += """

%s from %s

\n
\n"""% \ + html += """

%s from %s

\n
\n"""% \ (article.article_title, feed_id, feed.feed_title) description = utils.clear_string(article.article_description) if description: @@ -824,7 +824,7 @@ class Root: if param == "" or param == "Feed_FromMainPage": return self.index() elif param == "Feed": - return self.all_articles(identifiant) + return self.articles(identifiant) mark_as_read.exposed = True @@ -839,7 +839,7 @@ class Root: html += "

You are receiving e-mails for the following feeds:

\n" for feed in self.feeds.values(): if feed.mail == "1": - html += """\t%s - Stop
\n""" % \ + html += """\t%s - Stop
\n""" % \ (feed.feed_id, feed.feed_title, feed.feed_id) html += """

Notifications are sent to: %s

""" % \ (utils.mail_to, utils.mail_to) @@ -904,7 +904,7 @@ class Root: c.close() except Exception: self.error_page("Impossible to like/dislike this article (database error).") - return self.description(feed_id+":"+article_id) + return self.article(feed_id+":"+article_id) like.exposed = True @@ -939,7 +939,7 @@ class Root: # a description line per article (date, title of the article and # CSS description tooltips on mouse over) html += article.article_date + " - " + \ - """%s%s
\n""" % \ + """%s%s
\n""" % \ (feed.feed_id, article.article_id, article.article_title[:150], description) html += "
\n" html += htmlfooter @@ -1149,7 +1149,7 @@ class Root: section.paragraphs = [utils.clear_string(article.article_description)] ez_epub.makeBook(article.article_title.decode(), [feed.feed_title.decode()], [section], \ os.path.normpath(folder + "article"), lang='en-US', cover=None) - return self.description(param) + return self.article(param) epub.exposed = True -- cgit