The main documentation for this application is organized into a couple sections:
* :ref:`user-docs`
+* :ref:`dev-docs`
.. _user-docs:
.. toctree::
:maxdepth: 2
- :caption: User Documentation
+ :caption: User documentation
user/create_account
user/login
user/import
user/download_articles
user/filters
- user/tags
\ No newline at end of file
+ user/tags
+
+.. _dev-docs:
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Developer documentation
+
+ developer/docker
\ No newline at end of file
The main purpose of wallabag is to save web articles. You have many ways to do it.
+.. note::
+
+ A quickstart will be displayed in the application until you save your first article.
+
By using a bookmarklet
----------------------
*/
public function showUnreadAction(Request $request, $page)
{
+ // load the quickstart if no entry in database
+ if ($page == 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUsername($this->getUser()->getId()) == 0) {
+ return $this->redirect($this->generateUrl('quickstart'));
+ }
+
return $this->showEntries('unread', $request, $page);
}
*/
private function showEntries($type, Request $request, $page)
{
- $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry');
+ $repository = $this->get('wallabag_core.entry_repository');
switch ($type) {
case 'starred':
array()
);
}
+
+ /**
+ * @Route("/quickstart", name="quickstart")
+ */
+ public function quickstartAction()
+ {
+ return $this->render(
+ 'WallabagCoreBundle:Static:quickstart.html.twig',
+ array()
+ );
+ }
}
$this->addReference('bob-config', $bobConfig);
+ $emptyConfig = new Config($this->getReference('empty-user'));
+ $emptyConfig->setTheme('material');
+ $emptyConfig->setItemsPerPage(10);
+ $emptyConfig->setLanguage('en');
+
+ $manager->persist($emptyConfig);
+
+ $this->addReference('empty-config', $emptyConfig);
+
$manager->flush();
}
/**
* Fetch an entry with a tag. Only used for tests.
*
+ * @param int $userId
+ *
* @return Entry
*/
public function findOneWithTags($userId)
return false;
}
+
+ /**
+ * Count all entries for a user.
+ *
+ * @param int $userId
+ *
+ * @return integer
+ */
+ public function countAllEntriesByUsername($userId)
+ {
+ $qb = $this->createQueryBuilder('e')
+ ->select('count(e)')
+ ->where('e.user=:userId')->setParameter('userId', $userId)
+ ;
+
+ return $qb->getQuery()->getSingleScalarResult();
+ }
}
# Entries
'estimated reading time': 'durée de lecture'
-original: original
+original: "original"
Toggle mark as read: 'Marquer comme lu/non lu'
Toggle favorite: 'Marquer comme favori'
Delete: 'Supprimer'
via Flattr: "via Flattr"
# Howto
-Form: Formulaire
+Form: "Formulaire"
Thanks to this form: "Grâce à ce formulaire"
Browser addons: "Extensions de navigateur"
Mobile apps: "Applications smartphone"
"This importer will import all your Pocket data. Pocket doesn't allow us to retrieve content from their service, so the readable content of each article will be re-fetched by wallabag.": "Cet outil va importer toutes vos données de Pocket. Pocket ne nous autorise pas à récupérer le contenu depuis leur service, donc wallabag doit reparcourir chaque article pour récupérer son contenu."
"This importer will import all your wallabag v1 articles. On your config page, click on \"JSON export\" in the \"Export your wallabag data\" section. You will have a \"wallabag-export-1-xxxx-xx-xx.json\" file.": "Cet outil va importer toutes vos données de wallabag v1. Sur votre page de configuration de wallabag v1, cliquez sur \"Export JSON\" dans la section \"Exporter vos données de wallabag\". Vous allez récupérer un fichier \"wallabag-export-1-xxxx-xx-xx.json\"."
"You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.": "Vous pouvez importer vos données depuis votre compte Pocket. Vous n'avez qu'à cliquer sur le bouton ci-dessous et à autoriser wallabag à se connecter à getpocket.com."
-Connect to Pocket and import data: Se connecter à Pocket et importer les données.
-Please select your wallabag export and click on the below button to upload and import it.: Choisissez le fichier de votre export wallabag v1 et cliquez sur le bouton ci-dessous pour l'importer.
-File: Fichier
-Upload file: Importer le fichier
-Import contents: "Importer les contenus"
\ No newline at end of file
+Connect to Pocket and import data: "Se connecter à Pocket et importer les données."
+Please select your wallabag export and click on the below button to upload and import it.: "Choisissez le fichier de votre export wallabag v1 et cliquez sur le bouton ci-dessous pour l'importer."
+File: "Fichier"
+Upload file: "Importer le fichier"
+Import contents: "Importer les contenus"
+
+# Quickstart
+Welcome on wallabag!: "Bienvenue sur wallabag !"
+We'll accompany you to visit wallabag and show you some features which can interess you.: "Nous allons vous accompagner pour vous faire faire le tour de la maison et vous présenter quelques fonctionnalités qui pourraient vous intéresser pour vous approprier cet outil."
+Follow us!: "Suivez-nous !"
+Configure the application: "Configurez l'application"
+Change language and design: "Changez la langue et le design de l'application"
+Enable RSS feeds: "Activez les flux RSS"
+First steps: "Premiers pas"
+Save your first article: "Ajoutez votre premier article"
+And classify it!: "Et rangez-le !"
+Migrate from an existing service: "Migrer depuis un service existant"
+You're using an other service? We'll help you to retrieve your data on wallabag.: "Vous êtes un ancien utilisateur d'un service existant ? Nous allons vous aider à récupérer vos données sur wallabag."
+Migrate from Pocket: "Migrer depuis Pocket"
+Migrate from wallabag v1: "Migrer depuis wallabag v1"
+Full documentation: "Documentation complète"
+Convert your articles into ePUB or PDF: "Convertissez vos articles en ePub ou en PDF"
+See how you can look for an article by using search engine and filters: "Apprenez à utiliser le moteur de recherche et les filtres pour retrouver l'article qui vous intéresse"
+And so many other articles!: "Et encore plein d'autres choses !"
+Support: "Support"
+If you need some help, we are here for you.: "Parce que vous avez peut-être besoin de nous poser une question, nous sommes disponibles pour vous."
+On GitHub: "Sur GitHub"
+By email: "Par email"
+On Gitter: "Sur Gitter"
\ No newline at end of file
--- /dev/null
+{% extends "WallabagCoreBundle::layout.html.twig" %}
+
+{% block title %}{% trans %}Quickstart{% endtrans %}{% endblock %}
+
+{% block content %}
+
+ <h2>{% trans %}Welcome on wallabag!{% endtrans %}</h2>
+ <p>{% trans %}We'll accompany you to visit wallabag and show you some features which can interess you.{% endtrans %}</p>
+ <p>{% trans %}Follow us!{% endtrans %}</p>
+ <h4>{% trans %}Configure the application{% endtrans %}</h4>
+ <ul>
+ <li><a href="{{ path('config') }}">{% trans %}Change language and design{% endtrans %}</a></li>
+ <li><a href="{{ path('config') }}#set2">{% trans %}Enable RSS feeds{% endtrans %}</a></li>
+ </ul>
+ <h3>{% trans %}First steps{% endtrans %}</h3>
+ <ul>
+ <li><a href="{{ path('new') }}">{% trans %}Save your first article{% endtrans %}</a></li>
+ <li><a href="{{ path('unread') }}">{% trans %}And classify it!{% endtrans %}</a></li>
+ </ul>
+ <h3>{% trans %}Migrate from an existing service{% endtrans %}</h3>
+ <p>{% trans %}You're using an other service? We'll help you to retrieve your data on wallabag.{% endtrans %}</p>
+ <ul>
+ <li><a href="{{ path('import_pocket') }}">{% trans %}Migrate from Pocket{% endtrans %}</a></li>
+ <li><a href="{{ path('import_wallabag_v1') }}">{% trans %}Migrate from wallabag v1{% endtrans %}</a></li>
+ </ul>
+ <h3>{% trans %}Full documentation{% endtrans %}</h3>
+ <ul>
+ <li><a href="http://wallabag.readthedocs.org">{% trans %}Convert your articles into ePUB or PDF{% endtrans %}</a></li>
+ <li><a href="http://wallabag.readthedocs.org">{% trans %}See how you can look for an article by using search engine and filters{% endtrans %}</a></li>
+ <li><a href="http://wallabag.readthedocs.org">{% trans %}And so many other articles!{% endtrans %}</a></li>
+ </ul>
+ <h3>{% trans %}Support{% endtrans %}</h3>
+ <p>{% trans %}If you need some help, we are here for you.{% endtrans %}</p>
+ <ul>
+ <li><a href="https://github.com/wallabag/wallabag/issues/">{% trans %}On GitHub{% endtrans %}</a></li>
+ <li><a href="mailto:hello@wallabag.org">{% trans %}By email{% endtrans %}</a></li>
+ <li><a href="https://gitter.im/wallabag/wallabag">{% trans %}On Gitter{% endtrans %}</a></li>
+ </ul>
+
+{% endblock %}
<span class="black-text">{{ form_errors(form.url) }}</span>
{% endif %}
- {{ form_widget(form.url, { 'attr': {'autocomplete': 'off'} }) }}
+ {{ form_widget(form.url, { 'attr': {'autocomplete': 'off', 'placeholder': 'http://website'} }) }}
<div class="hidden">{{ form_rest(form) }}</div>
</form>
--- /dev/null
+{% extends "WallabagCoreBundle::layout.html.twig" %}
+
+{% block title %}{% trans %}Quickstart{% endtrans %}{% endblock %}
+
+{% block content %}
+
+ <div class="row">
+ <div class="col s12">
+ <div class="card-panel settings">
+
+ <div class="row">
+ <h3>{% trans %}Welcome on wallabag!{% endtrans %}</h3>
+ <p>{% trans %}We'll accompany you to visit wallabag and show you some features which can interess you.{% endtrans %}</p>
+ <p>{% trans %}Follow us!{% endtrans %}</p>
+ <h4>{% trans %}Configure the application{% endtrans %}</h4>
+ <ul>
+ <li><a href="{{ path('config') }}">{% trans %}Change language and design{% endtrans %}</a></li>
+ <li><a href="{{ path('config') }}#set2">{% trans %}Enable RSS feeds{% endtrans %}</a></li>
+ </ul>
+ <h4>{% trans %}First steps{% endtrans %}</h4>
+ <ul>
+ <li><a href="{{ path('new') }}">{% trans %}Save your first article{% endtrans %}</a></li>
+ <li><a href="{{ path('unread') }}">{% trans %}And classify it!{% endtrans %}</a></li>
+ </ul>
+ <h4>{% trans %}Migrate from an existing service{% endtrans %}</h4>
+ <p>{% trans %}You're using an other service? We'll help you to retrieve your data on wallabag.{% endtrans %}</p>
+ <ul>
+ <li><a href="{{ path('import_pocket') }}">{% trans %}Migrate from Pocket{% endtrans %}</a></li>
+ <li><a href="{{ path('import_wallabag_v1') }}">{% trans %}Migrate from wallabag v1{% endtrans %}</a></li>
+ </ul>
+ <h4>{% trans %}Full documentation{% endtrans %}</h4>
+ <ul>
+ <li><a href="http://wallabag.readthedocs.org">{% trans %}Convert your articles into ePUB or PDF{% endtrans %}</a></li>
+ <li><a href="http://wallabag.readthedocs.org">{% trans %}See how you can look for an article by using search engine and filters{% endtrans %}</a></li>
+ <li><a href="http://wallabag.readthedocs.org">{% trans %}And so many other articles!{% endtrans %}</a></li>
+ </ul>
+ <h4>{% trans %}Support{% endtrans %}</h4>
+ <p>{% trans %}If you need some help, we are here for you.{% endtrans %}</p>
+ <ul>
+ <li><a href="https://github.com/wallabag/wallabag/issues/">{% trans %}On GitHub{% endtrans %}</a></li>
+ <li><a href="mailto:hello@wallabag.org">{% trans %}By email{% endtrans %}</a></li>
+ <li><a href="https://gitter.im/wallabag/wallabag">{% trans %}On Gitter{% endtrans %}</a></li>
+ </ul>
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+{% endblock %}
$this->assertContains('login', $client->getResponse()->headers->get('location'));
}
+ public function testQuickstart()
+ {
+ $this->logInAs('empty');
+ $client = $this->getClient();
+
+ $client->request('GET', '/unread/list');
+ $client->followRedirect();
+
+ $this->assertEquals(200, $client->getResponse()->getStatusCode());
+ $this->assertContains('We\'ll accompany you to visit wallabag', $client->getResponse()->getContent());
+
+ // Test if quickstart is disabled when user has 1 entry
+ $crawler = $client->request('GET', '/new');
+
+ $this->assertEquals(200, $client->getResponse()->getStatusCode());
+
+ $form = $crawler->filter('button[type=submit]')->form();
+
+ $data = array(
+ 'entry[url]' => 'https://www.wallabag.org/blog/2016/01/08/wallabag-alpha1-v2',
+ );
+
+ $client->submit($form, $data);
+ $this->assertEquals(302, $client->getResponse()->getStatusCode());
+ $client->followRedirect();
+
+ $client->request('GET', '/unread/list');
+ $this->assertContains('There is one entry.', $client->getResponse()->getContent());
+ }
+
public function testGetNew()
{
$this->logInAs('admin');
$this->assertCount(4, $crawler->filter('div[class=entry]'));
// Good URL
- $crawler = $client->request('GET', '/bookmarklet', array('url' => $this->url));
+ $client->request('GET', '/bookmarklet', array('url' => $this->url));
$this->assertEquals(302, $client->getResponse()->getStatusCode());
- $crawler = $client->followRedirect();
+ $client->followRedirect();
$crawler = $client->request('GET', '/');
$this->assertCount(5, $crawler->filter('div[class=entry]'));
$this->assertEquals(302, $client->getResponse()->getStatusCode());
- $crawler = $client->followRedirect();
+ $client->followRedirect();
$em = $client->getContainer()
->get('doctrine.orm.entity_manager');
$parameters = '?entry_filter%5BreadingTime%5D%5Bleft_number%5D=&entry_filter%5BreadingTime%5D%5Bright_number%5D=';
- $crawler = $client->request('GET', 'unread/list'.$parameters);
+ $client->request('GET', 'unread/list'.$parameters);
$this->assertContains($parameters, $client->getResponse()->getContent());
$this->addReference('bob-user', $bobUser);
+ $emptyUser = new User();
+ $emptyUser->setName('Empty');
+ $emptyUser->setEmail('empty@wallabag.org');
+ $emptyUser->setUsername('empty');
+ $emptyUser->setPlainPassword('mypassword');
+ $emptyUser->setEnabled(true);
+
+ $manager->persist($emptyUser);
+
+ $this->addReference('empty-user', $emptyUser);
+
$manager->flush();
}