aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-11-19 12:48:24 +0100
committercedricbonhomme <devnull@localhost>2010-11-19 12:48:24 +0100
commit52e10b5377aa468aa7e2bde1825b344202e0a158 (patch)
tree882a32a0bc29ae5724f4c8f99302dbd975bbff31 /pyAggr3g470r.py
parentAdded CSS ToolTips descitpion for unread page (/unread/feed). (diff)
downloadnewspipe-52e10b5377aa468aa7e2bde1825b344202e0a158.tar.gz
newspipe-52e10b5377aa468aa7e2bde1825b344202e0a158.tar.bz2
newspipe-52e10b5377aa468aa7e2bde1825b344202e0a158.zip
Added CSS ToolTips description for favorites page (/list_favorites/).
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-xpyAggr3g470r.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index 97222652..372657f5 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -982,9 +982,19 @@ class Root:
self.feeds[rss_feed_id][4].encode('utf-8'), \
self.feeds[rss_feed_id][2].encode('utf-8'))
- html += article[1].encode('utf-8') + \
- """ - <a href="/description/%s:%s" rel="noreferrer" target="_blank">%s</a><br />\n""" % \
- (rss_feed_id, article[0].encode('utf-8'), article[2].encode('utf-8'))
+ # 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""" % \
+ (rss_feed_id, article[0].encode('utf-8'), \
+ article[2].encode('utf-8')[:150], description)
html += "<hr />\n"
html += htmlfooter
return html
bgstack15