- 5.5
- 5.6
- 7.0
+ - 7.1
- nightly
- - hhvm
node_js:
- "5"
matrix:
fast_finish: true
include:
+ # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
+ - php: hhvm-3.12
+ sudo: required
+ dist: trusty
+ group: edge
+ env: DB=mysql
+ addons:
+ apt:
+ packages:
+ - mysql-server-5.6
+ - mysql-client-core-5.6
+ - mysql-client-5.6
+ services:
+ - mysql
+ - php: hhvm-3.12
+ sudo: required
+ dist: trusty
+ group: edge
+ env: DB=sqlite
- php: 7.0
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite ASSETS=nobuild
- php: 7.0
env: DB=sqlite ASSETS=build
- exclude:
- - php: hhvm
- env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
allow_failures:
- - php: hhvm
+ - php: hhvm-3.12
+ - php: nightly
# exclude v1 branches
branches:
- legacy
before_script:
- - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
- - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
- - if [ "$TRAVIS_PHP_VERSION" = "5.5" ]; then composer require "phpunit/phpunit:4.*" --no-update; fi;
+ - PHP=$TRAVIS_PHP_VERSION
+ - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
+ # xdebug isn't enable for PHP 7.1
+ - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
+ - if [[ $PHP = 5.5 ]]; then composer require "phpunit/phpunit:4.*" --no-update; fi;
- composer self-update --no-progress
- if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
--- /dev/null
+# see https://zappr.opensource.zalan.do/
+autobranch: false
+commit: false
+approvals:
+ minimum: 1
+ ignore: pr_opener
+ pattern: "^(:\\+1:|👍)$"
+ veto:
+ pattern: "^(:\\-1:|👎)$"
+ from:
+ orgs:
+ - wallabag
+ collaborators: true
+specification:
+ title:
+ minimum-length:
+ enabled: true
+ length: 8
+ body:
+ minimum-length:
+ enabled: true
+ length: 8
+ contains-url: false
+ contains-issue-number: false
+ template:
+ differs-from-body: true
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
+## [2.0.7] - 2016-08-22
+
+### Added
+
+- [#2222](https://github.com/wallabag/wallabag/pull/2222) Added creation date and reading time on article view (Nicolas Lœuillet)
+- [#2134](https://github.com/wallabag/wallabag/pull/2134) Run tests on an uptodate HHVM (Jeremy Benoist)
+
+### Changed
+
+- [#2221](https://github.com/wallabag/wallabag/pull/2221) Replaced favorite word/icon with star one (Nicolas Lœuillet)
+
+### Fixed
+
+- [#2224](https://github.com/wallabag/wallabag/pull/2224) Avoid breaking import when fetching fail (Jeremy Benoist)
+- [#2216](https://github.com/wallabag/wallabag/pull/2216), [#2220](https://github.com/wallabag/wallabag/pull/2220) Enable CORS headers for OAUTH part (Rurik19)
+- [#2095](https://github.com/wallabag/wallabag/pull/2095) Fix form user display when 2FA is disabled (Nicolas Lœuillet)
+
+## [2.0.6] - 2016-08-10
+
+### Changed
+
+- [#2199](https://github.com/wallabag/wallabag/pull/2199) Handling socials links into a config file (Simon Alberny)
+- [#2172](https://github.com/wallabag/wallabag/pull/2172) Change the way to login user in tests (Jeremy Benoist)
+- [#2155](https://github.com/wallabag/wallabag/pull/2155) Use friendsofphp instead of fabpot for PHP CS Fixer (Jeremy Benoist)
+
+### Fixed
+
+- [#2200](https://github.com/wallabag/wallabag/pull/2200) Fixed typo in entry:notice:entry_saved (charno6)
+- [#2185](https://github.com/wallabag/wallabag/pull/2185) Fix 3rd-Party Apps links (Chrome & Firefox) (Thomas Citharel)
+- [#2165](https://github.com/wallabag/wallabag/pull/2165) Fix a few french translations typos (Thomas Citharel)
+- [#2157](https://github.com/wallabag/wallabag/pull/2157) Handle only upper or only lower reading filter (Jeremy Benoist)
+- [#2156](https://github.com/wallabag/wallabag/pull/2156) Try to find bad redirection after delete (Jeremy Benoist)
+
## [2.0.5] - 2016-05-31
### Added
[![Build Status](https://api.travis-ci.org/wallabag/wallabag.svg?branch=master)](https://travis-ci.org/wallabag/wallabag)
-[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wallabag/wallabag/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wallabag/wallabag/?branch=v2)
+[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wallabag/wallabag/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wallabag/wallabag/?branch=master)
[![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/wallabag/wallabag)
# What is wallabag?
```
git clone https://github.com/wallabag/wallabag.git
cd wallabag
- git checkout 2.0.5
+ git checkout 2.0.7
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
php bin/console wallabag:install --env=prod
php bin/console server:run --env=prod
max-width: 61.25em; /* 980px */
}
-table,
-img {
+table, img, figure {
max-width: 100%;
height: auto;
}
max-width: 40em;
}
-#article img {
+#article img,
+#article figure {
max-width: 100%;
height: auto;
}
assets: ~
wallabag_core:
- version: 2.0.5
+ version: 2.0.7
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
languages:
en: 'English'
#origin_regex: false
paths:
'^/api/':
+ allow_origin: ['*']
+ allow_headers: ['X-Custom-Auth']
+ allow_methods: ['POST', 'PUT', 'PATCH','GET', 'DELETE']
+ max_age: 3600
+ '^/oauth/':
allow_origin: ['*']
allow_headers: ['X-Custom-Auth']
allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
git clone https://github.com/wallabag/wallabag.git
cd wallabag
- git checkout 2.0.5
+ git checkout 2.0.7
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
php bin/console wallabag:install --env=prod
Auf einem geteilten Webhosting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Wir stellen ein Paket inkl. aller Abhängigkeiten bereit.
+Wir stellen ein Paket inkl. aller Abhängigkeiten bereit.
Die Standardkonfiguration nutzt SQLite für die Datenbank. Wenn du diese Einstellung ändern willst, ändere bitte ``app/config/parameters.yml``.
Wir haben bereits einen Nutzer erstellt: Login und Passwort sind ``wallabag``.
git clone https://github.com/wallabag/wallabag.git
cd wallabag
- git checkout 2.0.5
+ git checkout 2.0.7
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
php bin/console wallabag:install --env=prod
git clone https://github.com/wallabag/wallabag.git
cd wallabag
- git checkout 2.0.5
+ git checkout 2.0.7
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
php bin/console wallabag:install --env=prod
}
/**
- * Changes favorite status for an entry.
+ * Changes starred status for an entry.
*
* @param Request $request
* @param Entry $entry
--- /dev/null
+<?php
+
+namespace Wallabag\CoreBundle\Controller;
+
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+
+class FooterController extends Controller
+{
+ /**
+ * Display the footer.
+ *
+ * @return \Symfony\Component\HttpFoundation\Response
+ */
+ public function indexAction()
+ {
+ $addonsUrl = $this->container->getParameter('addons_url');
+ $socialsUrl = $this->container->getParameter('socials_url');
+
+ return $this->render(
+ 'WallabagCoreBundle::footer.html.twig',
+ [
+ 'addonsUrl' => $addonsUrl,
+ 'socialsUrl' => $socialsUrl,
+ ]
+ );
+ }
+}
*/
public function howtoAction()
{
+ $addonsUrl = $this->container->getParameter('addons_url');
+
return $this->render(
'WallabagCoreBundle:Static:howto.html.twig',
- []
+ ['addonsUrl' => $addonsUrl]
);
}
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
+ $loader->load('parameters.yml');
}
public function getAlias()
private $separator;
/**
- * @param string $separator The separator used in the list.
+ * @param string $separator The separator used in the list
*/
public function __construct($separator = ',')
{
{
$this->themes = array_combine(
$themes,
- array_map(function ($s) { return ucwords(strtolower(str_replace('-', ' ', $s))); }, $themes)
+ array_map(function ($s) {
+ return ucwords(strtolower(str_replace('-', ' ', $s)));
+ }, $themes)
);
$this->languages = $languages;
/**
* Add tags from rules defined by the user.
*
- * @param Entry $entry Entry to tag.
+ * @param Entry $entry Entry to tag
*/
public function tag(Entry $entry)
{
*
* @param User $user
*
- * @return array<Entry> A list of modified entries.
+ * @return array<Entry> A list of modified entries
*/
public function tagAllForUser(User $user)
{
/**
* Fetch a tag.
*
- * @param string $label The tag's label.
+ * @param string $label The tag's label
*
* @return Tag
*/
--- /dev/null
+parameters:
+ addons_url:
+ firefox: https://addons.mozilla.org/firefox/addon/wallabag-v2/
+ chrome: https://chrome.google.com/webstore/detail/wallabagit/peehlcgckcnclnjlndmoddifcicdnabm
+ f_droid: https://f-droid.org/app/fr.gaulupeau.apps.InThePoche
+ google_play: https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche
+ ios: https://itunes.apple.com/app/wallabag/id828331015?mt=8
+ windows: https://www.microsoft.com/store/apps/wallabag/9nblggh11646
+ socials_url:
+ twitter: https://twitter.com/wallabagapp
+ google_plus: https://plus.google.com/+WallabagOrg/posts
+ facebook: https://facebook.com/Wallabag
reading_time_minutes: 'estimeret læsetid: %readingTime% min'
reading_time_less_one_minute: 'estimeret læsetid: <small class="inferieur"><</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'original'
toogle_as_read: 'Marker som læst'
toogle_as_star: 'Skift favoritstatus'
back_to_homepage: 'Tilbage'
set_as_read: 'Marker som læst'
# set_as_unread: 'Mark as unread'
- set_as_favorite: 'Marker som favorit'
+ set_as_starred: 'Marker som favorit'
view_original_article: 'Originalartikel'
# re_fetch_content: 'Re-fetch content'
delete: 'Slet'
edit_title: 'Rediger titel'
original_article: 'original'
# annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
+ created_at: 'Oprettelsesdato'
new:
page_title: 'Gem ny artikel'
placeholder: 'http://website.com'
reading_time_minutes: 'geschätzte Lesezeit: %readingTime% min'
reading_time_less_one_minute: 'geschätzte Lesezeit: <small class="inferieur"><</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'original'
toogle_as_read: 'Gelesen-Status ändern'
toogle_as_star: 'Favoriten-Status ändern'
back_to_homepage: 'Zurück'
set_as_read: 'Als gelesen markieren'
set_as_unread: 'Als ungelesen markieren'
- set_as_favorite: 'Favorisieren'
+ set_as_starred: 'Favorisieren'
view_original_article: 'Original-Artikel'
re_fetch_content: 'Inhalt neu laden'
delete: 'Löschen'
edit_title: 'Titel ändern'
original_article: 'original'
annotations_on_the_entry: '{0} Keine Anmerkungen|{1} Eine Anmerkung|]1,Inf[ %nbAnnotations% Anmerkungen'
+ created_at: 'Erstellungsdatum'
new:
page_title: 'Neuen Artikel speichern'
placeholder: 'https://website.de'
entry:
notice:
entry_already_saved: 'Eintrag bereits am %date% gespeichert'
- entry_saved: 'Eintag gespeichert'
+ entry_saved: 'Eintrag gespeichert'
# entry_saved_failed: 'Failed to save entry'
entry_updated: 'Eintrag aktualisiert'
entry_reloaded: 'Eintrag neugeladen'
reading_time_minutes: 'estimated reading time: %readingTime% min'
reading_time_less_one_minute: 'estimated reading time: <small class="inferieur"><</small> 1 min'
number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'original'
toogle_as_read: 'Toggle mark as read'
- toogle_as_star: 'Toggle favorite'
+ toogle_as_star: 'Toggle starred'
delete: 'Delete'
export_title: 'Export'
filters:
back_to_homepage: 'Back'
set_as_read: 'Mark as read'
set_as_unread: 'Mark as unread'
- set_as_favorite: 'Favorite'
+ set_as_starred: 'Toggle starred'
view_original_article: 'Original article'
re_fetch_content: 'Re-fetch content'
delete: 'Delete'
edit_title: 'Edit title'
original_article: 'original'
annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
+ created_at: 'Creation date'
new:
page_title: 'Save new entry'
placeholder: 'http://website.com'
reading_time_minutes: 'tiempo estimado de lectura: %readingTime% min'
reading_time_less_one_minute: 'tiempo estimado de lectura: <small class="inferieur"><</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'original'
toogle_as_read: 'Marcar como leído/ no leído'
toogle_as_star: 'Marcar como favorito/ no favorito'
back_to_homepage: 'Regrese a la página principal'
set_as_read: 'Marcar como leído'
set_as_unread: 'Marcar como no leído'
- set_as_favorite: 'Marcar como favorito'
+ set_as_starred: 'Marcar como favorito'
view_original_article: 'Artículo original'
re_fetch_content: 'Redescargar el contenido'
delete: 'Suprimir'
edit_title: 'Modificar el título'
original_article: 'original'
annotations_on_the_entry: '{0} Sin anotaciones|{1} Una anotación|]1,Inf[ %nbAnnotations% anotaciones'
+ created_at: 'Fecha de creación'
new:
page_title: 'Guardar un nuevo artículo'
placeholder: 'http://website.com'
reading_time_minutes: 'زمان تخمینی برای خواندن: %readingTime% min'
reading_time_less_one_minute: 'زمان تخمینی برای خواندن: <small class="inferieur"><</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'original'
toogle_as_read: 'خواندهشده/خواندهنشده'
toogle_as_star: 'برگزیده/نابرگزیده'
back_to_homepage: 'بازگشت'
set_as_read: 'خواندهشده'
set_as_unread: 'به عنوان خواندهنشده علامت بزن'
- set_as_favorite: 'برگزیده'
+ set_as_starred: 'برگزیده'
view_original_article: 'مقالهٔ اصلی'
re_fetch_content: 'مقالهها را دوباره دریافت کن'
delete: 'پاک کردن'
edit_title: 'ویرایش عنوان'
original_article: 'اصلی'
annotations_on_the_entry: '{0} بدون حاشیه|{1} یک حاشیه|]1,Inf[ %nbحاشیه% annotations'
+ created_at: 'زمان ساخت'
new:
page_title: 'ذخیرهٔ مقالهٔ تازه'
placeholder: 'http://website.com'
reading_time_minutes: 'durée de lecture: %readingTime% min'
reading_time_less_one_minute: 'durée de lecture: <small class="inferieur"><</small> 1 min'
number_of_tags: '{1}et un autre tag|]1,Inf[et %count% autres tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'original'
toogle_as_read: 'Marquer comme lu/non lu'
toogle_as_star: 'Marquer comme favori'
back_to_homepage: 'Retour'
set_as_read: 'Marquer comme lu'
set_as_unread: 'Marquer comme non lu'
- set_as_favorite: 'Mettre en favori'
+ set_as_starred: 'Mettre en favori'
view_original_article: 'Article original'
re_fetch_content: 'Recharger le contenu'
delete: 'Supprimer'
edit_title: 'Modifier le titre'
original_article: 'original'
annotations_on_the_entry: '{0} Aucune annotation|{1} Une annotation|]1,Inf[ %nbAnnotations% annotations'
+ created_at: 'Date de création'
new:
page_title: 'Sauvegarder un nouvel article'
placeholder: 'http://website.com'
reading_time_minutes: 'tempo di lettura stimato: %readingTime% min'
reading_time_less_one_minute: 'tempo di lettura stimato: <small class="inferieur"><</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'originale'
toogle_as_read: 'Segna come da leggere'
toogle_as_star: 'Segna come non preferito'
back_to_homepage: 'Indietro'
set_as_read: 'Segna come già letto'
set_as_unread: 'Segna come da leggere'
- set_as_favorite: 'Segna come preferito'
+ set_as_starred: 'Segna come preferito'
view_original_article: 'Contenuto originale'
re_fetch_content: 'Ri-ottieni pagina'
delete: 'Elimina'
edit_title: 'Modifica titolo'
original_article: 'originale'
annotations_on_the_entry: '{0} Nessuna annotazione|{1} Una annotazione|]1,Inf[ %nbAnnotations% annotazioni'
+ created_at: 'Data di creazione'
new:
page_title: 'Salva un nuovo contenuto'
placeholder: 'http://website.com'
reading_time_minutes: 'durada de lectura : %readingTime% min'
reading_time_less_one_minute: 'durada de lectura : <small class="inferieur"><</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'original'
toogle_as_read: 'Marcar coma legit/pas legit'
toogle_as_star: 'Marcar coma favorit'
back_to_homepage: 'Tornar'
set_as_read: 'Marcar coma legit'
set_as_unread: 'Marcar coma pas legit'
- set_as_favorite: 'Metre en favori'
+ set_as_starred: 'Metre en favori'
view_original_article: 'Article original'
re_fetch_content: 'Tornar cargar lo contengut'
delete: 'Suprimir'
edit_title: 'Modificar lo títol'
original_article: 'original'
annotations_on_the_entry: "{0} Pas cap d'anotacion|{1} Una anotacion|]1,Inf[ %nbAnnotations% anotacions"
+ created_at: 'Data de creacion'
new:
page_title: 'Enregistrar un novèl article'
placeholder: 'http://website.com'
reading_time_minutes: 'szacunkowy czas czytania: %readingTime% min'
reading_time_less_one_minute: 'szacunkowy czas czytania: <small class="inferieur"><</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'oryginał'
toogle_as_read: 'Oznacz jako przeczytane'
toogle_as_star: 'Oznacz jako ulubione'
back_to_homepage: 'Cofnij'
set_as_read: 'Oznacz jako przeczytane'
set_as_unread: 'Oznacz jako nieprzeczytane'
- set_as_favorite: 'Ulubione'
+ set_as_starred: 'Ulubione'
view_original_article: 'Oryginalny artykuł'
re_fetch_content: 'Pobierz ponownie treść'
delete: 'Usuń'
edit_title: 'Edytuj tytuł'
original_article: 'oryginalny'
annotations_on_the_entry: '{0} Nie ma adnotacji |{1} Jedna adnotacja |]1,Inf[ %nbAnnotations% adnotacji'
+ created_at: 'Czas stworzenia'
new:
page_title: 'Zapisz nowy wpis'
placeholder: 'http://website.com'
reading_time_minutes: 'timp estimat de citire: %readingTime% min'
reading_time_less_one_minute: 'timp estimat de citire: <small class="inferieur"><</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'original'
toogle_as_read: 'Comută marcat ca citit'
toogle_as_star: 'Comută marcat ca favorit'
back_to_homepage: 'Înapoi'
set_as_read: 'Marchează ca citit'
# set_as_unread: 'Mark as unread'
- set_as_favorite: 'Favorit'
+ set_as_starred: 'Favorit'
view_original_article: 'Articol original'
# re_fetch_content: 'Re-fetch content'
delete: 'Șterge'
edit_title: 'Editează titlul'
original_article: 'original'
# annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
+ created_at: 'Data creării'
new:
page_title: 'Salvează un nou articol'
placeholder: 'http://website.com'
reading_time_minutes: 'tahmini okuma süresi: %readingTime% min'
reading_time_less_one_minute: 'tahmini okuma süresi: <small class="inferieur"><</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
+ reading_time_minutes_short: '%readingTime% min'
+ reading_time_less_one_minute_short: '<small class="inferieur"><</small> 1 min'
original_article: 'orijinal'
toogle_as_read: 'Okundu/okunmadı olarak işaretle'
toogle_as_star: 'Favorilere ekle/çıkar'
back_to_homepage: 'Back'
set_as_read: 'Okundu olarak işaretle'
set_as_unread: 'Okunmadı olarak işaretle'
- set_as_favorite: 'Favorilere ekle/çıkar'
+ set_as_starred: 'Favorilere ekle/çıkar'
view_original_article: 'Orijinal makale'
re_fetch_content: 'İçeriği yenile'
delete: 'Sil'
edit_title: 'Başlığı düzenle'
original_article: 'orijinal'
# annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
+ created_at: 'Oluşturulma tarihi'
new:
page_title: 'Yeni makaleyi kaydet'
placeholder: 'http://website.com'
</fieldset>
{% endif %}
- {{ form_rest(form.user) }}
+ {{ form_widget(form.user._token) }}
+ {{ form_widget(form.user.save) }}
</form>
<h2>{{ 'config.tab_menu.password'|trans }}</h2>
</header>
<div id="article_toolbar">
- <ul class="links">
- <li class="topPosF"><a href="#top" title="{{ 'entry.view.left_menu.back_to_top'|trans }}" class="tool top icon icon-arrow-up-thick"><span>{{ 'entry.view.left_menu.set_as_read'|trans }}</span></a></li>
- <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.domainName|removeWww }}</span></a></li>
- <li><a title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" class="tool icon icon-reload" href="{{ path('reload_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span></a></li>
- <li><a title="{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}</span></a></li>
- <li><a title="{{ 'entry.view.left_menu.set_as_favorite'|trans }}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_favorite'|trans }}</span></a></li>
- <li><a id="nav-btn-add-tag" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li>
- <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li>
- {% if craue_setting('share_twitter') %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="Tweet"><span>Tweet</span></a></li>{% endif %}
- {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %}
- {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %}
- {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}¬es=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %}
- {% if craue_setting('carrot') %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="carrot"><span>Carrot</span></a></li>{% endif %}
- {% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.print'|trans }}</span></a></li>{% endif %}
- {% if craue_setting('export_epub') %}<li><a href="?epub&method=id&value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %}
- {% if craue_setting('export_mobi') %}<li><a href="?mobi&method=id&value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
- {% if craue_setting('export_pdf') %}<li><a href="?pdf&method=id&value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %}
- <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li>
- </ul>
- </div>
+ <ul class="links">
+ <li class="topPosF"><a href="#top" title="{{ 'entry.view.left_menu.back_to_top'|trans }}" class="tool top icon icon-arrow-up-thick"><span>{{ 'entry.view.left_menu.set_as_read'|trans }}</span></a></li>
+ <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.domainName|removeWww }}</span></a></li>
+ <li><a title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" class="tool icon icon-reload" href="{{ path('reload_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span></a></li>
+ <li><a title="{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}</span></a></li>
+ <li><a title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span></a></li>
+ <li><a id="nav-btn-add-tag" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li>
+ <li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li>
+ {% if craue_setting('share_twitter') %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="Tweet"><span>Tweet</span></a></li>{% endif %}
+ {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %}
+ {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %}
+ {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}¬es=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %}
+ {% if craue_setting('carrot') %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="carrot"><span>Carrot</span></a></li>{% endif %}
+ {% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.print'|trans }}</span></a></li>{% endif %}
+ {% if craue_setting('export_epub') %}<li><a href="?epub&method=id&value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %}
+ {% if craue_setting('export_mobi') %}<li><a href="?mobi&method=id&value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
+ {% if craue_setting('export_pdf') %}<li><a href="?pdf&method=id&value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %}
+ <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li>
+ </ul>
+ </div>
+ <div class="link mdi-action-today">
+ {{ 'entry.view.created_at'|trans }}: {{ entry.createdAt|date('Y-m-d') }}
+ </div>
+
+ <div class="link mdi-action-query-builder">
+ {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
+ {% if readingTime > 0 %}
+ {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round})|capitalize }}
+ {% else %}
+ {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
+ {% endif %}
+ </div>
+
{% set nbAnnotations = entry.annotations | length %}
<span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
<aside class="tags">
{{ entry.content | raw }}
</article>
</div>
+
<script id="annotationroutes" type="application/json">
{
"prefix": "",
"entryId": "{{ entry.id }}"
}
</script>
+ <script src="{{ asset('bundles/wallabagcore/themes/_global/js/restoreScroll.js')}}"></script>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $(window).scroll(function(e){
+ var scrollTop = $(window).scrollTop();
+ var docHeight = $(document).height();
+ var scrollPercent = (scrollTop) / (docHeight);
+ var scrollPercentRounded = Math.round(scrollPercent*100)/100;
+ savePercent({{ entry.id }}, scrollPercentRounded);
+ });
+
+ retrievePercent({{ entry.id }});
+
+ $(window).resize(function(){
+ retrievePercent({{ entry.id }});
+ });
+ });
+ </script>
{% endblock %}
</ul>
<h3>{{ 'howto.top_menu.browser_addons'|trans }}</h3>
<ul>
- <li><a href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
- <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
+ <li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
+ <li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
</ul>
<h3>{{ 'howto.top_menu.mobile_apps'|trans }}</h3>
<ul>
- <li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
- <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
- <li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
+ <li>Android: <a href="{{ addonsUrl.f_droid }}" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="{{ addonsUrl.google_play }}" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
+ <li>iOS: <a href="{{ addonsUrl.ios }}" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
+ <li>Windows Phone: <a href="{{ addonsUrl.windows }}" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
</ul>
<h3>{{ 'howto.top_menu.bookmarklet'|trans }}</h3>
<p>
{% endif %}
{{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
- {{ form_rest(form.user) }}
+ {{ form_widget(form.user._token) }}
</form>
</div>
<ul class="tools right">
<li>
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
- <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}favorite_border{% else %}favorite{% endif %}</i></a>
+ <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
<a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
</li>
</ul>
</a>
</li>
<li>
- <a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_favorite'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
- <i class="material-icons small">{% if entry.isStarred == 0 %}favorite_outline{% else %}favorite{% endif %}</i>
+ <a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
+ <i class="material-icons small">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i>
</a>
</li>
<li>
</li>
<li class="bold hide-on-med-and-down">
- <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.set_as_favorite'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
- <i class="material-icons spall">{% if entry.isStarred == 0 %}favorite_outline{% else %}favorite{% endif %}</i>
- <span>{{ 'entry.view.left_menu.set_as_favorite'|trans }}</span>
+ <a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
+ <i class="material-icons spall">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i>
+ <span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span>
</a>
<div class="collapsible-body"></div>
</li>
<h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
</header>
<aside>
+ {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
+ <span class="link mdi-action-query-builder">
+ {% if readingTime > 0 %}
+ {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
+ {% else %}
+ {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
+ {% endif %}
+ </span>
+ <span class="link mdi-action-today" title="{{ 'entry.view.created_at'|trans }}"> {{ entry.createdAt|date('Y-m-d') }}</span>
<a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">
<span class="link"><i class="material-icons link">link</i> {{ entry.domainName|removeWww }}</span></a>
<span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
<div class="col s12">
<h5>{{ 'howto.top_menu.browser_addons'|trans }}</h5>
<ul>
- <li><a href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
- <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
+ <li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
+ <li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
</ul>
</div>
<div class="col s12">
<h5>{{ 'howto.top_menu.mobile_apps'|trans }}</h5>
<ul>
- <li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
- <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
- <li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
+ <li>Android: <a href="{{ addonsUrl.f_droid }}" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="{{ addonsUrl.google_play }}" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
+ <li>iOS: <a href="{{ addonsUrl.ios }}" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
+ <li>Windows Phone: <a href="{{ addonsUrl.windows }}" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
</ul>
</div>
--- /dev/null
+<footer class="page-footer cyan darken-2">
+ <div class="container">
+ <div class="row">
+ <div class="col l6 s12">
+ <h5 class="white-text">{{ 'footer.wallabag.elsewhere'|trans }}</h5>
+ <p class="grey-text text-lighten-4">
+ <a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.google_play }}" title="Android">
+ <span class="icon-android"></span>
+ </a>
+ <a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.ios }}" title="iOS">
+ <span class="icon-apple"></span>
+ </a>
+ <a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.firefox }}" title="Firefox">
+ <span class="icon-firefox"></span>
+ </a>
+ <a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.chrome }}" title="Chrome">
+ <span class="icon-chrome"></span>
+ </a>
+ </p>
+ </div>
+ <div class="col l4 offset-l2 s12">
+ <h5 class="white-text">{{ 'footer.wallabag.social'|trans }}</h5>
+ <a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.twitter }}" title="Twitter">
+ <span class="icon-twitter"></span>
+ </a>
+ <a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.google_plus }}" title="Google+">
+ <span class="icon-google-plus2"></span>
+ </a>
+ <a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.facebook }}" title="Facebook">
+ <span class="icon-facebook2"></span>
+ </a>
+ </div>
+ </div>
+ </div>
+ <div class="footer-copyright">
+ <div class="container">
+ <p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
+ <a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a>
+ </div>
+ </div>
+</footer>
<ul id="slide-out" class="side-nav fixed">
{% block logo %}
<li class="logo border-bottom">
- <a title="{% trans %}Back to unread articles{% endtrans %}" href="{{ path('unread') }}">
+ <a title="{{ 'menu.left.back_to_unread'|trans }}" href="{{ path('unread') }}">
<img src="{{ asset('bundles/wallabagcore/themes/_global/img/logo-square.png') }}" alt="wallabag logo" />
</a>
</li>
{% endblock %}
{% block footer %}
- <footer class="page-footer cyan darken-2">
- <div class="container">
- <div class="row">
- <div class="col l6 s12">
- <h5 class="white-text">{{ 'footer.wallabag.elsewhere'|trans }}</h5>
- <p class="grey-text text-lighten-4">
- <a target="_blank" class="grey-text text-lighten-3" href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="Android">
- <span class="icon-android"></span>
- </a>
- <a target="_blank" class="grey-text text-lighten-3" href="https://itunes.apple.com/app/id828331015" title="iOS">
- <span class="icon-apple"></span>
- </a>
- <a target="_blank" class="grey-text text-lighten-3" href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" title="Firefox">
- <span class="icon-firefox"></span>
- </a>
- <a target="_blank" class="grey-text text-lighten-3" href="https://chrome.google.com/webstore/detail/wallabagger/gbmgphmejlcoihgedabhgjdkcahacjlj" title="Chrome">
- <span class="icon-chrome"></span>
- </a>
- </p>
- </div>
- <div class="col l4 offset-l2 s12">
- <h5 class="white-text">{{ 'footer.wallabag.social'|trans }}</h5>
- <a target="_blank" class="grey-text text-lighten-3" href="https://twitter.com/wallabagapp" title="Twitter">
- <span class="icon-twitter"></span>
- </a>
- <a target="_blank" class="grey-text text-lighten-3" href="https://plus.google.com/+WallabagOrg/posts" title="Google+">
- <span class="icon-google-plus2"></span>
- </a>
- <a target="_blank" class="grey-text text-lighten-3" href="https://facebook.com/Wallabag" title="Facebook">
- <span class="icon-facebook2"></span>
- </a>
- </div>
- </div>
- </div>
- <div class="footer-copyright">
- <div class="container">
- <p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
- <a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a>
- </div>
- </div>
- </footer>
+ {{ render(controller("WallabagCoreBundle:Footer:index")) }}
{% endblock %}
--- /dev/null
+<?php
+
+namespace Wallabag\ImportBundle\Import;
+
+use Psr\Log\LoggerInterface;
+use Psr\Log\NullLogger;
+use Doctrine\ORM\EntityManager;
+use Wallabag\CoreBundle\Helper\ContentProxy;
+use Wallabag\CoreBundle\Entity\Entry;
+
+abstract class AbstractImport implements ImportInterface
+{
+ protected $em;
+ protected $logger;
+ protected $contentProxy;
+
+ public function __construct(EntityManager $em, ContentProxy $contentProxy)
+ {
+ $this->em = $em;
+ $this->logger = new NullLogger();
+ $this->contentProxy = $contentProxy;
+ }
+
+ public function setLogger(LoggerInterface $logger)
+ {
+ $this->logger = $logger;
+ }
+
+ /**
+ * Fetch content from the ContentProxy (using graby).
+ * If it fails return false instead of the updated entry.
+ *
+ * @param Entry $entry Entry to update
+ * @param string $url Url to grab content for
+ * @param array $content An array with AT LEAST keys title, html, url, language & content_type to skip the fetchContent from the url
+ *
+ * @return Entry|false
+ */
+ protected function fetchContent(Entry $entry, $url, array $content = [])
+ {
+ try {
+ return $this->contentProxy->updateEntry($entry, $url, $content);
+ } catch (\Exception $e) {
+ return false;
+ }
+ }
+}
namespace Wallabag\ImportBundle\Import;
-use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Doctrine\ORM\EntityManager;
use GuzzleHttp\Client;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Craue\ConfigBundle\Util\Config;
-class PocketImport implements ImportInterface
+class PocketImport extends AbstractImport
{
private $user;
- private $em;
- private $contentProxy;
- private $logger;
private $client;
private $consumerKey;
private $skippedEntries = 0;
$this->logger = new NullLogger();
}
- public function setLogger(LoggerInterface $logger)
- {
- $this->logger = $logger;
- }
-
/**
* {@inheritdoc}
*/
}
$entry = new Entry($this->user);
- $entry = $this->contentProxy->updateEntry($entry, $url);
+ $entry = $this->fetchContent($entry, $url);
+
+ // jump to next entry in case of problem while getting content
+ if (false === $entry) {
+ ++$this->skippedEntries;
+ continue;
+ }
// 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted
if ($pocketEntry['status'] == 1 || $this->markAsRead) {
$entry->setArchived(true);
}
- // 0 or 1 - 1 If the item is favorited
+ // 0 or 1 - 1 If the item is starred
if ($pocketEntry['favorite'] == 1) {
$entry->setStarred(true);
}
namespace Wallabag\ImportBundle\Import;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Doctrine\ORM\EntityManager;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
-use Wallabag\CoreBundle\Helper\ContentProxy;
-abstract class WallabagImport implements ImportInterface
+abstract class WallabagImport extends AbstractImport
{
protected $user;
- protected $em;
- protected $logger;
- protected $contentProxy;
protected $skippedEntries = 0;
protected $importedEntries = 0;
protected $filepath;
'',
];
- public function __construct(EntityManager $em, ContentProxy $contentProxy)
- {
- $this->em = $em;
- $this->logger = new NullLogger();
- $this->contentProxy = $contentProxy;
- }
-
- public function setLogger(LoggerInterface $logger)
- {
- $this->logger = $logger;
- }
-
/**
* We define the user in a custom call because on the import command there is no logged in user.
* So we can't retrieve user from the `security.token_storage` service.
$data = $this->prepareEntry($importedEntry, $this->markAsRead);
- $entry = $this->contentProxy->updateEntry(
+ $entry = $this->fetchContent(
new Entry($this->user),
$importedEntry['url'],
$data
);
+ // jump to next entry in case of problem while getting content
+ if (false === $entry) {
+ ++$this->skippedEntries;
+ continue;
+ }
+
if (array_key_exists('tags', $data)) {
$this->contentProxy->assignTagsToEntry(
$entry,
*
* http://stackoverflow.com/a/14374832/569101
*/
- $this->markTestSkipped('PostgreSQL spotted: can find a good way to drop current database, skipping.');
+ $this->markTestSkipped('PostgreSQL spotted: can\'t find a good way to drop current database, skipping.');
}
}
+ /**
+ * Ensure next tests will have a clean database
+ */
public static function tearDownAfterClass()
{
$application = new Application(static::$kernel);
$application->setAutoExit(false);
- $code = $application->run(new ArrayInput([
+ $application->run(new ArrayInput([
+ 'command' => 'doctrine:schema:drop',
+ '--no-interaction' => true,
+ '--force' => true,
+ '--env' => 'test',
+ ]), new NullOutput());
+
+ $application->run(new ArrayInput([
+ 'command' => 'doctrine:schema:create',
+ '--no-interaction' => true,
+ '--env' => 'test',
+ ]), new NullOutput());
+
+ $application->run(new ArrayInput([
'command' => 'doctrine:fixtures:load',
'--no-interaction' => true,
'--env' => 'test',
$this->assertContains('PocketImport: Failed to import', $records[0]['message']);
$this->assertEquals('ERROR', $records[0]['level_name']);
}
+
+ public function testImportWithExceptionFromGraby()
+ {
+ $client = new Client();
+
+ $mock = new Mock([
+ new Response(200, ['Content-Type' => 'application/json'], Stream::factory(json_encode(['access_token' => 'wunderbar_token']))),
+ new Response(200, ['Content-Type' => 'application/json'], Stream::factory('
+ {
+ "status": 1,
+ "list": {
+ "229279689": {
+ "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview"
+ }
+ }
+ }
+ ')),
+ ]);
+
+ $client->getEmitter()->attach($mock);
+
+ $pocketImport = $this->getPocketImport();
+
+ $entryRepo = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $entryRepo->expects($this->once())
+ ->method('findByUrlAndUserId')
+ ->will($this->onConsecutiveCalls(false, true));
+
+ $this->em
+ ->expects($this->once())
+ ->method('getRepository')
+ ->willReturn($entryRepo);
+
+ $entry = new Entry($this->user);
+
+ $this->contentProxy
+ ->expects($this->once())
+ ->method('updateEntry')
+ ->will($this->throwException(new \Exception()));
+
+ $pocketImport->setClient($client);
+ $pocketImport->authorize('wunderbar_code');
+
+ $res = $pocketImport->import();
+
+ $this->assertTrue($res);
+ $this->assertEquals(['skipped' => 1, 'imported' => 0], $pocketImport->getSummary());
+ }
}
$this->assertContains('WallabagImport: user is not defined', $records[0]['message']);
$this->assertEquals('ERROR', $records[0]['level_name']);
}
+
+ public function testImportEmptyFile()
+ {
+ $wallabagV2Import = $this->getWallabagV2Import();
+ $wallabagV2Import->setFilepath(__DIR__.'/../fixtures/wallabag-v2-empty.json');
+
+ $res = $wallabagV2Import->import();
+
+ $this->assertFalse($res);
+ $this->assertEquals(['skipped' => 0, 'imported' => 0], $wallabagV2Import->getSummary());
+ }
+
+ public function testImportWithExceptionFromGraby()
+ {
+ $wallabagV2Import = $this->getWallabagV2Import();
+ $wallabagV2Import->setFilepath(__DIR__.'/../fixtures/wallabag-v2.json');
+
+ $entryRepo = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $entryRepo->expects($this->exactly(24))
+ ->method('findByUrlAndUserId')
+ ->will($this->onConsecutiveCalls(false, true, false));
+
+ $this->em
+ ->expects($this->any())
+ ->method('getRepository')
+ ->willReturn($entryRepo);
+
+ $this->contentProxy
+ ->expects($this->exactly(2))
+ ->method('updateEntry')
+ ->will($this->throwException(new \Exception()));
+
+ $res = $wallabagV2Import->import();
+
+ $this->assertTrue($res);
+ $this->assertEquals(['skipped' => 24, 'imported' => 0], $wallabagV2Import->getSummary());
+ }
}