Articles containing the string ${query}
<%
html = ""
%>
%if feed_id is None:
%for feed in feeds:
<%
new_feed_section = True
for article in mongo.get_articles(feed["feed_id"]):
article_content = utils.clear_string(article["article_content"])
if not article_content:
article_content = utils.clear_string(article["article_title"])
if wordre.findall(article_content) != []:
if new_feed_section is True:
new_feed_section = False
html += """
\n""" % \
(feed["feed_id"], feed["feed_title"], feed["feed_link"], feed["feed_image"])
if article["article_readed"] == False:
# not readed articles are in bold
not_read_begin, not_read_end = "
", ""
else:
not_read_begin, not_read_end = "", ""
# display a heart for faved articles
if article["article_like"] == True:
like = """
"""
else:
like = ""
# descrition for the CSS ToolTips
description = " ".join(article_content[:500].split(' ')[:-1])
# a description line per article (date, title of the article and
# CSS description tooltips on mouse over)
html += article["article_date"].strftime('%Y-%m-%d %H:%M') + " - " + \
"""
%s%s%s%s""" % \
(feed["feed_id"], article["article_id"], not_read_begin, \
article["article_title"][:150], not_read_end, description) + like + "
\n"
%>
%endfor
%endif
${html}