aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/crawler.py11
-rw-r--r--pyaggr3g470r/search.py148
-rw-r--r--pyaggr3g470r/templates/management.html3
-rw-r--r--pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mobin15737 -> 15539 bytes
-rw-r--r--pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po417
-rw-r--r--pyaggr3g470r/views/views.py23
6 files changed, 213 insertions, 389 deletions
diff --git a/pyaggr3g470r/crawler.py b/pyaggr3g470r/crawler.py
index 4733582f..e153c1ab 100644
--- a/pyaggr3g470r/crawler.py
+++ b/pyaggr3g470r/crawler.py
@@ -40,8 +40,6 @@ from pyaggr3g470r import utils
import conf
from bootstrap import db
from pyaggr3g470r.models import User, Article
-if not conf.ON_HEROKU:
- import pyaggr3g470r.search as fastsearch
logger = logging.getLogger(__name__)
@@ -227,15 +225,6 @@ def init_process(user, feed):
# Fetch the feed and insert new articles in the database
articles = yield from asyncio.async(insert_database(user, feed))
#print('inserted articles for {}'.format(feed.title))
-
- # Indexation of the new articles for the feed
- if not conf.ON_HEROKU and articles != []:
- try:
- #print('indexing articles for {}'.format(feed.title))
- fastsearch.add_to_index(user.id, articles, feed)
- except:
- logger.exception("Problem during indexation:")
-
return articles
def retrieve_feed(user, feed_id=None):
diff --git a/pyaggr3g470r/search.py b/pyaggr3g470r/search.py
deleted file mode 100644
index a7f780df..00000000
--- a/pyaggr3g470r/search.py
+++ /dev/null
@@ -1,148 +0,0 @@
-#! /usr/bin/env python
-#-*- coding: utf-8 -*-
-
-# pyAggr3g470r - A Web based news aggregator.
-# Copyright (C) 2010-2015 Cédric Bonhomme - https://www.cedricbonhomme.org
-#
-# For more information : https://bitbucket.org/cedricbonhomme/pyaggr3g470r/
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-__author__ = "Cedric Bonhomme"
-__version__ = "$Revision: 0.3 $"
-__date__ = "$Date: 2013/06/24 $"
-__revision__ = "$Date: 2013/11/10 $"
-__copyright__ = "Copyright (c) Cedric Bonhomme"
-__license__ = "AGPLv3"
-
-import os
-import logging
-
-from whoosh.index import create_in, open_dir
-from whoosh.index import EmptyIndexError
-from whoosh.fields import *
-from whoosh.query import *
-from whoosh.qparser import QueryParser
-from whoosh.writing import AsyncWriter
-from collections import defaultdict
-
-from pyaggr3g470r.models import User
-from pyaggr3g470r.decorators import async
-from pyaggr3g470r import utils
-
-logger = logging.getLogger(__name__)
-
-indexdir = "./pyaggr3g470r/var/indexdir"
-
-schema = Schema(title=TEXT,
- content=TEXT,
- article_id=NUMERIC(int, stored=True),
- feed_id=NUMERIC(int, stored=True),
- user_id=NUMERIC(int, stored=True))
-
-@async
-def create_index(user_id):
- """
- Creates the index.
- """
- user = User.query.filter(User.id == user_id).first()
- logger.info("Starting indexation of the database.")
- if not os.path.exists(indexdir):
- os.makedirs(indexdir)
- ix = create_in(indexdir, schema)
- writer = ix.writer()
- for feed in user.feeds:
- logger.info("Indexing " + feed.title)
- for article in feed.articles:
- writer.add_document(title=article.title,
- content=utils.clear_string(article.content),
- article_id=article.id,
- feed_id=feed.id,
- user_id=user.id)
- writer.commit()
- logger.info("Indexation done.")
-
-def add_to_index(user_id, articles, feed):
- """
- Add a list of articles to the index.
- Here an AsyncWriter is used because the function will
- be called in multiple threads by the feedgetter module.
- """
- try:
- ix = open_dir(indexdir)
- except (EmptyIndexError, OSError):
- if not os.path.exists(indexdir):
- os.makedirs(indexdir)
- ix = create_in(indexdir, schema)
- writer = AsyncWriter(ix)
- for article in articles:
- writer.add_document(title=article.title,
- content=utils.clear_string(article.content),
- article_id=article.id,
- feed_id=feed.id,
- user_id=user_id)
- writer.commit()
-
-
-def delete_article(user_id, feed_id, article_id):
- """
- Delete an article from the index.
- """
- try:
- ix = open_dir(indexdir)
- except (EmptyIndexError, OSError):
- return
- writer = ix.writer()
- document = And([Term("user_id", user_id), Term("feed_id", feed_id),
- Term("article_id", article_id)])
- writer.delete_by_query(document)
- writer.commit()
-
-
-def search(user_id, term):
- """
- Search for `term` in the index.
- Returns a list of articles.
- """
- result_dict = defaultdict(list)
- try:
- ix = open_dir(indexdir)
- except (EmptyIndexError, OSError):
- raise EmptyIndexError
- with ix.searcher() as searcher:
- query = QueryParser("content", ix.schema).parse(term)
- user_doc = Term("user_id", user_id)
- results = searcher.search(query, filter=user_doc, limit=None)
- for article in results:
- result_dict[article["feed_id"]].append(article["article_id"])
- return result_dict, len(results)
-
-
-def nb_documents():
- """
- Return the number of undeleted documents.
- """
- try:
- ix = open_dir(indexdir)
- except (EmptyIndexError, OSError):
- raise EmptyIndexError
- return ix.doc_count()
-
-if __name__ == "__main__":
- # Point of entry in execution mode.
- #create_index()
- print(nb_documents())
- results = search("Nothomb")
- for article in results:
- print(article)
diff --git a/pyaggr3g470r/templates/management.html b/pyaggr3g470r/templates/management.html
index 45496a20..72259551 100644
--- a/pyaggr3g470r/templates/management.html
+++ b/pyaggr3g470r/templates/management.html
@@ -5,9 +5,6 @@
<h1>{{ _('Your subscriptions') }}</h1>
<p>{{ _('You are subscribed to') }} {{ nb_feeds }} <a href="/feeds">{{ _('feeds') }}</a>. {{ _('Add a') }} <a href="{{ url_for("feed.form") }}">{{ _('feed') }}</a>.</p>
<p>{{ nb_articles }} {{ _('articles are stored in the database with') }} {{ nb_unread_articles }} {{ _('unread articles') }}.</p>
- {% if not on_heroku %}
- <a href="/index_database" class="btn btn-default">{{ _('Index database') }}</a>
- {% endif %}
<a href="/expire_articles?weeks=10" class="btn btn-default" onclick="return confirm('{{ _('You are going to delete old articles.') }}');">{{ _('Delete articles older than 10 weeks') }}</a>
</div>
<div class="well">
diff --git a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo
index 24ab38f5..69d9d98c 100644
--- a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo
+++ b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po
index 7621cec5..5d3bfcb1 100644
--- a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po
+++ b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po
@@ -7,9 +7,9 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-04-14 08:03+0200\n"
-"PO-Revision-Date: 2015-04-14 08:04+0100\n"
-"Last-Translator: Cedric Bonhomme <cedric.bonhomme@list.lu>\n"
+"POT-Creation-Date: 2015-04-22 08:30+0200\n"
+"PO-Revision-Date: 2015-04-22 08:32+0100\n"
+"Last-Translator: Cédric Bonhomme <cedric@cedricbonhomme.org>\n"
"Language-Team: fr <LL@li.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
@@ -19,58 +19,47 @@ msgstr ""
"Generated-By: Babel 1.3\n"
"X-Generator: Poedit 1.5.4\n"
-#: pyaggr3g470r/forms.py:43
-#: pyaggr3g470r/forms.py:95
-#: pyaggr3g470r/forms.py:118
+#: pyaggr3g470r/forms.py:43 pyaggr3g470r/forms.py:95 pyaggr3g470r/forms.py:118
#: pyaggr3g470r/templates/admin/dashboard.html:12
msgid "Nickname"
msgstr "Pseudonyme"
-#: pyaggr3g470r/forms.py:44
-#: pyaggr3g470r/forms.py:96
-#: pyaggr3g470r/forms.py:119
+#: pyaggr3g470r/forms.py:44 pyaggr3g470r/forms.py:96 pyaggr3g470r/forms.py:119
msgid "Please enter your nickname."
msgstr "S'il vous plaît, entrez votre pseudonyme."
-#: pyaggr3g470r/forms.py:45
-#: pyaggr3g470r/forms.py:97
-#: pyaggr3g470r/forms.py:120
-#: pyaggr3g470r/forms.py:167
-#: pyaggr3g470r/templates/admin/dashboard.html:13
+#: pyaggr3g470r/forms.py:45 pyaggr3g470r/forms.py:97 pyaggr3g470r/forms.py:120
+#: pyaggr3g470r/forms.py:167 pyaggr3g470r/templates/admin/dashboard.html:13
msgid "Email"
msgstr "Email"
-#: pyaggr3g470r/forms.py:48
-#: pyaggr3g470r/forms.py:68
-#: pyaggr3g470r/forms.py:170
+#: pyaggr3g470r/forms.py:48 pyaggr3g470r/forms.py:68 pyaggr3g470r/forms.py:170
msgid "Please enter your email address."
msgstr "S'il vous plaît, entrez votre adresse email."
-#: pyaggr3g470r/forms.py:49
-#: pyaggr3g470r/forms.py:69
-#: pyaggr3g470r/forms.py:100
+#: pyaggr3g470r/forms.py:49 pyaggr3g470r/forms.py:69 pyaggr3g470r/forms.py:100
#: pyaggr3g470r/forms.py:123
msgid "Password"
msgstr "Mot de passe"
-#: pyaggr3g470r/forms.py:50
-#: pyaggr3g470r/forms.py:70
+#: pyaggr3g470r/forms.py:50 pyaggr3g470r/forms.py:70
msgid "Please enter a password."
msgstr "S'il vous plaît entrer un mot de passe."
-#: pyaggr3g470r/forms.py:53
-#: pyaggr3g470r/templates/login.html:26
+#: pyaggr3g470r/forms.py:53 pyaggr3g470r/templates/login.html:26
msgid "Sign up"
msgstr "S'inscrire"
-#: pyaggr3g470r/forms.py:58
-#: pyaggr3g470r/forms.py:109
+#: pyaggr3g470r/forms.py:58 pyaggr3g470r/forms.py:109
#: pyaggr3g470r/forms.py:138
-msgid "This nickname has invalid characters. Please use letters, numbers, dots and underscores only."
-msgstr "Ce pseudonyme a des caractères non valides. Utilisez seulement des lettres, des chiffres, des points et '_'."
+msgid ""
+"This nickname has invalid characters. Please use letters, numbers, dots and "
+"underscores only."
+msgstr ""
+"Ce pseudonyme a des caractères non valides. Utilisez seulement des lettres, "
+"des chiffres, des points et '_'."
-#: pyaggr3g470r/forms.py:72
-#: pyaggr3g470r/templates/login.html:5
+#: pyaggr3g470r/forms.py:72 pyaggr3g470r/templates/login.html:5
msgid "Log In"
msgstr "Connexion"
@@ -82,18 +71,15 @@ msgstr "Compte non confirmé"
msgid "Invalid email or password"
msgstr "E-mail ou mot de passe invalide"
-#: pyaggr3g470r/forms.py:99
-#: pyaggr3g470r/forms.py:122
+#: pyaggr3g470r/forms.py:99 pyaggr3g470r/forms.py:122
msgid "Please enter your email."
msgstr "S'il vous plaît, entrez votre email."
-#: pyaggr3g470r/forms.py:101
-#: pyaggr3g470r/forms.py:125
+#: pyaggr3g470r/forms.py:101 pyaggr3g470r/forms.py:125
msgid "Feeds refresh frequency (in minutes)"
msgstr "Fréquence de rafraîchissement du flux (en minutes)"
-#: pyaggr3g470r/forms.py:104
-#: pyaggr3g470r/forms.py:128
+#: pyaggr3g470r/forms.py:104 pyaggr3g470r/forms.py:128
#: pyaggr3g470r/forms.py:150
msgid "Save"
msgstr "Sauver"
@@ -106,18 +92,16 @@ msgstr "Confirmation du mot de passe"
msgid "Passwords aren't the same."
msgstr "Les mots de passe ne sont pas identiques."
-#: pyaggr3g470r/forms.py:146
-#: pyaggr3g470r/templates/feeds.html:11
+#: pyaggr3g470r/forms.py:146 pyaggr3g470r/templates/feeds.html:11
+#: pyaggr3g470r/templates/layout.html:109
msgid "Title"
msgstr "Titre"
-#: pyaggr3g470r/forms.py:147
-#: pyaggr3g470r/templates/admin/user.html:27
+#: pyaggr3g470r/forms.py:147 pyaggr3g470r/templates/admin/user.html:27
msgid "Feed link"
msgstr "Lien du flux"
-#: pyaggr3g470r/forms.py:148
-#: pyaggr3g470r/templates/admin/user.html:28
+#: pyaggr3g470r/forms.py:148 pyaggr3g470r/templates/admin/user.html:28
msgid "Site link"
msgstr "Lien du site"
@@ -157,14 +141,18 @@ msgstr "Compte non confirmé."
msgid "Invalid email."
msgstr "Email invalide."
-#: pyaggr3g470r/templates/about.html:5
-#: pyaggr3g470r/templates/layout.html:114
+#: pyaggr3g470r/templates/about.html:5 pyaggr3g470r/templates/layout.html:88
+#: pyaggr3g470r/templates/layout.html:121
msgid "About"
msgstr "À propos"
#: pyaggr3g470r/templates/about.html:7
-msgid "pyAggr3g470r is a news aggregator platform and can be shared between several users."
-msgstr "pyAggr3g470r est un agrégateur de nouvelles et peut être partagé entre plusieurs utilisateurs."
+msgid ""
+"pyAggr3g470r is a news aggregator platform and can be shared between several "
+"users."
+msgstr ""
+"pyAggr3g470r est un agrégateur de nouvelles et peut être partagé entre "
+"plusieurs utilisateurs."
#: pyaggr3g470r/templates/about.html:8
msgid "You can easily install pyAggr3g470r on your server."
@@ -172,43 +160,74 @@ msgstr "Vous pouvez facilement installer pyAggr3g470r sur votre serveur."
#: pyaggr3g470r/templates/about.html:9
msgid "Alternatively, you can deploy your own copy using this button:"
-msgstr "Alternativement, vous pouvez déployer votre propre copie en utilisant ce bouton:"
+msgstr ""
+"Alternativement, vous pouvez déployer votre propre copie en utilisant ce "
+"bouton:"
#: pyaggr3g470r/templates/about.html:11
msgid ""
"This software is under AGPLv3 license. You are welcome to copy, modify or\n"
-" redistribute the <a href=\"https://bitbucket.org/cedricbonhomme/pyaggr3g470r\">source code</a>\n"
-" according to the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">Affero GPL</a> license."
-msgstr "Ce logiciel est sous licence AGPLv3. Vous êtes invité à copier, modifier ou redistribuer le <a href=\"https://bitbucket.org/cedricbonhomme/pyaggr3g470r\">code source</a> selon la licence <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">Affero GPL</a>."
+" redistribute the <a href=\"https://bitbucket.org/cedricbonhomme/"
+"pyaggr3g470r\">source code</a>\n"
+" according to the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html"
+"\">Affero GPL</a> license."
+msgstr ""
+"Ce logiciel est sous licence AGPLv3. Vous êtes invité à copier, modifier ou "
+"redistribuer le <a href=\"https://bitbucket.org/cedricbonhomme/pyaggr3g470r"
+"\">code source</a> selon la licence <a href=\"https://www.gnu.org/licenses/"
+"agpl-3.0.html\">Affero GPL</a>."
#: pyaggr3g470r/templates/about.html:14
-msgid "Found a bug? Report it <a href=\"https://bitbucket.org/cedricbonhomme/pyaggr3g470r/issues\">here</a>."
-msgstr "Vous avez trouvé un bug? Signalez-le <a href=\"https://bitbucket.org/cedricbonhomme/pyaggr3g470r/issues\">ici</a>."
+msgid ""
+"Found a bug? Report it <a href=\"https://bitbucket.org/cedricbonhomme/"
+"pyaggr3g470r/issues\">here</a>."
+msgstr ""
+"Vous avez trouvé un bug? Signalez-le <a href=\"https://bitbucket.org/"
+"cedricbonhomme/pyaggr3g470r/issues\">ici</a>."
#: pyaggr3g470r/templates/about.html:17
msgid "Help"
msgstr "Aide"
#: pyaggr3g470r/templates/about.html:18
-msgid "If you have any problem, <a href=\"http://wiki.cedricbonhomme.org/contact\">contact</a> the administrator."
-msgstr "Si vous avez des problèmes, <a href=\"http://wiki.cedricbonhomme.org/contact\">contactez</a> l'administrateur."
+msgid ""
+"If you have any problem, <a href=\"http://wiki.cedricbonhomme.org/contact"
+"\">contact</a> the administrator."
+msgstr ""
+"Si vous avez des problèmes, <a href=\"http://wiki.cedricbonhomme.org/contact"
+"\">contactez</a> l'administrateur."
#: pyaggr3g470r/templates/about.html:19
-msgid "The documentation of the RESTful API is <a href=\"https://pyaggr3g470r.readthedocs.org/en/latest/web-services.html\">here</a>."
-msgstr "La documentation de l'API RESTful est <a href=\"https://pyaggr3g470r.readthedocs.org/en/latest/web-services.html\">ici</a>."
+msgid ""
+"The documentation of the RESTful API is <a href=\"https://pyaggr3g470r."
+"readthedocs.org/en/latest/web-services.html\">here</a>."
+msgstr ""
+"La documentation de l'API RESTful est <a href=\"https://pyaggr3g470r."
+"readthedocs.org/en/latest/web-services.html\">ici</a>."
#: pyaggr3g470r/templates/about.html:20
#, python-format
-msgid "You can subscribe to new feeds with a bookmarklet. Drag <a href=\"%(bookmarklet)s\">this link</a> to your browser bookmarks."
-msgstr "Vous pouvez vous abonner à de nouveaux flux avec un bookmarklet. Faites glisser <a href=\"%(bookmarklet)s\">ce lien</a> dans vos favoris."
+msgid ""
+"You can subscribe to new feeds with a bookmarklet. Drag <a href="
+"\"%(bookmarklet)s\">this link</a> to your browser bookmarks."
+msgstr ""
+"Vous pouvez vous abonner à de nouveaux flux avec un bookmarklet. Faites "
+"glisser <a href=\"%(bookmarklet)s\">ce lien</a> dans vos favoris."
#: pyaggr3g470r/templates/about.html:23
msgid "Donation"
msgstr "Don"
#: pyaggr3g470r/templates/about.html:24
-msgid "If you wish and if you like pyAggr3g470r, you can donate via bitcoin <a href=\"https://blockexplorer.com/address/1GVmhR9fbBeEh7rP1qNq76jWArDdDQ3otZ\">1GVmhR9fbBeEh7rP1qNq76jWArDdDQ3otZ</a>. Thank you!"
-msgstr "Si vous le souhaitez et si vous aimez pyAggr3g470r, vous pouvez faire un don via bitcoin <a href=\"https://blockexplorer.com/address/1GVmhR9fbBeEh7rP1qNq76jWArDdDQ3otZ\">1GVmhR9fbBeEh7rP1qNq76jWArDdDQ3otZ</a>. Merci!"
+msgid ""
+"If you wish and if you like pyAggr3g470r, you can donate via bitcoin <a href="
+"\"https://blockexplorer.com/address/1GVmhR9fbBeEh7rP1qNq76jWArDdDQ3otZ"
+"\">1GVmhR9fbBeEh7rP1qNq76jWArDdDQ3otZ</a>. Thank you!"
+msgstr ""
+"Si vous le souhaitez et si vous aimez pyAggr3g470r, vous pouvez faire un don "
+"via bitcoin <a href=\"https://blockexplorer.com/"
+"address/1GVmhR9fbBeEh7rP1qNq76jWArDdDQ3otZ"
+"\">1GVmhR9fbBeEh7rP1qNq76jWArDdDQ3otZ</a>. Merci!"
#: pyaggr3g470r/templates/article.html:10
msgid "from"
@@ -221,23 +240,19 @@ msgstr "de"
msgid "Delete this article"
msgstr "Supprimer cet article"
-#: pyaggr3g470r/templates/article.html:13
-#: pyaggr3g470r/templates/home.html:87
+#: pyaggr3g470r/templates/article.html:13 pyaggr3g470r/templates/home.html:87
msgid "One of your favorites"
msgstr "Un de vos favoris"
-#: pyaggr3g470r/templates/article.html:15
-#: pyaggr3g470r/templates/home.html:89
+#: pyaggr3g470r/templates/article.html:15 pyaggr3g470r/templates/home.html:89
msgid "Click if you like this article"
msgstr "Cliquez si vous aimez cet article"
-#: pyaggr3g470r/templates/article.html:18
-#: pyaggr3g470r/templates/home.html:92
+#: pyaggr3g470r/templates/article.html:18 pyaggr3g470r/templates/home.html:92
msgid "Mark this article as unread"
msgstr "Marquer cet article comme non lu"
-#: pyaggr3g470r/templates/article.html:20
-#: pyaggr3g470r/templates/home.html:94
+#: pyaggr3g470r/templates/article.html:20 pyaggr3g470r/templates/home.html:94
msgid "Mark this article as read"
msgstr "Marquer cet article comme lu"
@@ -267,26 +282,20 @@ msgstr "Supprimer tout dans cette colonne"
msgid "No duplicates in the feed"
msgstr "Pas de doublon dans ce flux"
-#: pyaggr3g470r/templates/feed.html:7
-#: pyaggr3g470r/templates/feeds.html:35
-#: pyaggr3g470r/templates/home.html:30
-#: pyaggr3g470r/templates/home.html:48
+#: pyaggr3g470r/templates/feed.html:7 pyaggr3g470r/templates/feeds.html:35
+#: pyaggr3g470r/templates/home.html:30 pyaggr3g470r/templates/home.html:48
#: pyaggr3g470r/templates/admin/user.html:44
msgid "Delete this feed"
msgstr "Supprimer ce flux"
-#: pyaggr3g470r/templates/feed.html:7
-#: pyaggr3g470r/templates/feeds.html:35
-#: pyaggr3g470r/templates/home.html:30
-#: pyaggr3g470r/templates/home.html:48
+#: pyaggr3g470r/templates/feed.html:7 pyaggr3g470r/templates/feeds.html:35
+#: pyaggr3g470r/templates/home.html:30 pyaggr3g470r/templates/home.html:48
#: pyaggr3g470r/templates/admin/user.html:44
msgid "You are going to delete this feed."
msgstr "Vous allez supprimer ce flux."
-#: pyaggr3g470r/templates/feed.html:8
-#: pyaggr3g470r/templates/feeds.html:33
-#: pyaggr3g470r/templates/home.html:29
-#: pyaggr3g470r/templates/home.html:47
+#: pyaggr3g470r/templates/feed.html:8 pyaggr3g470r/templates/feeds.html:33
+#: pyaggr3g470r/templates/home.html:29 pyaggr3g470r/templates/home.html:47
#: pyaggr3g470r/templates/admin/user.html:43
msgid "Edit this feed"
msgstr "Éditer ce flux"
@@ -312,17 +321,29 @@ msgid "Last download:"
msgstr "Dernier téléchargement:"
#: pyaggr3g470r/templates/feed.html:25
-msgid "That feed has encountered too much consecutive errors and won't be retrieved anymore."
-msgstr "Ce flux a rencontré trop d'erreurs consécutives et ne sera plus récupéré."
+msgid ""
+"That feed has encountered too much consecutive errors and won't be retrieved "
+"anymore."
+msgstr ""
+"Ce flux a rencontré trop d'erreurs consécutives et ne sera plus récupéré."
#: pyaggr3g470r/templates/feed.html:26
#, python-format
-msgid "You can click <a href='%(reset_error_url)s'>here</a> to reset the error count and reactivate the feed."
-msgstr "Vous pouvez cliquer <a href='%(reset_error_url)s'>ici</a> pour réinitialiser le nombre d'erreurs et réactiver le flux."
+msgid ""
+"You can click <a href='%(reset_error_url)s'>here</a> to reset the error "
+"count and reactivate the feed."
+msgstr ""
+"Vous pouvez cliquer <a href='%(reset_error_url)s'>ici</a> pour réinitialiser "
+"le nombre d'erreurs et réactiver le flux."
#: pyaggr3g470r/templates/feed.html:28
-msgid "The download of this feed has encountered some problems. However its error counter will be reinitialized at the next successful retrieving."
-msgstr "Le téléchargement de ce flux a rencontré quelques problèmes. Cependant, son compteur d'erreurs sera réinitialisé lors de la prochaine récupération réussie."
+msgid ""
+"The download of this feed has encountered some problems. However its error "
+"counter will be reinitialized at the next successful retrieving."
+msgstr ""
+"Le téléchargement de ce flux a rencontré quelques problèmes. Cependant, son "
+"compteur d'erreurs sera réinitialisé lors de la prochaine récupération "
+"réussie."
#: pyaggr3g470r/templates/feed.html:32
msgid "Here's the last error encountered while retrieving this feed:"
@@ -376,10 +397,8 @@ msgstr "Statut"
msgid "Site"
msgstr "Site"
-#: pyaggr3g470r/templates/feeds.html:13
-#: pyaggr3g470r/templates/feeds.html:32
-#: pyaggr3g470r/templates/home.html:28
-#: pyaggr3g470r/templates/home.html:46
+#: pyaggr3g470r/templates/feeds.html:13 pyaggr3g470r/templates/feeds.html:32
+#: pyaggr3g470r/templates/home.html:28 pyaggr3g470r/templates/home.html:46
msgid "Articles"
msgstr "Articles"
@@ -401,8 +420,7 @@ msgstr "Flux désactivé"
msgid "Duplicate articles"
msgstr "Articles doublon"
-#: pyaggr3g470r/templates/history.html:4
-#: pyaggr3g470r/templates/layout.html:77
+#: pyaggr3g470r/templates/history.html:4 pyaggr3g470r/templates/layout.html:77
msgid "History"
msgstr "Historique"
@@ -419,7 +437,7 @@ msgid "Add some"
msgstr "Ajoutez en"
#: pyaggr3g470r/templates/home.html:6
-#: pyaggr3g470r/templates/management.html:16
+#: pyaggr3g470r/templates/management.html:13
msgid "or"
msgstr "ou"
@@ -431,28 +449,23 @@ msgstr "téléchargez un fichier OPML."
msgid "All feeds"
msgstr "Tous les flux"
-#: pyaggr3g470r/templates/home.html:20
-#: pyaggr3g470r/templates/home.html:38
+#: pyaggr3g470r/templates/home.html:20 pyaggr3g470r/templates/home.html:38
msgid "error"
msgstr "erreur"
-#: pyaggr3g470r/templates/home.html:27
-#: pyaggr3g470r/templates/home.html:45
+#: pyaggr3g470r/templates/home.html:27 pyaggr3g470r/templates/home.html:45
msgid "Details"
msgstr "Détails"
-#: pyaggr3g470r/templates/home.html:31
-#: pyaggr3g470r/templates/home.html:49
+#: pyaggr3g470r/templates/home.html:31 pyaggr3g470r/templates/home.html:49
msgid "Mark this feed as read"
msgstr "Marquer ce flux comme lu"
-#: pyaggr3g470r/templates/home.html:32
-#: pyaggr3g470r/templates/home.html:50
+#: pyaggr3g470r/templates/home.html:32 pyaggr3g470r/templates/home.html:50
msgid "Mark this feed as unread"
msgstr "Marquer ce flux comme non lu"
-#: pyaggr3g470r/templates/home.html:58
-#: pyaggr3g470r/templates/home.html:66
+#: pyaggr3g470r/templates/home.html:58 pyaggr3g470r/templates/home.html:66
#: pyaggr3g470r/templates/layout.html:78
msgid "All"
msgstr "Tout"
@@ -465,14 +478,12 @@ msgstr "Lus"
msgid "Unread"
msgstr "Non lus"
-#: pyaggr3g470r/templates/home.html:76
-#: pyaggr3g470r/templates/layout.html:72
+#: pyaggr3g470r/templates/home.html:76 pyaggr3g470r/templates/layout.html:72
#: pyaggr3g470r/templates/admin/user.html:42
msgid "Feed"
msgstr "Flux"
-#: pyaggr3g470r/templates/home.html:77
-#: pyaggr3g470r/views/views.py:374
+#: pyaggr3g470r/templates/home.html:77 pyaggr3g470r/views/views.py:400
msgid "Article"
msgstr "Article"
@@ -492,8 +503,7 @@ msgstr "jours"
msgid "No inactive feeds."
msgstr "Aucun flux inactifs."
-#: pyaggr3g470r/templates/layout.html:36
-#: pyaggr3g470r/templates/layout.html:39
+#: pyaggr3g470r/templates/layout.html:36 pyaggr3g470r/templates/layout.html:39
#: pyaggr3g470r/views/feed.py:182
msgid "Add a feed"
msgstr "Ajouter un flux"
@@ -502,8 +512,7 @@ msgstr "Ajouter un flux"
msgid "Home"
msgstr "Accueil"
-#: pyaggr3g470r/templates/layout.html:66
-#: pyaggr3g470r/views/views.py:244
+#: pyaggr3g470r/templates/layout.html:66 pyaggr3g470r/views/views.py:302
msgid "Favorites"
msgstr "Favoris"
@@ -528,16 +537,23 @@ msgstr "Profil"
msgid "Your data"
msgstr "Vos données"
-#: pyaggr3g470r/templates/layout.html:90
+#: pyaggr3g470r/templates/layout.html:91
msgid "Dashboard"
msgstr "Tableau de bord"
-#: pyaggr3g470r/templates/layout.html:93
+#: pyaggr3g470r/templates/layout.html:94
msgid "Logout"
msgstr "Déconnexion"
-#: pyaggr3g470r/templates/login.html:10
-#: pyaggr3g470r/templates/recover.html:12
+#: pyaggr3g470r/templates/layout.html:112
+msgid "Content"
+msgstr "Contenu"
+
+#: pyaggr3g470r/templates/layout.html:114
+msgid "Search"
+msgstr "Recherche"
+
+#: pyaggr3g470r/templates/login.html:10 pyaggr3g470r/templates/recover.html:12
msgid "Your email"
msgstr "Votre email"
@@ -561,43 +577,39 @@ msgstr "articles sont stockés dans la base avec"
msgid "unread articles"
msgstr "articles non lus"
-#: pyaggr3g470r/templates/management.html:9
-msgid "Index database"
-msgstr "Indexer la base de données"
-
-#: pyaggr3g470r/templates/management.html:11
+#: pyaggr3g470r/templates/management.html:8
msgid "You are going to delete old articles."
msgstr "Vous allez supprimer les anciens articles."
-#: pyaggr3g470r/templates/management.html:11
+#: pyaggr3g470r/templates/management.html:8
msgid "Delete articles older than 10 weeks"
msgstr "Supprimer les articles de plus de 10 semaines"
-#: pyaggr3g470r/templates/management.html:14
+#: pyaggr3g470r/templates/management.html:11
msgid "OPML import/export"
msgstr "Import/export OPML"
-#: pyaggr3g470r/templates/management.html:16
+#: pyaggr3g470r/templates/management.html:13
msgid "Batch import feeds from OPML"
msgstr "Import en lot via un fichier OPML"
-#: pyaggr3g470r/templates/management.html:20
+#: pyaggr3g470r/templates/management.html:17
msgid "Export feeds to OPML"
msgstr "Exporter les flux au format OPML"
-#: pyaggr3g470r/templates/management.html:21
+#: pyaggr3g470r/templates/management.html:18
msgid "Data liberation"
msgstr "Libération des données"
-#: pyaggr3g470r/templates/management.html:23
+#: pyaggr3g470r/templates/management.html:20
msgid "Import account"
msgstr "Importer un compte"
-#: pyaggr3g470r/templates/management.html:27
+#: pyaggr3g470r/templates/management.html:24
msgid "Export account to JSON"
msgstr "Exporter le compte au format JSON"
-#: pyaggr3g470r/templates/management.html:30
+#: pyaggr3g470r/templates/management.html:27
msgid "Export articles"
msgstr "Exporter les articles"
@@ -661,7 +673,7 @@ msgid "You are going to delete this account."
msgstr "Vous allez supprimer ce compte."
#: pyaggr3g470r/templates/admin/dashboard.html:45
-#: pyaggr3g470r/views/views.py:727
+#: pyaggr3g470r/views/views.py:707
msgid "Add a new user"
msgstr "Ajouter un nouvel utilisateur"
@@ -694,8 +706,7 @@ msgstr "Nombre d'articles"
msgid "Feed %(feed_title)s successfully deleted."
msgstr "Flux %(feed_title)s supprimé avec succès."
-#: pyaggr3g470r/views/feed.py:80
-#: pyaggr3g470r/views/feed.py:151
+#: pyaggr3g470r/views/feed.py:80 pyaggr3g470r/views/feed.py:151
#, python-format
msgid "Feed %(feed_title)r successfully updated."
msgstr "Flux %(feed_title)r mis à jour avec succès."
@@ -704,8 +715,7 @@ msgstr "Flux %(feed_title)r mis à jour avec succès."
msgid "Couldn't add feed: url missing."
msgstr "Impossible d'ajouter le flux: URL manquante."
-#: pyaggr3g470r/views/feed.py:96
-#: pyaggr3g470r/views/feed.py:140
+#: pyaggr3g470r/views/feed.py:96 pyaggr3g470r/views/feed.py:140
msgid "Couldn't add feed: feed already exists."
msgstr "Impossible d'ajouter le flux: le flux existe déjà."
@@ -713,8 +723,7 @@ msgstr "Impossible d'ajouter le flux: le flux existe déjà."
msgid "Feed was successfully created."
msgstr "Flux créé avec succès."
-#: pyaggr3g470r/views/feed.py:110
-#: pyaggr3g470r/views/feed.py:124
+#: pyaggr3g470r/views/feed.py:110 pyaggr3g470r/views/feed.py:124
msgid "Feed successfully updated."
msgstr "Flux mis à jour avec succès."
@@ -723,184 +732,184 @@ msgstr "Flux mis à jour avec succès."
msgid "Feed %(feed_title)r successfully created."
msgstr "Flux %(feed_title)r créé avec succès."
-#: pyaggr3g470r/views/feed.py:167
+#: pyaggr3g470r/views/feed.py:168
msgid "Downloading articles for the new feed..."
msgstr "Téléchargement des articles du nouveau flux..."
-#: pyaggr3g470r/views/feed.py:177
+#: pyaggr3g470r/views/feed.py:178
msgid "Edit the feed"
msgstr "Éditez ce flux"
-#: pyaggr3g470r/views/views.py:105
+#: pyaggr3g470r/views/views.py:103
msgid "Authentication required."
msgstr "Authentification requise."
-#: pyaggr3g470r/views/views.py:110
+#: pyaggr3g470r/views/views.py:108
msgid "Forbidden."
msgstr "Interdit."
-#: pyaggr3g470r/views/views.py:174
+#: pyaggr3g470r/views/views.py:172
msgid "Logged in successfully."
msgstr "Connecté avec succès."
-#: pyaggr3g470r/views/views.py:197
+#: pyaggr3g470r/views/views.py:195
msgid "Logged out successfully."
msgstr "Déconnecté avec succès."
-#: pyaggr3g470r/views/views.py:206
+#: pyaggr3g470r/views/views.py:204
msgid "Self-registration is disabled."
msgstr "L'auto-enregistrement est désactivé."
-#: pyaggr3g470r/views/views.py:223
+#: pyaggr3g470r/views/views.py:221
msgid "Email already used."
msgstr "Email déjà utilisé."
-#: pyaggr3g470r/views/views.py:230
-#: pyaggr3g470r/views/views.py:778
+#: pyaggr3g470r/views/views.py:228 pyaggr3g470r/views/views.py:758
msgid "Problem while sending activation email"
msgstr "Problème lors de l'envoi d'email d'activation"
-#: pyaggr3g470r/views/views.py:233
+#: pyaggr3g470r/views/views.py:231
msgid "Your account has been created. Check your mail to confirm it."
msgstr "Votre compte a été créé. Vérifiez votre courrier pour le confirmer."
-#: pyaggr3g470r/views/views.py:308
-#: pyaggr3g470r/views/views.py:525
+#: pyaggr3g470r/views/views.py:310
+msgid "No text to search were provided."
+msgstr "Aucun texte à chercher a été soumis."
+
+#: pyaggr3g470r/views/views.py:322
+msgid "Search:"
+msgstr "Recherche:"
+
+#: pyaggr3g470r/views/views.py:338 pyaggr3g470r/views/views.py:504
msgid "Downloading articles..."
msgstr "Téléchargement des articles."
-#: pyaggr3g470r/views/views.py:310
-msgid "The manual retrieving of news is only available for administrator, on the Heroku platform."
-msgstr "La récupération manuelle de nouvelles est disponible uniquement pour l'administrateur, sur la plate-forme Heroku."
+#: pyaggr3g470r/views/views.py:340
+msgid ""
+"The manual retrieving of news is only available for administrator, on the "
+"Heroku platform."
+msgstr ""
+"La récupération manuelle de nouvelles est disponible uniquement pour "
+"l'administrateur, sur la plate-forme Heroku."
-#: pyaggr3g470r/views/views.py:374
+#: pyaggr3g470r/views/views.py:400
msgid "deleted."
msgstr "supprimé."
-#: pyaggr3g470r/views/views.py:377
+#: pyaggr3g470r/views/views.py:403
msgid "This article do not exist."
msgstr "Cet article n'existe pas."
-#: pyaggr3g470r/views/views.py:421
-msgid "Indexing database..."
-msgstr "Indexation la base de données..."
-
-#: pyaggr3g470r/views/views.py:423
-#: pyaggr3g470r/views/views.py:494
-msgid "An error occured"
-msgstr "Une erreur est survenue."
-
-#: pyaggr3g470r/views/views.py:426
-msgid "Option not available on Heroku."
-msgstr "Option non disponible sur Heroku."
-
-#: pyaggr3g470r/views/views.py:441
-#: pyaggr3g470r/views/views.py:452
+#: pyaggr3g470r/views/views.py:450 pyaggr3g470r/views/views.py:461
msgid "Error when exporting articles."
msgstr "Erreur lors de l'export des articles."
-#: pyaggr3g470r/views/views.py:458
+#: pyaggr3g470r/views/views.py:467
msgid "Export format not supported."
msgstr "Ce format d'export n'est pas supporté."
-#: pyaggr3g470r/views/views.py:482
-msgid "Full text search is not yet implemented for Heroku."
-msgstr "La recherche rapide n'est pas supporté sur Heroku."
-
-#: pyaggr3g470r/views/views.py:519
-#: pyaggr3g470r/views/views.py:532
-#: pyaggr3g470r/views/views.py:540
+#: pyaggr3g470r/views/views.py:496 pyaggr3g470r/views/views.py:512
+#: pyaggr3g470r/views/views.py:521
msgid "File not allowed."
msgstr "Fichier non autorisé."
-#: pyaggr3g470r/views/views.py:524
+#: pyaggr3g470r/views/views.py:502
msgid "feeds imported."
msgstr "flux importés."
-#: pyaggr3g470r/views/views.py:527
+#: pyaggr3g470r/views/views.py:506
msgid "Impossible to import the new feeds."
msgstr "Impossible d'importer les nouveaux flux."
-#: pyaggr3g470r/views/views.py:536
+#: pyaggr3g470r/views/views.py:516
msgid "Account imported."
msgstr "Compte importé."
-#: pyaggr3g470r/views/views.py:538
+#: pyaggr3g470r/views/views.py:518
msgid "Impossible to import the account."
msgstr "Impossible d'importer le compte."
-#: pyaggr3g470r/views/views.py:578
-#: pyaggr3g470r/views/views.py:705
-#: pyaggr3g470r/views/views.py:715
-#: pyaggr3g470r/views/views.py:755
+#: pyaggr3g470r/views/views.py:558 pyaggr3g470r/views/views.py:685
+#: pyaggr3g470r/views/views.py:695 pyaggr3g470r/views/views.py:735
msgid "User"
msgstr "Utilisateur"
-#: pyaggr3g470r/views/views.py:579
-#: pyaggr3g470r/views/views.py:705
+#: pyaggr3g470r/views/views.py:559 pyaggr3g470r/views/views.py:685
msgid "successfully updated."
msgstr "mis à jour avec succès."
-#: pyaggr3g470r/views/views.py:599
+#: pyaggr3g470r/views/views.py:579
msgid "Your account has been deleted."
msgstr "Votre compte a été supprimé."
-#: pyaggr3g470r/views/views.py:601
-#: pyaggr3g470r/views/views.py:741
-#: pyaggr3g470r/views/views.py:757
-#: pyaggr3g470r/views/views.py:785
+#: pyaggr3g470r/views/views.py:581 pyaggr3g470r/views/views.py:721
+#: pyaggr3g470r/views/views.py:737 pyaggr3g470r/views/views.py:765
msgid "This user does not exist."
msgstr "Cet utilisateur n'existe pas."
-#: pyaggr3g470r/views/views.py:615
+#: pyaggr3g470r/views/views.py:595
msgid "Articles deleted."
msgstr "Articles supprimés."
-#: pyaggr3g470r/views/views.py:629
+#: pyaggr3g470r/views/views.py:609
msgid "Your account has been confirmed."
msgstr "Votre compte a été confirmé."
-#: pyaggr3g470r/views/views.py:631
+#: pyaggr3g470r/views/views.py:611
msgid "Impossible to confirm this account."
msgstr "Impossible de confirmer ce compte."
-#: pyaggr3g470r/views/views.py:653
+#: pyaggr3g470r/views/views.py:633
msgid "New password sent to your address."
msgstr "Nouveau mot de passe envoyé à votre adresse."
-#: pyaggr3g470r/views/views.py:655
+#: pyaggr3g470r/views/views.py:635
msgid "Problem while sending your new password."
msgstr "Problème lors de l'envoi de votre nouveau mot de passe."
-#: pyaggr3g470r/views/views.py:680
+#: pyaggr3g470r/views/views.py:660
msgid "Problem while sending email"
msgstr "Problème lors de l'envoi de l'email"
-#: pyaggr3g470r/views/views.py:715
+#: pyaggr3g470r/views/views.py:695
msgid "successfully created."
msgstr "créé avec succès."
-#: pyaggr3g470r/views/views.py:724
+#: pyaggr3g470r/views/views.py:704
msgid "Edit the user"
msgstr "Éditer cet utilisateur"
-#: pyaggr3g470r/views/views.py:755
+#: pyaggr3g470r/views/views.py:735
msgid "successfully deleted."
msgstr "supprimé avec succès."
-#: pyaggr3g470r/views/views.py:776
-#: pyaggr3g470r/views/views.py:782
+#: pyaggr3g470r/views/views.py:756 pyaggr3g470r/views/views.py:762
msgid "Account of the user"
msgstr "Compte de l'utilisateur"
-#: pyaggr3g470r/views/views.py:776
+#: pyaggr3g470r/views/views.py:756
msgid "successfully activated."
msgstr "activé avec succès."
-#: pyaggr3g470r/views/views.py:782
+#: pyaggr3g470r/views/views.py:762
msgid "successfully disabled."
msgstr "désactivé avec succès."
+#~ msgid "Index database"
+#~ msgstr "Indexer la base de données"
+
+#~ msgid "Indexing database..."
+#~ msgstr "Indexation la base de données..."
+
+#~ msgid "An error occured"
+#~ msgstr "Une erreur est survenue."
+
+#~ msgid "Option not available on Heroku."
+#~ msgstr "Option non disponible sur Heroku."
+
+#~ msgid "Full text search is not yet implemented for Heroku."
+#~ msgstr "La recherche rapide n'est pas supporté sur Heroku."
+
#~ msgid "No favorites"
#~ msgstr "Aucun favori"
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py
index 3429e6bb..9f4ef0b7 100644
--- a/pyaggr3g470r/views/views.py
+++ b/pyaggr3g470r/views/views.py
@@ -54,8 +54,6 @@ from pyaggr3g470r.forms import SignupForm, SigninForm, \
AddFeedForm, InformationMessageForm
from pyaggr3g470r.controllers import UserController, FeedController, \
ArticleController
-if not conf.ON_HEROKU:
- import pyaggr3g470r.search as fastsearch
Principal(app)
@@ -399,10 +397,6 @@ def delete(article_id=None):
if article is not None and article.source.subscriber.id == g.user.id:
db.session.delete(article)
db.session.commit()
- try:
- fastsearch.delete_article(g.user.id, article.feed_id, article.id)
- except:
- pass
flash(gettext('Article') + ' ' + article.title + ' ' + gettext('deleted.'), 'success')
return redirect(redirect_url())
else:
@@ -441,23 +435,6 @@ def duplicates(feed_id=None):
duplicates = utils.compare_documents(feed)
return render_template('duplicates.html', duplicates=duplicates, feed=feed)
-@app.route('/index_database', methods=['GET'])
-@login_required
-def index_database():
- """
- Index all the database.
- """
- if not conf.ON_HEROKU:
- try:
- fastsearch.create_index(g.user.id)
- flash(gettext('Indexing database...'), 'success')
- except Exception as e:
- flash(gettext('An error occured') + ' (%s).' % e, 'danger')
- return redirect(url_for('home'))
- else:
- flash(gettext('Option not available on Heroku.'), 'success')
- return redirect(url_for('home'))
-
@app.route('/export', methods=['GET'])
@login_required
def export_articles():
bgstack15