From 79dfa104623d51b7e0bdb411eadceda1747d0a20 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 14 Sep 2013 10:44:59 +0200 Subject: Templates has been removed to the upper folder. --- source/static/templates/article.html | 67 ------------- source/static/templates/articles.html | 43 --------- source/static/templates/base.html | 28 ------ source/static/templates/confirmation.html | 5 - source/static/templates/error.html | 5 - source/static/templates/favorites.html | 30 ------ source/static/templates/feed.html | 148 ----------------------------- source/static/templates/history.html | 80 ---------------- source/static/templates/inactives.html | 15 --- source/static/templates/index.html | 108 --------------------- source/static/templates/languages.html | 25 ----- source/static/templates/management.html | 84 ---------------- source/static/templates/notifications.html | 18 ---- source/static/templates/search.html | 57 ----------- source/static/templates/statistics.html | 14 --- source/static/templates/subscriptions.html | 13 --- source/static/templates/unread.html | 76 --------------- 17 files changed, 816 deletions(-) delete mode 100644 source/static/templates/article.html delete mode 100644 source/static/templates/articles.html delete mode 100644 source/static/templates/base.html delete mode 100644 source/static/templates/confirmation.html delete mode 100644 source/static/templates/error.html delete mode 100644 source/static/templates/favorites.html delete mode 100644 source/static/templates/feed.html delete mode 100644 source/static/templates/history.html delete mode 100644 source/static/templates/inactives.html delete mode 100644 source/static/templates/index.html delete mode 100644 source/static/templates/languages.html delete mode 100644 source/static/templates/management.html delete mode 100644 source/static/templates/notifications.html delete mode 100644 source/static/templates/search.html delete mode 100644 source/static/templates/statistics.html delete mode 100644 source/static/templates/subscriptions.html delete mode 100644 source/static/templates/unread.html (limited to 'source/static/templates') diff --git a/source/static/templates/article.html b/source/static/templates/article.html deleted file mode 100644 index c1fe41e5..00000000 --- a/source/static/templates/article.html +++ /dev/null @@ -1,67 +0,0 @@ -## article.html -<%inherit file="base.html"/> -
-
-

${article["article_title"]} from ${feed["feed_title"]}

-
- %if article["article_like"]: - - %else: - - %endif -    -

- ${description} -
- - - -
-
- - - -
-


- - %if plain_text == "1": - HTML version - %else: - Plain text - %endif - - Export to EPUB -
- - Share this article:

- - - - - - - - - - - - - - - - - - - - - - -

-
- -
-
diff --git a/source/static/templates/articles.html b/source/static/templates/articles.html deleted file mode 100644 index d7fcc4d5..00000000 --- a/source/static/templates/articles.html +++ /dev/null @@ -1,43 +0,0 @@ -## articles.html -<%inherit file="base.html"/> -<% -import utils -%> - - -
-

Articles of the feed ${feed['feed_title']}

- %if articles.count() == 0: -

No articles yet.

- %else: -
- %endif - %for article in articles: - <% - if article["article_readed"] == False: - not_read_begin, not_read_end = "", "" - else: - not_read_begin, not_read_end = "", "" - - if article["article_like"] == True: - like = """""" - else: - like = "" - - article_content = utils.clear_string(article["article_content"]) - if article_content: - description = " ".join(article_content[:500].split(' ')[:-1]) - else: - description = "No description." - %> - ${article["article_date"].strftime('%Y-%m-%d %H:%M')} - ${not_read_begin}${article["article_title"][:150]}${not_read_end}${description} ${like} -
- %endfor -

All feeds

diff --git a/source/static/templates/base.html b/source/static/templates/base.html deleted file mode 100644 index 03c40f90..00000000 --- a/source/static/templates/base.html +++ /dev/null @@ -1,28 +0,0 @@ -## base.html - - - - - %if header_text is UNDEFINED: - pyAggr3g470r - %elif header_text == 0: - pyAggr3g470r - %else: - ${header_text} - pyAggr3g470r - %endif - - - - - -

pyAggr3g470r

- ${self.body()} -
-

This software is under GPLv3 license. You are welcome to copy, modify or - redistribute the source code according to the GPLv3 license.
- Source code of pyAggr3g470r.

-
- - diff --git a/source/static/templates/confirmation.html b/source/static/templates/confirmation.html deleted file mode 100644 index ae206838..00000000 --- a/source/static/templates/confirmation.html +++ /dev/null @@ -1,5 +0,0 @@ -## confirmation.html -<%inherit file="base.html"/> -
-

Your request processed successfully:

-

${message}

diff --git a/source/static/templates/error.html b/source/static/templates/error.html deleted file mode 100644 index 3790d3e9..00000000 --- a/source/static/templates/error.html +++ /dev/null @@ -1,5 +0,0 @@ -## error.html -<%inherit file="base.html"/> -
-

An error occured:

- ${message} \ No newline at end of file diff --git a/source/static/templates/favorites.html b/source/static/templates/favorites.html deleted file mode 100644 index 4dd17b6b..00000000 --- a/source/static/templates/favorites.html +++ /dev/null @@ -1,30 +0,0 @@ -## favorites.html -<%inherit file="base.html"/> -<% -import utils -%> -
-

Your favorites articles (${sum([elem.count() for elem in articles.values()])})

- %for feed in feeds: - <% - new_feed_section = True - %> - %for article in articles[feed["feed_id"]]: - <% - if new_feed_section: - new_feed_section = False - title = """

%s

\n""" % \ - (feed["feed_id"], feed["site_link"], feed["feed_title"], feed["feed_link"], feed["feed_image"]) - else: - title = "" - article_content = utils.clear_string(article["article_content"]) - if article_content: - description = " ".join(article_content[:500].split(' ')[:-1]) - else: - description = "No description." - %> - ${title} - - ${article["article_date"].strftime('%Y-%m-%d %H:%M')} - ${article["article_title"][:150]}${description}
- %endfor - %endfor diff --git a/source/static/templates/feed.html b/source/static/templates/feed.html deleted file mode 100644 index 2dadb8b4..00000000 --- a/source/static/templates/feed.html +++ /dev/null @@ -1,148 +0,0 @@ -## feed.html -<%inherit file="base.html"/> -<% -import utils -%> -
- %if articles != []: -

The feed ${feed['feed_title']} contains ${format(nb_articles_feed, ',d')} articles. - Representing ${round((nb_articles_feed / nb_articles_total) * 100, 4)} percent of the total (${format(nb_articles_total, ',d')} articles). -
- Address of the feed: ${feed['feed_link']}. -
- Address of the site: ${feed['site_link']}. -
- Logo:

- -

${(nb_unread_articles_feed == 0 and ["All articles are read"] or [''+str(nb_unread_articles_feed)+'' + ' unread article' + (nb_unread_articles_feed == 1 and [""] or ["s"])[0]])[0]}.

- %else: -

No articles for the feed ${feed['feed_title']}. -
- Address of the feed: ${feed['feed_link']}. -
- Address of the site: ${feed['site_link']}.

- %endif - - %if feed["mail"] == True: -

- You are receiving articles from this feed to the address: ${mail_to}. - Stop receiving articles from this feed. - %if not mail_notification_enabled: -
However e-mail notification is disabled in the configuration file. - %endif -

- %endif - - %if articles != []: -

The last article was posted ${elapsed.days} day(s) ago.
- Daily average: ${average}, between the ${first_post_date.strftime('%Y-%m-%d')} and the ${end_post_date.strftime('%Y-%m-%d')}.

- -
-

Recent articles

- <% - html = "" - %> - %for article in articles: - <% - 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 - article_content = utils.clear_string(article["article_content"]) - if article_content: - description = " ".join(article_content[:500].split(' ')[:-1]) - else: - description = "No description." - # Title of the article - article_title = article["article_title"] - if len(article_title) >= 80: - article_title = article_title[:80] + " ..." - - # 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_title, not_read_end, description) + like + "
\n" - %> - %endfor - ${html} - - All articles    -
- - %if nb_favorites != 0: -

-

Your favorites articles for this feed

- <% - html = "" - %> - %for article in favorites: - <% - #descrition for the CSS ToolTips - article_content = utils.clear_string(article["article_content"]) - 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["article_date"].strftime('%Y-%m-%d %H:%M') + " - " + \ - """%s%s
\n""" % \ - (feed["feed_id"], article["article_id"], article["article_title"][:150], description) - %> - %endfor - ${html} - %endif - %endif - - - -
-

Edit this feed

-
- - -
- -
- - - -
- -
- - - -
- -
- - -
- -
-

- (deletes corresponding articles)

-
- - %if articles != []: -
-

Tag cloud

-
- Minimum size of a word: - -
-
${tag_cloud}
- %endif diff --git a/source/static/templates/history.html b/source/static/templates/history.html deleted file mode 100644 index 16f909dc..00000000 --- a/source/static/templates/history.html +++ /dev/null @@ -1,80 +0,0 @@ -## history.html -<%inherit file="base.html"/> -<% -import utils -import calendar -from collections import Counter -%> -
- <% - html = "" - # Get the date from the tag cloud - # Format: /history/?query=year:2011-month:06 to get the - # list of articles of June, 2011. - if query == "all": - html += "

Search with tags cloud

\n" - html += "

Choose a year

\n" - if "year" in query: - the_year = query.split('-')[0].split(':')[1] - if "month" not in query: - html += "

Choose a month for the year " + the_year + "

\n" - if "month" in query: - the_month = query.split('-')[1].split(':')[1] - html += "

Articles of "+ calendar.month_name[int(the_month)] + ", "+ the_year +".

\n" - - timeline = Counter() - for feed in feeds: - new_feed_section = True - for article in mongo.get_articles(feed["feed_id"]): - - if query == "all": - timeline[article["article_date"].strftime('%Y')] += 1 - - elif query[:4] == "year": - - if article["article_date"].strftime('%Y') == the_year: - timeline[article["article_date"].strftime('%m')] += 1 - - if "month" in query: - if article["article_date"].strftime('%m') == the_month: - if article["article_readed"] == False: - # not readed articles are in bold - not_read_begin, not_read_end = "", "" - else: - not_read_begin, not_read_end = "", "" - - if article["article_like"] == True: - like = """ """ - else: - like = "" - # Descrition for the CSS ToolTips - article_content = utils.clear_string(article["article_content"]) - if article_content: - description = " ".join(article_content[:500].split(' ')[:-1]) - else: - description = "No description." - # Title of the article - article_title = article["article_title"] - if len(article_title) >= 80: - article_title = article_title[:80] + " ..." - - if new_feed_section is True: - new_feed_section = False - html += """

%s

\n""" % \ - (feed["feed_id"], feed["site_link"], feed["feed_title"], feed["feed_link"], feed["feed_image"]) - - html += article["article_date"].strftime("%a %d (%H:%M:%S) ") + " - " + \ - """%s%s%s%s""" % \ - (feed["feed_id"], article["article_id"], not_read_begin, \ - article_title, not_read_end, description) + like + "
\n" - if query == "all": - query_string = "year" - elif "year" in query: - query_string = "year:" + the_year + "-month" - if "month" not in query: - html += '
' + \ - utils.tag_cloud([(elem, timeline[elem]) for elem in timeline.keys()], query_string) + '
' - %> - ${html} diff --git a/source/static/templates/inactives.html b/source/static/templates/inactives.html deleted file mode 100644 index 57482b61..00000000 --- a/source/static/templates/inactives.html +++ /dev/null @@ -1,15 +0,0 @@ -## inactives.html -<%inherit file="base.html"/> -
- %if inactives != []: -
-

Feeds with no recent articles since days:

-
- - %else: -

No inactive feeds.

- %endif diff --git a/source/static/templates/index.html b/source/static/templates/index.html deleted file mode 100644 index 88ca7a87..00000000 --- a/source/static/templates/index.html +++ /dev/null @@ -1,108 +0,0 @@ -## index.html -<%inherit file="base.html"/> -<% -import utils -%> -

-
- -
- -
- -
-
- <% - html = "" - %> - <% - for feed in feeds: - html += """\n

%s - - - -

\n
""" % \ - (feed["feed_id"], feed["site_link"], feed["feed_title"], \ - feed["feed_link"], feed["feed_image"]) - - # The main page display only 10 articles by feeds. - for article in mongo.get_articles(feed["feed_id"], limit=10): - 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 - article_content = utils.clear_string(article["article_content"]) - if article_content: - description = " ".join(article_content.split(' ')[:55]) - else: - description = "No description." - # Title of the article - article_title = article["article_title"] - if len(article_title) >= 80: - article_title = article_title[:80] + " ..." - - # 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_title, not_read_end, description) + like + "
\n" - html += "
\n" - - # some options for the current feed - html += """All articles   """ % (feed["feed_id"],) - html += """Feed summary   """ % (feed["feed_id"],) - html += """

\n""" % (feed["feed_id"],) - if mongo.nb_unread_articles(feed["feed_id"]) != 0: - html += """  Mark all as read""" - html += """     %s unread article(s)""" % (feed["feed_id"], mongo.nb_unread_articles(feed["feed_id"])) - if feed["mail"] == False: - html += """
\nEnable email notifications""" % (feed["feed_id"],) - else: - html += """
\nDisable email notifications""" % (feed["feed_id"],) - html += """

Top

\n""" - %> - ${html} diff --git a/source/static/templates/languages.html b/source/static/templates/languages.html deleted file mode 100644 index d186677d..00000000 --- a/source/static/templates/languages.html +++ /dev/null @@ -1,25 +0,0 @@ -## languages.html -<%inherit file="base.html"/> -
-

Summary

-
    - %for language in articles_sorted_by_languages.keys(): -
  • ${language}: ${sum(map(len, articles_sorted_by_languages[language].values()))} articles
  • - %endfor -
- %for language in articles_sorted_by_languages.keys(): -
-

${language}

- %for feed_id in articles_sorted_by_languages[language]: - <% - feed = mongo.get_feed(feed_id) - %> -

${feed["feed_title"]}

- %for article in articles_sorted_by_languages[language][feed_id][:10]: - ${article["article_date"].strftime('%Y-%m-%d %H:%M')} - ${article["article_title"]} -
- %endfor -
- %endfor -
- %endfor \ No newline at end of file diff --git a/source/static/templates/management.html b/source/static/templates/management.html deleted file mode 100644 index f6c68ace..00000000 --- a/source/static/templates/management.html +++ /dev/null @@ -1,84 +0,0 @@ -## management.html -<%inherit file="base.html"/> -
-

Subscriptions

-

Add a new subscription (current subscriptions):

-
- - -
- - %if feeds: -

Unsubscribe from a source (deletes corresponding articles):

-
- - -
- %endif - - %if not mail_notification_enabled: -

E-mail notification is disabled in the configuration file.

- %endif - - %if feeds: -
-

Facts

- - %endif - -
- -

Account

-

-

- -
-
-
- -
-

- -
- - -

Database

-

${nb_articles} article(s) are stored in the database with ${nb_unread_articles} unread article(s). - -

- -
-
- -
- -
-
- (${nb_indexed_documents} indexed documents) -
- - -
- -

Export articles

-

-

- - -
-

diff --git a/source/static/templates/notifications.html b/source/static/templates/notifications.html deleted file mode 100644 index 88558b05..00000000 --- a/source/static/templates/notifications.html +++ /dev/null @@ -1,18 +0,0 @@ -## article.html -<%inherit file="base.html"/> -
- %if feeds != []: -

You are receiving e-mails for the following feeds:

- - %else: -

No active notifications.

- %endif -

Notifications are sent to: ${mail_to}. - %if not mail_notification_enabled: - However e-mail notification is disabled in the configuration file. - %endif -

diff --git a/source/static/templates/search.html b/source/static/templates/search.html deleted file mode 100644 index 435ef443..00000000 --- a/source/static/templates/search.html +++ /dev/null @@ -1,57 +0,0 @@ -## search.html -<%inherit file="base.html"/> -<% -import utils -%> -
-%if len(search_result) != 0: -

Articles containing the string ${query} (${sum([len(articles) for articles in search_result.values()])} results)

-%else: -

String ${query} not found.

-%endif -
-
- -
- -<% - html = "" - feed_id = None -%> - -%for feed_id in search_result.keys(): - <% - new_feed_section = True - feed = mongo.get_feed(feed_id) - for article in search_result[feed["feed_id"]]: - if new_feed_section is True: - new_feed_section = False - html += """

%s

\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 - article_content = utils.clear_string(article["article_content"]) - 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 - -${html} \ No newline at end of file diff --git a/source/static/templates/statistics.html b/source/static/templates/statistics.html deleted file mode 100644 index 5dfcbfa8..00000000 --- a/source/static/templates/statistics.html +++ /dev/null @@ -1,14 +0,0 @@ -## statistics.html -<%inherit file="base.html"/> -
- %if articles: -

Statistics

-

Tag cloud

-
- Minimum size of a word: - -
-
- ${tag_cloud} -
- %endif \ No newline at end of file diff --git a/source/static/templates/subscriptions.html b/source/static/templates/subscriptions.html deleted file mode 100644 index 8cee08ab..00000000 --- a/source/static/templates/subscriptions.html +++ /dev/null @@ -1,13 +0,0 @@ -## subscriptions.html -<%inherit file="base.html"/> -
-

Subscriptions

- %if feeds: - - %else: -

No subscriptions.

- %endif \ No newline at end of file diff --git a/source/static/templates/unread.html b/source/static/templates/unread.html deleted file mode 100644 index 93df53e7..00000000 --- a/source/static/templates/unread.html +++ /dev/null @@ -1,76 +0,0 @@ -## unread.html -<%inherit file="base.html"/> -<% -import utils -%> -
- <% - html = "" - if mongo.nb_unread_articles() != 0: - - # List unread articles of all the database - if feed_id == "": - html += "

Unread article(s)

" - html += """\n
\nMark all articles as read\n
\n""" - for feed in feeds: - new_feed_section = True - nb_unread = 0 - - # For all unread article of the current feed. - for article in mongo.get_articles(feed["feed_id"], condition=("article_readed", False)): - nb_unread += 1 - if new_feed_section is True: - new_feed_section = False - html += """

%s

\n""" % \ - (feed["feed_id"], feed["site_link"], feed["feed_title"], feed["feed_link"], feed["feed_image"]) - - # descrition for the CSS ToolTips - article_content = utils.clear_string(article["article_content"]) - 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["article_date"].strftime('%Y-%m-%d %H:%M') + " - " + \ - """%s%s
\n""" % \ - (feed["feed_id"], article["article_id"], article["article_title"][:150], description) - - if nb_unread == mongo.nb_unread_articles(feed["feed_id"]): - html += """
\nMark all as read\n""" % \ - (feed["feed_id"],) - html += """
\nMark articles as read\n""" - - - # List unread articles of a feed - else: - try: - feed = mongo.get_feed(feed_id) - except: - return "

This feed do not exists.

" - html += """

Unread article(s) of the feed %s

-
""" % (feed_id, feed["feed_title"]) - - # For all unread article of the feed. - for article in mongo.get_articles(feed_id, condition=("article_readed", False)): - # descrition for the CSS ToolTips - article_content = utils.clear_string(article["article_content"]) - 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["article_date"].strftime('%Y-%m-%d %H:%M') + " - " + \ - """%s%s
\n""" % \ - (feed_id, article["article_id"], article["article_title"][:150], description) - - html += """
\nMark all as read""" % (feed_id,) - # No unread article - else: - html += '

No unread article(s)

\n
\nWhy not check for news?' - html += """\n

All feeds

""" - %> - ${html} -- cgit