diff options
author | cedricbonhomme <devnull@localhost> | 2010-11-19 12:43:43 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-11-19 12:43:43 +0100 |
commit | fc9c6a429046d2ea5e0ca94366bfba3a908ccdda (patch) | |
tree | 34f8fbf2a741f893b38be1f973d2a19b04385288 | |
parent | Added CSS ToolTips descitpion for unread page (/unread/). (diff) | |
download | newspipe-fc9c6a429046d2ea5e0ca94366bfba3a908ccdda.tar.gz newspipe-fc9c6a429046d2ea5e0ca94366bfba3a908ccdda.tar.bz2 newspipe-fc9c6a429046d2ea5e0ca94366bfba3a908ccdda.zip |
Added CSS ToolTips descitpion for unread page (/unread/feed).
-rwxr-xr-x | pyAggr3g470r.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index e60fef8f..97222652 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -646,10 +646,20 @@ class Root: <br />""" % (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') + \ - """ - <a href="/description/%s:%s" rel="noreferrer" target="_blank">%s</a>""" % \ - (feed_id, article[0].encode('utf-8'), article[2].encode('utf-8')) + \ - "<br />\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') + " - " + \ + """<a class="tooltip" href="/description/%s:%s" rel="noreferrer" target="_blank">%s<span class="classic">%s</span></a><br />\n""" % \ + (feed_id, article[0].encode('utf-8'), \ + article[2].encode('utf-8')[:150], description) + html += """<hr />\n<a href="/mark_as_read/Feed:%s">Mark all as read</a>""" % (feed_id,) else: html += "<h1>No unread article(s)</h1>" |