diff options
author | cedricbonhomme <devnull@localhost> | 2010-11-19 12:32:17 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-11-19 12:32:17 +0100 |
commit | 30358b719e1c181663a6bf7163bf2982178ea229 (patch) | |
tree | 96d3fa6ac49b4e4e6a15e0734cdd83c383dd15a2 | |
parent | New free icons. (diff) | |
download | newspipe-30358b719e1c181663a6bf7163bf2982178ea229.tar.gz newspipe-30358b719e1c181663a6bf7163bf2982178ea229.tar.bz2 newspipe-30358b719e1c181663a6bf7163bf2982178ea229.zip |
Added CSS ToolTips descitpion for feeds page (/all_articles/).
-rwxr-xr-x | pyAggr3g470r.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 2c651271..33b228ba 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -567,13 +567,20 @@ class Root: else: like = "" - html += article[1].encode('utf-8') + \ - " - " + not_read_begin + \ - """<a href="/description/%s:%s" rel="noreferrer" target="_blank">%s</a>""" % \ - (feed_id, article[0].encode('utf-8'), \ - utils.clear_string(article[2].encode('utf-8'))) + \ - not_read_end + like + \ - "<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%s%s<span class="classic">%s</span></a>""" % \ + (feed_id, article[0].encode('utf-8'), not_read_begin, \ + article[2].encode('utf-8')[:150], \ + not_read_end, description) + like + "<br />\n" html += """\n<h4><a href="/">All feeds</a></h4>""" html += "<hr />\n" |