From fc9c6a429046d2ea5e0ca94366bfba3a908ccdda Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Fri, 19 Nov 2010 12:43:43 +0100 Subject: Added CSS ToolTips descitpion for unread page (/unread/feed). --- pyAggr3g470r.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'pyAggr3g470r.py') diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index e60fef8f..97222652 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -646,10 +646,20 @@ class Root:
""" % (feed_id, self.feeds[feed_id][3].encode('utf-8')) for article in articles_list: if article[5] == "0": - html += article[1].encode('utf-8') + \ - """ - %s""" % \ - (feed_id, article[0].encode('utf-8'), article[2].encode('utf-8')) + \ - "
\n" + # descrition for the CSS ToolTips + article_content = utils.clear_string(article[4].encode('utf-8')) + if article_content: + description = " ".join(article_content[:500].split(' ')[:-1]) + else: + description = "No description." + + # a description line per article (date, title of the article and + # CSS description tooltips on mouse over) + html += article[1].encode('utf-8') + " - " + \ + """%s%s
\n""" % \ + (feed_id, article[0].encode('utf-8'), \ + article[2].encode('utf-8')[:150], description) + html += """
\nMark all as read""" % (feed_id,) else: html += "

No unread article(s)

" -- cgit