From: Jeremy Benoist Date: Thu, 18 Aug 2016 09:56:02 +0000 (+0200) Subject: Merge pull request #2220 from Rurik19/master X-Git-Tag: 2.0.7~5 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=e408d7e895e784271a55c3a200666034db0af80a;hp=41c9eecfa728df7d8734ca1b0a69c55c93aafcea;p=github%2Fwallabag%2Fwallabag.git Merge pull request #2220 from Rurik19/master Enable PATCH method for CORS in API part --- diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0b92775a..920f1905 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -3,22 +3,11 @@ ## You found a bug Please [open a new issue](https://github.com/wallabag/wallabag/issues/new). -To fix the bug quickly, we need some infos: -* your wallabag version (in `app/config/config.yml`, see `wallabag_core.version`) -* your webserver installation : - * type of hosting (shared or dedicated) - * in case of a dedicated server, the server and OS used - * the php version used, eventually `phpinfo()` -* which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL) -* any particular details which could be related +To fix the bug quickly, we need some infos: please answer to the questions in the issue form. -If relevant : -* the link you want to save and which causes problem -* the file you want to import into wallabag, or just an extract - -If you have the skills, look for errors into php, server and application (see `var/logs`) logs +If you have the skills, look for errors into php, server and application (see `var/logs`) logs. Note : If you have large portions of text, use [Github's Gist service](https://gist.github.com/) or other pastebin-like. ## You want to fix a bug or to add a feature -Please fork wallabag and work with **the v2 branch** only. **Do not work on master branch**. +Please fork wallabag and work with **the master branch**. diff --git a/.gitignore b/.gitignore index 02e921f8..f596c7b8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ /var/sessions/* !var/sessions/.gitkeep !var/SymfonyRequirements.php +/bin/* +!/bin/console +!/bin/symfony_requirements # Parameters /app/config/parameters.yml diff --git a/.travis.yml b/.travis.yml index d397c872..73f9491a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,8 @@ php: - 5.5 - 5.6 - 7.0 - - hhvm + - 7.1 + - nightly env: - DB=mysql @@ -30,13 +31,30 @@ env: 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 - 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: @@ -44,8 +62,10 @@ 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; + - 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 - composer self-update --no-progress - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; @@ -55,6 +75,6 @@ before_install: script: - travis_wait composer install --no-interaction --no-progress --prefer-dist -o - ant prepare-$DB - - bin/phpunit -v + - phpunit -v - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; - if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; diff --git a/.zappr.yaml b/.zappr.yaml new file mode 100644 index 00000000..f90cd809 --- /dev/null +++ b/.zappr.yaml @@ -0,0 +1,26 @@ +# 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index fcc9dfbb..575d01cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,42 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [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 + +- [#2052](https://github.com/wallabag/wallabag/pull/2052) Add unread filter to entries pages (Dan Bartram) + +### Changed + +- [#2093](https://github.com/wallabag/wallabag/pull/2093) Replace vertical dots in material theme with horizontal dots (Nicolas Lœuillet) +- [#2054](https://github.com/wallabag/wallabag/pull/2054) Update italian translation (Daniele Conca) +- [#2068](https://github.com/wallabag/wallabag/pull/2068), [#2049](https://github.com/wallabag/wallabag/pull/2049) Update documentation (Josh Panter, Mario Vormstein) + +### Fixed + +- [#2122](https://github.com/wallabag/wallabag/pull/2122) Fix the deletion of Tags/Entries relation when delete an entry (Jeremy Benoist, Nicolas Lœuillet) +- [#2095](https://github.com/wallabag/wallabag/pull/2095) Fix form user display when 2FA is disabled (Nicolas Lœuillet) +- [#2092](https://github.com/wallabag/wallabag/pull/2092) API: Starred and archived clears if article is already exists (Rurik19) +- [#2097](https://github.com/wallabag/wallabag/issues/2097) Fix image path in 2-factor authentification email (Baptiste Mille-Mathias) +- [#2069](https://github.com/wallabag/wallabag/pull/2069) Do not specify language in Firefox addon link (Merouane Atig) + ## [2.0.4] - 2016-05-07 ### Added diff --git a/README.md b/README.md index cbe4c831..a6973466 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![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? @@ -10,13 +10,13 @@ More informations on our website: [wallabag.org](https://wallabag.org) # Install wallabag -If you don't have it yet, please [install composer](https://getcomposer.org/download/). +If you don't have it yet, please [install composer](https://getcomposer.org/download/) or be sure to use Composer 1.2 (`composer selfupdate` can help you about that). Then you can install wallabag by executing the following commands: ``` git clone https://github.com/wallabag/wallabag.git cd wallabag - git checkout 2.0.4 + git checkout 2.0.6 SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist php bin/console wallabag:install --env=prod php bin/console server:run --env=prod diff --git a/app/config/config.yml b/app/config/config.yml index 408e1b1e..72c854ab 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -5,30 +5,32 @@ imports: framework: #esi: ~ - translator: { fallback: "%locale%" } - secret: "%secret%" + translator: + enabled: true + fallback: "%locale%" + secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ - form: ~ + form: ~ csrf_protection: ~ - validation: { enable_annotations: true } + validation: + enable_annotations: true templating: engines: ['twig'] - #assets_version: SomeVersionScheme - default_locale: "%locale%" - trusted_hosts: ~ + default_locale: "%locale%" + trusted_hosts: ~ trusted_proxies: ~ session: # handler_id set to null will use default session handler from php.ini - handler_id: session.handler.native_file - save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" - fragments: ~ + handler_id: session.handler.native_file + save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" + fragments: ~ http_method_override: true assets: ~ wallabag_core: - version: 2.0.4 + version: 2.0.6 paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" languages: en: 'English' @@ -54,14 +56,14 @@ wallabag_import: # Twig Configuration twig: - debug: "%kernel.debug%" + debug: "%kernel.debug%" strict_variables: "%kernel.debug%" form_themes: - "LexikFormFilterBundle:Form:form_div_layout.html.twig" # Assetic Configuration assetic: - debug: "%kernel.debug%" + debug: "%kernel.debug%" use_controller: false bundles: [ ] #java: /usr/bin/java @@ -75,14 +77,14 @@ assetic: # Doctrine Configuration doctrine: dbal: - driver: "%database_driver%" + driver: "%database_driver%" host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" - charset: UTF8 - path: "%database_path%" + charset: UTF8 + path: "%database_path%" server_version: 5.6 orm: @@ -108,10 +110,11 @@ doctrine_migrations: # Swiftmailer Configuration swiftmailer: transport: "%mailer_transport%" - host: "%mailer_host%" - username: "%mailer_user%" - password: "%mailer_password%" - spool: { type: memory } + host: "%mailer_host%" + username: "%mailer_user%" + password: "%mailer_password%" + spool: + type: memory fos_rest: param_fetcher_listener: true @@ -174,17 +177,17 @@ liip_theme: path_patterns: bundle_resource: - - %%bundle_path%%/Resources/views/themes/%%current_theme%%/%%template%% + - "%%bundle_path%%/Resources/views/themes/%%current_theme%%/%%template%%" fos_user: db_driver: orm - firewall_name: main + firewall_name: secured_area user_class: Wallabag\UserBundle\Entity\User registration: confirmation: - enabled: %fosuser_confirmation% + enabled: "%fosuser_confirmation%" from_email: - address: %from_email% + address: "%from_email%" sender_name: wallabag fos_oauth_server: db_driver: orm @@ -202,8 +205,8 @@ scheb_two_factor: cookie_lifetime: 2592000 email: - enabled: %twofactor_auth% - sender_email: %twofactor_sender% + enabled: "%twofactor_auth%" + sender_email: "%twofactor_sender%" digits: 6 template: WallabagUserBundle:Authentication:form.html.twig mailer: wallabag_user.auth_code_mailer diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index 2813e369..0fa23dbf 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -5,7 +5,8 @@ framework: router: resource: "%kernel.root_dir%/config/routing_dev.yml" strict_requirements: true - profiler: { only_exceptions: false } + profiler: + only_exceptions: false web_profiler: toolbar: true @@ -14,19 +15,19 @@ web_profiler: monolog: handlers: main: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: debug - channels: [!event] + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: ['!event'] console: - type: console + type: console bubble: false verbosity_levels: VERBOSITY_VERBOSE: INFO VERBOSITY_VERY_VERBOSE: DEBUG - channels: [!event, !doctrine] + channels: ['!event', '!doctrine'] console_very_verbose: - type: console + type: console bubble: false verbosity_levels: VERBOSITY_VERBOSE: NOTICE diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index 342837a0..5a4dd69e 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml @@ -2,8 +2,8 @@ imports: - { resource: config.yml } #framework: -# validation: -# cache: apc +# cache: +# system: cache.adapter.apcu #doctrine: # orm: @@ -14,12 +14,12 @@ imports: monolog: handlers: main: - type: fingers_crossed + type: fingers_crossed action_level: error - handler: nested + handler: nested nested: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug console: - type: console + type: console diff --git a/app/config/routing.yml b/app/config/routing.yml index 6a6aa6ac..40cc7165 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -4,8 +4,8 @@ wallabag_annotation: wallabag_import: resource: "@WallabagImportBundle/Controller/" - type: annotation - prefix: /import + type: annotation + prefix: /import wallabag_api: resource: "@WallabagApiBundle/Resources/config/routing.yml" diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml index 404f6a3b..95c1b026 100644 --- a/app/config/routing_dev.yml +++ b/app/config/routing_dev.yml @@ -1,14 +1,14 @@ _wdt: resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" - prefix: /_wdt + prefix: /_wdt _profiler: resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" - prefix: /_profiler + prefix: /_profiler _errors: resource: "@TwigBundle/Resources/config/routing/errors.xml" - prefix: /_error + prefix: /_error _main: resource: routing.yml diff --git a/app/config/security.yml b/app/config/security.yml index 0748c06c..e24e03df 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -3,12 +3,14 @@ security: FOS\UserBundle\Model\UserInterface: sha512 role_hierarchy: - ROLE_ADMIN: ROLE_USER + ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: [ ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ] providers: administrators: - entity: { class: WallabagUserBundle:User, property: username } + entity: + class: WallabagUserBundle:User + property: username fos_userbundle: id: fos_user.user_provider.username @@ -31,7 +33,7 @@ security: anonymous: true login_firewall: - pattern: ^/login$ + pattern: ^/login$ anonymous: ~ secured_area: @@ -40,12 +42,12 @@ security: provider: fos_userbundle csrf_token_generator: security.csrf.token_manager - anonymous: true + anonymous: true remember_me: - secret: "%secret%" + secret: "%secret%" lifetime: 31536000 - path: / - domain: ~ + path: / + domain: ~ logout: path: /logout diff --git a/bin/doctrine b/bin/doctrine deleted file mode 120000 index 0f72e36f..00000000 --- a/bin/doctrine +++ /dev/null @@ -1 +0,0 @@ -../vendor/doctrine/orm/bin/doctrine \ No newline at end of file diff --git a/bin/doctrine-dbal b/bin/doctrine-dbal deleted file mode 120000 index 110e93c5..00000000 --- a/bin/doctrine-dbal +++ /dev/null @@ -1 +0,0 @@ -../vendor/doctrine/dbal/bin/doctrine-dbal \ No newline at end of file diff --git a/bin/doctrine-migrations b/bin/doctrine-migrations deleted file mode 120000 index 7184da71..00000000 --- a/bin/doctrine-migrations +++ /dev/null @@ -1 +0,0 @@ -../vendor/doctrine/migrations/bin/doctrine-migrations \ No newline at end of file diff --git a/bin/doctrine.php b/bin/doctrine.php deleted file mode 120000 index b22b74da..00000000 --- a/bin/doctrine.php +++ /dev/null @@ -1 +0,0 @@ -../vendor/doctrine/orm/bin/doctrine.php \ No newline at end of file diff --git a/bin/php-cs-fixer b/bin/php-cs-fixer deleted file mode 120000 index 902e8f5f..00000000 --- a/bin/php-cs-fixer +++ /dev/null @@ -1 +0,0 @@ -../vendor/fabpot/php-cs-fixer/php-cs-fixer \ No newline at end of file diff --git a/bin/phpunit b/bin/phpunit deleted file mode 120000 index 4ba32564..00000000 --- a/bin/phpunit +++ /dev/null @@ -1 +0,0 @@ -../vendor/phpunit/phpunit/phpunit \ No newline at end of file diff --git a/bin/security-checker b/bin/security-checker deleted file mode 120000 index 85f6e8ed..00000000 --- a/bin/security-checker +++ /dev/null @@ -1 +0,0 @@ -../vendor/sensiolabs/security-checker/security-checker \ No newline at end of file diff --git a/bin/symfony_requirements b/bin/symfony_requirements index 7cd559a4..8825a964 100755 --- a/bin/symfony_requirements +++ b/bin/symfony_requirements @@ -13,7 +13,7 @@ echo '> PHP is using the following php.ini file:'.PHP_EOL; if ($iniPath) { echo_style('green', ' '.$iniPath); } else { - echo_style('warning', ' WARNING: No configuration file (php.ini) used by PHP!'); + echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!'); } echo PHP_EOL.PHP_EOL; diff --git a/composer.json b/composer.json index a430c59e..c7830a14 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "ext-iconv": "*", "ext-tokenizer": "*", "ext-pdo": "*", - "symfony/symfony": "3.0.*", + "symfony/symfony": "3.1.*", "doctrine/orm": "^2.5", "doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-cache-bundle": "^1.2", @@ -74,7 +74,7 @@ "grandt/phpepub": "~4.0", "wallabag/php-mobi": "~1.0.0", "kphoen/rulerz-bundle": "~0.10", - "guzzlehttp/guzzle": "^5.2.0", + "guzzlehttp/guzzle": "^5.3.1", "doctrine/doctrine-migrations-bundle": "^1.0", "paragonie/random_compat": "~1.0", "craue/config-bundle": "~1.4", @@ -85,10 +85,11 @@ }, "require-dev": { "doctrine/doctrine-fixtures-bundle": "~2.2", + "doctrine/data-fixtures": "~1.1.1", "sensio/generator-bundle": "^3.0", "phpunit/phpunit": "~4.4", - "symfony/phpunit-bridge": "^2.7", - "fabpot/php-cs-fixer": "~1.9" + "symfony/phpunit-bridge": "^3.0", + "friendsofphp/php-cs-fixer": "~1.9" }, "scripts": { "post-cmd": [ @@ -121,6 +122,9 @@ "psr-4": { "Wallabag\\": "src/Wallabag/" }, "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] }, + "autoload-dev": { + "psr-4": { "Tests\\": "tests/" } + }, "config": { "bin-dir": "bin" }, diff --git a/docs/de/developer/api.rst b/docs/de/developer/api.rst new file mode 100644 index 00000000..f8911181 --- /dev/null +++ b/docs/de/developer/api.rst @@ -0,0 +1,270 @@ +API DoKumentation +================= + +Dank dieser Dokumentation werden wir sehen, wie wir mit der wallabag API interagieren. + +Voraussetzungen +--------------- + +* wallabag frisch (oder nicht) installiert auf http://localhost:8000 +* ``httpie`` installiert auf deinem Computer (`siehe Projektwebsite `__). Beachte, dass du die Kommandos auch mit curl oder wget nutzen kannst. +* alle API Methoden sind hier dokumentiert http://localhost:8000/api/doc + +Einen neuen API Client erstellen +-------------------------------- + +In deinem wallabag Account, kannst du einen neuen API Client unter dieser URL http://localhost:8000/developer/client/create erstellen. + +Gib dazu nur die Umleitungs-URL deiner Appliaktion an und erstelle deinen Client. Wenn deine Applikation eine Desktopapplikation ist, trage die URL, die dir am besten passt, ein. + +Du bekommst Informationen wie diese: + +:: + + Client ID: + + 1_3o53gl30vhgk0c8ks4cocww08o84448osgo40wgw4gwkoo8skc + + Client secret: + + 636ocbqo978ckw0gsw4gcwwocg8044sco0w8w84cws48ggogs4 + + +Einen Aktualisierungstoken erhalten +----------------------------------- + +Für jeden API Aufruf brauchst du einen Token. Lass uns einen erstellen mit diesem Kommando (ersetze ``client_id``, ``client_secret``, ``username`` und ``password`` mit ihren Werten): + +:: + + http POST http://localhost:8000/oauth/v2/token \ + grant_type=password \ + client_id=1_3o53gl30vhgk0c8ks4cocww08o84448osgo40wgw4gwkoo8skc \ + client_secret=636ocbqo978ckw0gsw4gcwwocg8044sco0w8w84cws48ggogs4 \ + username=wallabag \ + password=wallabag + +Du bekommst folgendes zurück: + +:: + + HTTP/1.1 200 OK + Cache-Control: no-store, private + Connection: close + Content-Type: application/json + Date: Tue, 05 Apr 2016 08:44:33 GMT + Host: localhost:8000 + Pragma: no-cache + X-Debug-Token: 19c8e0 + X-Debug-Token-Link: /_profiler/19c8e0 + X-Powered-By: PHP/7.0.4 + + { + "access_token": "ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA", + "expires_in": 3600, + "refresh_token": "OTNlZGE5OTJjNWQwYzc2NDI5ZGE5MDg3ZTNjNmNkYTY0ZWZhZDVhNDBkZTc1ZTNiMmQ0MjQ0OThlNTFjNTQyMQ", + "scope": null, + "token_type": "bearer" + } + +Wir werden mit dem ``access_token`` Wert in unseren nächsten Aufrufen arbeiten. + +cURL Beispiel: + +:: + + curl -s "https://localhost:8000/oauth/v2/token?grant_type=password&client_id=1_3o53gl30vhgk0c8ks4cocww08o84448osgo40wgw4gwkoo8skc&client_secret=636ocbqo978ckw0gsw4gcwwocg8044sco0w8w84cws48ggogs4&username=wallabag&password=wallabag" + +Existierende Einträge erhalten +------------------------------ + +Dokumentation für diese Methode: http://localhost:8000/api/doc#get--api-entries.{_format} + +Da wir auf einer neuen wallabag Installation arbeiten, bekommen wir keine Ergebnisse mit diesem Kommando: + +:: + + http GET http://localhost:8000/api/entries.json \ + "Authorization:Bearer ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" + +gibt zurück: + +:: + + HTTP/1.1 200 OK + 0: application/json + Cache-Control: no-cache + Connection: close + Content-Type: application/json + Date: Tue, 05 Apr 2016 08:51:32 GMT + Host: localhost:8000 + Set-Cookie: PHPSESSID=nrogm748md610ovhu6j70c3q63; path=/; HttpOnly + X-Debug-Token: 4fbbc4 + X-Debug-Token-Link: /_profiler/4fbbc4 + X-Powered-By: PHP/7.0.4 + + { + "_embedded": { + "items": [] + }, + "_links": { + "first": { + "href": "http://localhost:8000/api/entries?page=1&perPage=30" + }, + "last": { + "href": "http://localhost:8000/api/entries?page=1&perPage=30" + }, + "self": { + "href": "http://localhost:8000/api/entries?page=1&perPage=30" + } + }, + "limit": 30, + "page": 1, + "pages": 1, + "total": 0 + } + +Das Array ``items`` ist leer. + +cURL Beispiel: + +:: + + curl --get "https://localhost:8000/api/entries.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" + +Deinen ersten Eintrag hinzufügen +-------------------------------- + +Dokumentation für diese Methode: http://localhost:8000/api/doc#post--api-entries.{_format} + +:: + + http POST http://localhost:8000/api/entries.json \ + "Authorization:Bearer ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" \ + url="http://www.numerama.com/tech/160115-le-pocket-libre-wallabag-fait-le-plein-de-fonctionnalites.html" + +gibt zurück: + +:: + + HTTP/1.1 200 OK + 0: application/json + Cache-Control: no-cache + Connection: close + Content-Type: application/json + Date: Tue, 05 Apr 2016 09:07:54 GMT + Host: localhost:8000 + Set-Cookie: PHPSESSID=bjie40ck72kp2pst3i71gf43a4; path=/; HttpOnly + X-Debug-Token: e01c51 + X-Debug-Token-Link: /_profiler/e01c51 + X-Powered-By: PHP/7.0.4 + + { + "_links": { + "self": { + "href": "/api/entries/1" + } + }, + "content": "

Fonctionnant sur le même principe que Pocket, Instapaper ou Readability, le logiciel Wallabag permet de mémoriser des articles pour les lire plus tard. Sa nouvelle version apporte une multitude de nouvelles fonctionnalités.

Si vous utilisez Firefox comme navigateur web, vous avez peut-être constaté l’arrivée d’une fonctionnalité intitulée Pocket. Disponible autrefois sous la forme d’un module complémentaire, et sous un autre nom (Read it Later), elle est depuis le mois de juin 2015 directement incluse au sein de Firefox.

\n

Concrètement, Pocket sert à garder en mémoire des contenus que vous croisez au fil de la navigation, comme des articles de presse ou des vidéos, afin de pouvoir les consulter plus tard. Pocket fonctionne un peu comme un système de favoris, mais en bien plus élaboré grâce à ses options supplémentaires.

\n

Mais Pocket fait polémique, car il s’agit d’un projet propriétaire qui est intégré dans un logiciel libre. C’est pour cette raison que des utilisateurs ont choisi de se tourner vers d’autres solutions, comme Wallabag, qui est l’équivalent libre de Pocket et d’autres systèmes du même genre, comme Instapaper et Readability.

\n

Et justement, Wallabag évolue. C’est ce dimanche que la version 2.0.0 du logiciel a été publiée par l’équipe en  charge de son développement et celle-ci contient de nombreux changements par rapport aux moutures précédentes (la documentation est traduite en français), lui permettant d’apparaître comme une alternative à Pocket, Instapaper et Readability.

\n

\"homepage\"

\n

Parmi les principaux changements que l’on peut retenir avec cette nouvelle version, notons la possibilité d’écrire des annotations dans les articles mémorisés, de filtrer les contenus selon divers critères (temps de lecture, nom de domaine, date de création, statut…), d’assigner des mots-clés aux entrées, de modifier le titre des articles, le support des flux RSS ou encore le support de plusieurs langues dont le français.

\n

D’autres options sont également à signaler, comme l’aperçu d’un article mémorisé (si l’option est disponible), un guide de démarrage rapide pour les débutants, un outil d’export dans divers formats (PDF, JSON, EPUB, MOBI, XML, CSV et TXT) et, surtout, la possibilité de migrer vers Wallabag depuis Pocket, afin de convaincre les usagers de se lancer.

\n \n \n

Articles liés

\n
\n
\n", + "created_at": "2016-04-05T09:07:54+0000", + "domain_name": "www.numerama.com", + "id": 1, + "is_archived": 0, + "is_starred": 0, + "language": "fr-FR", + "mimetype": "text/html", + "preview_picture": "http://www.numerama.com/content/uploads/2016/04/post-it.jpg", + "reading_time": 2, + "tags": [], + "title": "Le Pocket libre Wallabag fait le plein de fonctionnalités - Tech - Numerama", + "updated_at": "2016-04-05T09:07:54+0000", + "url": "http://www.numerama.com/tech/160115-le-pocket-libre-wallabag-fait-le-plein-de-fonctionnalites.html", + "user_email": "", + "user_id": 1, + "user_name": "wallabag" + } + +Wenn du jetzt das vorherige Kommando (siehe **Existierende Einträge erhalten**), wirst du Daten erhalten. + +cURL Beispiel: + +:: + + curl "https://localhost:8000/api/entries.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA&url=http://www.numerama.com/tech/160115-le-pocket-libre-wallabag-fait-le-plein-de-fonctionnalites.html" + +Eintrag löschen +----------------- + +Dokumentation für diese Methode: http://localhost:8000/api/doc#delete--api-entries-{entry}.{_format} + +:: + + http DELETE http://localhost:8000/api/entries/1.json \ + "Authorization:Bearer ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" + +gibt zurück: + +:: + + HTTP/1.1 200 OK + 0: application/json + Cache-Control: no-cache + Connection: close + Content-Type: application/json + Date: Tue, 05 Apr 2016 09:19:07 GMT + Host: localhost:8000 + Set-Cookie: PHPSESSID=jopgnfvmuc9a62b27sqm6iulr6; path=/; HttpOnly + X-Debug-Token: 887cef + X-Debug-Token-Link: /_profiler/887cef + X-Powered-By: PHP/7.0.4 + + { + "_links": { + "self": { + "href": "/api/entries/" + } + }, + "annotations": [], + "content": "

Fonctionnant sur le même principe que Pocket, Instapaper ou Readability, le logiciel Wallabag permet de mémoriser des articles pour les lire plus tard. Sa nouvelle version apporte une multitude de nouvelles fonctionnalités.

Si vous utilisez Firefox comme navigateur web, vous avez peut-être constaté l’arrivée d’une fonctionnalité intitulée Pocket. Disponible autrefois sous la forme d’un module complémentaire, et sous un autre nom (Read it Later), elle est depuis le mois de juin 2015 directement incluse au sein de Firefox.

\n

Concrètement, Pocket sert à garder en mémoire des contenus que vous croisez au fil de la navigation, comme des articles de presse ou des vidéos, afin de pouvoir les consulter plus tard. Pocket fonctionne un peu comme un système de favoris, mais en bien plus élaboré grâce à ses options supplémentaires.

\n

Mais Pocket fait polémique, car il s’agit d’un projet propriétaire qui est intégré dans un logiciel libre. C’est pour cette raison que des utilisateurs ont choisi de se tourner vers d’autres solutions, comme Wallabag, qui est l’équivalent libre de Pocket et d’autres systèmes du même genre, comme Instapaper et Readability.

\n

Et justement, Wallabag évolue. C’est ce dimanche que la version 2.0.0 du logiciel a été publiée par l’équipe en  charge de son développement et celle-ci contient de nombreux changements par rapport aux moutures précédentes (la documentation est traduite en français), lui permettant d’apparaître comme une alternative à Pocket, Instapaper et Readability.

\n

\"homepage\"

\n

Parmi les principaux changements que l’on peut retenir avec cette nouvelle version, notons la possibilité d’écrire des annotations dans les articles mémorisés, de filtrer les contenus selon divers critères (temps de lecture, nom de domaine, date de création, statut…), d’assigner des mots-clés aux entrées, de modifier le titre des articles, le support des flux RSS ou encore le support de plusieurs langues dont le français.

\n

D’autres options sont également à signaler, comme l’aperçu d’un article mémorisé (si l’option est disponible), un guide de démarrage rapide pour les débutants, un outil d’export dans divers formats (PDF, JSON, EPUB, MOBI, XML, CSV et TXT) et, surtout, la possibilité de migrer vers Wallabag depuis Pocket, afin de convaincre les usagers de se lancer.

\n \n \n

Articles liés

\n
\n
\n", + "created_at": "2016-04-05T09:07:54+0000", + "domain_name": "www.numerama.com", + "is_archived": 0, + "is_starred": 0, + "language": "fr-FR", + "mimetype": "text/html", + "preview_picture": "http://www.numerama.com/content/uploads/2016/04/post-it.jpg", + "reading_time": 2, + "tags": [], + "title": "Le Pocket libre Wallabag fait le plein de fonctionnalités - Tech - Numerama", + "updated_at": "2016-04-05T09:07:54+0000", + "url": "http://www.numerama.com/tech/160115-le-pocket-libre-wallabag-fait-le-plein-de-fonctionnalites.html", + "user_email": "", + "user_id": 1, + "user_name": "wallabag" + } + +Und wenn du die existierenden Einträge nun listen willst (siehe **Existierende Einträge erhalten**), ist das Array wieder leer. + +cURL Beispiel: + +:: + + curl --request DELETE "https://localhost:8000/api/entries/1.html?access_token=ZGJmNTA2MDdmYTdmNWFiZjcxOWY3MWYyYzkyZDdlNWIzOTU4NWY3NTU1MDFjOTdhMTk2MGI3YjY1ZmI2NzM5MA" + +Andere Methoden +--------------- + +Wir werden nicht für jede API Methode Beispiele schreiben. + +Wirf einen Blick in die Liste http://localhost:8000/api/doc, um alle Methode kennenzulernen. + + +Drittanbieter Ressourcen +------------------------ + +Einige Applikationen oder Bibliotheken nutzen unsere API. Hier ist eine nicht abschließende Aufzählung von ihnen: + +- `Java wrapper for the wallabag API `_ von Strubbl. +- `.NET library for the wallabag v2 API `_ von Julian Oster. +- `Python API for wallabag `_ von FoxMaSk, für sein Projekt `Trigger Happy `_. +- `A plugin `_ entworfen für `Tiny Tiny RSS `_, das die wallabag v2 API nutzt. Von Josh Panter. diff --git a/docs/de/developer/docker.rst b/docs/de/developer/docker.rst new file mode 100644 index 00000000..c63194aa --- /dev/null +++ b/docs/de/developer/docker.rst @@ -0,0 +1,57 @@ +Lasse wallabag in docker-compose laufen +======================================= + +Um deine eigene Entwicklungsinstanz von wallabag laufen zu lassen, +möchtest du vielleicht die vorkonfigurierten docker compose Dateien +nutzen. + +Voraussetzungen +--------------- + +Stelle sicher `Docker +`__ und `Docker +Compose `__ auf deinem +System verfügbar und aktuell zu haben. + +Wechsel des DBMS +---------------- + +Standardmäßig startet wallabag mit einer SQLite Datenbank. +Da wallabag Unterstützung für Postgresql und MySQL bietet, gibt es +auch docker Container für diese. + +In der ``docker-compose.yml`` kommentierst du für das gewählte DBMS +aus: + +- die Container Definition (``postgres`` oder ``mariadb`` root + Level Block) +- den Container Link in dem ``php`` Container +- die Container Umgebungsdatei in dem ``php`` Container + +Um mit Symfony Kommandos auf deinem Host auszuführen (wie z.B. +``wallabag:install``), sollst du außerdem: + +- die richtige Umgebungsdatei auf deiner Kommandozeile einlesen, + sodass Variablen wie ``SYMFONY__ENV__DATABASE_HOST`` existieren +- eine Zeile ``127.0.0.1 rdbms`` in deiner ``hosts`` Datei auf dem + System erstellen + +wallabag laufen lassen +---------------------- + +#. Forke und klone das Projekt +#. Bearbeite ``app/config/parameters.yml`` um ``database_*`` + Eigenschaften mit den kommentierten zu ersetzen (mit Werten + mit ``env.`` Präfix) +#. ``composer install`` die Projektabhängigkeiten +#. ``php app/console wallabag:install``, um das Schema zu erstellen +#. ``docker-compose up`` um die Container laufen zu lassen +#. Schließlich öffne http://localhost:8080/, um dein frisch + installiertes wallabag zu finden. + +In den verschiedenen Schritten wirst du vielleicht in verschiendene +Probleme laufen wie UNIX Berechtigungsprobleme, falschen Pfaden im +generierten Cache, etc.… +Operationen wie das Löschen der Cachedateien oder das Ändern der +Dateibesitzer können öfter gebraucht werden, darum habe keine Angst +sie anzupassen. diff --git a/docs/de/developer/documentation.rst b/docs/de/developer/documentation.rst new file mode 100644 index 00000000..41e19363 --- /dev/null +++ b/docs/de/developer/documentation.rst @@ -0,0 +1,10 @@ +Wirke an dieser Dokumentation mit +================================= + +Quellen der Dokumentation sind hier zu finden https://github.com/wallabag/wallabag/tree/master/docs + +Wir nutzen `ReadTheDocs `__, um sie zu generieren. + +Seiten werden in `reStructuredText `__ geschrieben. Du kannst Onlinetools wie http://rst.aaroniles.net/ oder http://rst.ninjs.org/ nutzen, um eine Vorschau deiner Artikel zu betrachten. + +Wenn du eine neue Seite erstellst, vergiss nicht die `index.rst `__ zu bearbeiten, um dort einen Link für die Seitenleiste hinzuzufügen. diff --git a/docs/de/developer/maintenance.rst b/docs/de/developer/maintenance.rst new file mode 100644 index 00000000..2a9070e1 --- /dev/null +++ b/docs/de/developer/maintenance.rst @@ -0,0 +1,32 @@ +Wartungsmodus +============= + +Wenn du längere Aufgaben auf deiner wallabag Instanz ausführen willst, kannst du den Wartungsmodus aktivieren. +Keiner wird dann Zugang zu deiner Instanz haben. + +Aktivieren des Wartungsmodus +---------------------------- + +Um den Wartungsmodus zu aktivieren, führe folgendes Kommando aus: + +:: + + bin/console lexik:maintenance:lock --no-interaction + +Du kannst deine IP Adresse in ``app/config/config.yml`` setzen, wenn du Zugriff zu wallabag haben willst, auch wenn der Wartungsmodus aktiv ist. Zum Beispiel: + +:: + + lexik_maintenance: + authorized: + ips: ['127.0.0.1'] + + +Deaktivieren des Wartungsmodus +------------------------ + +Um den Wartungsmodus zu deaktivieren, führe dieses Kommando aus: + +:: + + bin/console lexik:maintenance:unlock diff --git a/docs/de/developer/translate.rst b/docs/de/developer/translate.rst new file mode 100644 index 00000000..50e136ea --- /dev/null +++ b/docs/de/developer/translate.rst @@ -0,0 +1,57 @@ +Übersetze wallabag +================== + +wallabag Webapplikation +----------------------- + +Übersetzungsdateien +~~~~~~~~~~~~~~~~~~~ + +.. note:: + + Da wallabag hauptsächlich von einem französischem Team entwickelt wird, betrachte + die französische Übersetzung als die aktuellste und kopiere sie, um deine eigene Übersetzung zu starten. + +Du kannst die Übersetzungsdateien hier finden: https://github.com/wallabag/wallabag/tree/master/src/Wallabag/CoreBundle/Resources/translations. + +Du musst die ``messages.CODE.yml`` und ``validators.CODE.yml`` erstellen, wobei CODE +der ISO 639-1 Code deiner Sprache ist (`siehe Wikipedia `__). + +Andere Dateien zum Übersetzen: + +- https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations. +- https://github.com/wallabag/wallabag/tree/master/app/Resources/FOSUserBundle/translations. + +Du musst die ``THE_TRANSLATION_FILE.CODE.yml`` Dateien erstellen. + +Konfigurationsdatei +~~~~~~~~~~~~~~~~~~~ + +Du musst die `app/config/config.yml `__ bearbeiten, +um deine Sprache auf der Konfigurationsseite in wallabag anzuzeigen (um Nutzern zu erlauben zu dieser neuen Übersetzung zu wechseln). + +Unter dem Abschnitt ``wallabag_core.languages`` musst du eine neue Zeile mit deiner Übersetzung hinzufügen. Zum Beispiel: + +:: + + wallabag_core: + ... + languages: + en: 'English' + fr: 'Français' + + +Für die erste Spalte (``en``, ``fr``, etc.) musst du den ISO 639-1 Code deiner Sprache hinzufügen (siehe oben). + +Für die zweite Spalte trägst du den Namen deiner Sprache ein. Nur den. + +wallabag Dokumentation +---------------------- + +.. note:: + + Im Gegensatz zur Webapplikation ist die Hauptsprache für die Dokumentation Englisch. + +Documentationsdateien sind hier gespeichert: https://github.com/wallabag/wallabag/tree/master/docs + +Du musst die Ordnerstruktur des Ordners ``en`` beachten, wenn du deine eigene Übersetzung startest. diff --git a/docs/de/index.rst b/docs/de/index.rst new file mode 100644 index 00000000..5311150f --- /dev/null +++ b/docs/de/index.rst @@ -0,0 +1,52 @@ +wallabag Dokumentation +====================== + +.. image:: ../img/wallabag.png + :alt: wallabag Logo + :align: center + +**wallabag** ist eine Read-it-later Applikation: es speichert Websites, +indem es nur den Inhalt behält. Elemente wie Navigation oder Werbung werden gelöscht. + +.. tip:: + + Diese Dokumentation ist über wallabag v2. Wenn du die Dokumentation für wallabag v1 lesen willst, `siehe dir bitte das hier an `__. + +Die Hauptdokumentation für diese Applikation ist in einigen Abschnitten organisiert: + +* :ref:`user-docs` +* :ref:`dev-docs` + +.. _user-docs: + +.. toctree:: + :maxdepth: 2 + :caption: Nutzerdokumentation + + user/faq + user/installation + user/upgrade + user/migration + user/import + user/create_account + user/login + user/configuration + user/first_article + user/errors_during_fetching + user/annotations + user/download_articles + user/filters + user/tags + user/android + +.. _dev-docs: + +.. toctree:: + :maxdepth: 2 + :caption: Entwicklerdokumentation + + developer/api + developer/docker + developer/documentation + developer/translate + developer/maintenance diff --git a/docs/de/user/android.rst b/docs/de/user/android.rst new file mode 100644 index 00000000..8573bcb8 --- /dev/null +++ b/docs/de/user/android.rst @@ -0,0 +1,107 @@ +Android App +=========== + + +Zweck dieses Dokuments +---------------------- + +Dieses Dokument beschreibt wie du deine Android App einrichtest, damit sie mit deiner Wallabaginstanz zusammenarbeitet. Es gibt hierbei keinen Unterschied im Vorgang - egal ob du Wallabag v1 oder v2 einsetzt. + + +Schritte, um dein App zu einzurichten +------------------------------------- + +Wenn du das erste Mal die App startest, siehst du den Willkommensbildschirm, wo du angewiesen wirst zunächst deine App mit deiner Wallabaginstanz einzurichten. + +.. image:: ../../img/user/android_welcome_screen.de.png + :alt: Willkommensbildschirm + :align: center + +Bestätige nur diese Nachricht und du wirst zum Einstellungsbildschirm weitergeleitet. + +.. image:: ../../img/user/android_configuration_screen.de.png + :alt: Einstellungsbildschirm + :align: center + +Trage deine Wallabagdaten ein. Du musst deine Wallabagadresse eintragen. Es ist wichtig, dass die URL nicht mit einem Schrägstrich endet. Füge auch deine Wallabagzugangsdaten in das Nutzer- und Passwortfeld ein. + +.. image:: ../../img/user/android_configuration_filled_in.de.png + :alt: Eingetragene Einstellungen + :align: center + +Nachdem du deine Daten eingetragen hast, drücke den Button Verbindung testen und warte auf das Fertigstellen des Tests. + +.. image:: ../../img/user/android_configuration_connection_test.de.png + :alt: Verbindungstest mit deinen Wallabagdaten + :align: center + +Der Verbindungstest sollte mit Erfolg ausgehen. Falls nicht, musst du zunächst deine Daten korrigieren bevor du zum nächsten Schritt gehst. + +.. image:: ../../img/user/android_configuration_connection_test_success.de.png + :alt: Verbindungstest war erfolgreich + :align: center + +Nach dem Verbindungstest erfolgreich war, kannst du den Button zum Feedzugangsdaten abholen drücken. Die App versucht nun sich bei deiner Wallabaginstanz einzuloggen und die Nutzer ID und den dazugehörigen Token für die Feeds zu laden. + +.. image:: ../../img/user/android_configuration_get_feed_credentials.de.png + :alt: Feedzugangsdaten abholen + :align: center + +Wenn der Prozess des Abholens deiner Feedzugangsdaten erfolgreich beendet wurde, siehst du eine Toastnachricht, dass die User ID und der Token automatisch in das Formular eingetragen wurden. + +.. image:: ../../img/user/android_configuration_feed_credentials_automatically_filled_in.de.png + :alt: Feedzugangsdaten erfolgreich abgeholt + :align: center + +Jetzt scrollst du bis zum unteren Rand des Einstellungsbildschirms. Natürlich kannst du die Einstellungen dort deinen Wünschen anpassen. Schließe die Einrichtung mit dem Drücken des Speicherbuttons ab. + +.. image:: ../../img/user/android_configuration_scroll_bottom.de.png + :alt: unterer Rand des Einstellungsbildschirms + :align: center + +Nachdem du den Speicherbutton gedrückt hast, kommst du in den folgenden Bildschirm. Die App schlägt vor, eine initiale Synchronisation der Artikelfeeds durchzuführen. Hier ist es empfohlen, dies zu bestätigen und Ja zu drücken. + +.. image:: ../../img/user/android_configuration_saved_feed_update.de.png + :alt: Einstellung erstmals gespeichert + :align: center + +Schließlich nach der ersten erfolgreichen Synchronisation, wird dir die Liste der ungelesenen Artikel präsentiert. + +.. image:: ../../img/user/android_unread_feed_synced.de.png + :alt: Gefüllte Artikellist da Feeds erfolgreich synchronisiert sind + :align: center + + + +Bekannte Limitierungen +--------------------- + +2FA +~~~ + +Zur Zeit unterstützt die App keine Zwei-Faktor Authentifizierung. Du solltest sie deaktivieren damit die App funktioniert. + + +Begrenzte Anzahl Artikel mit Wallabag v2 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In deiner Wallabaginstanz kannst du einstellen, wie viele Artikel Teil deiner RSS Feeds sind. Diese Option existierte in Wallabag v1 nicht, wo immer alle Artikel Teil des Feeds waren. Also wenn du die Anzahl der Artikel, die in der App angezeigt werden sollen, größer einstellst als die Anzahl Artikel in deinem Feed, wirst du nur die Anzahl an Artikel deines Feeds sehen. + + +SSL/TLS Verschlüsselung +~~~~~~~~~~~~~~~~~~~~~~~ + +Wenn du deine Wallabaginstanz per HTTPS erreichen kannst, solltest du das so konfigurieren. Besonders dann, wenn deine HTTP URL nach HTTPS umleitet. Im Moment kann die App mit dieser Weiterleitung nicht korrekt umgehen. + + +Referenzen +---------- + +`Quellcode der Android Applikation `_ + +`Android Applikation auf F-Droid `_ + +`Android Applikation auf Google Play `_ + +`Support Chat auf English `_ + diff --git a/docs/de/user/annotations.rst b/docs/de/user/annotations.rst new file mode 100644 index 00000000..4b4d58b0 --- /dev/null +++ b/docs/de/user/annotations.rst @@ -0,0 +1,24 @@ +Anmerkungen +=========== + +In jedem Artikel, den du liest, kannst du Anmerkungen hinzufügen. Es ist einfacher mit ein paar Bilder erklärt. + +Wähle den Teil des Artikels aus, den du kommentieren willst und klicke auf den Bleistift: + +.. image:: ../../img/user/annotations_1.png + :alt: Wähle den Text + :align: center + +Schreibe deinen Kommentar: + +.. image:: ../../img/user/annotations_2.png + :alt: Schreibe deinen Kommentar + :align: center + +Der Text ist nun hervorgehoben und du kannst deine Anmerkung lesen, wenn du den Mauspfeil darüber fährst. + +.. image:: ../../img/user/annotations_3.png + :alt: lese deine Anmerkung + :align: center + +Du kannst so viele Anmerkungen erstellen wie du möchtest. diff --git a/docs/de/user/configuration.rst b/docs/de/user/configuration.rst new file mode 100644 index 00000000..67695ff1 --- /dev/null +++ b/docs/de/user/configuration.rst @@ -0,0 +1,119 @@ +Konfiguration +============= + +Nun, da du eingeloggt bist, ist es Zeit, deinen Account so zu konfigurieren, +wie du möchtest. + +Klicke auf ``Konfiguration`` im Menü. Du hast fünf Karteireiter: ``Einstellungen``, +``RSS``, ``Benutzer-Informationen``, ``Kennwort`` und ``Tagging-Regeln``. + +Einstellungen +------------- + +Theme +~~~~~ + +wallabag ist anpassbar. Du kannst dein bevorzugtes Theme hier auswählen. Du kannst +auch ein neues erstellen, ein extra Kapitel wird dem gewidmet sein. Das Standardtheme +ist ``Material``, es ist das Theme, dass in den Dokumentationsbildschirmfotos genutzt wird. + +Artikel pro Seite +~~~~~~~~~~~~~~~~~ + +Du kannst die Anzahl der dargestellten Artikel pro Seite ändern. + +Lesegeschwindigkeit +~~~~~~~~~~~~~~~~~~~ + +wallabag berechnet die Lesezeit für jeden Artikel. Du kannst hier definieren, dank dieser Liste, ob du +ein schneller oder langsamer Leser bist. wallabag wird die Lesezeit für jeden Artikel neu berechnen. + +Sprache +~~~~~~~ + +Du kannst die Sprache von der wallabag Benutzeroberfläche ändern. Du musst die ausloggen, damit diese +Änderung Wirkung zeigt. + +RSS +--- + +wallabag stellt RSS Feeds für jeden Artikelstatus bereit: ungelesen, Favoriten und Archiv. + +Als erstes musst du einen persönlciehn Token erstellen: Klicke auf ``Token generieren``. +Es ist möglich deinen Token zu ändern, indem du auf ``Token zurücksetzen`` klickst. + +Jetzt hast du drei Links, einen für jeden Status: Füge sie in deinem liebsten Feedreader hinzu. + +Du kannst auch definieren wie viele Artikel du in deinem RSS Feed (Standardwert: 50) haben willst. + +Benutzer-Informationen +---------------------- + +Du kannst deinen Namen ändern, deine E-Mail-Adresse und die Zwei-Faktor-Authentifizierung aktivieren. + +Zwei-Faktor-Authentifizierung +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Die Zwei-Faktor-Authentifizierung (2FA) dient dem Identitätsnachweis eines Nutzers mittels der + Kombination zweier verschiedener und insbesondere unabhängiger Komponenten (Faktoren). + +https://de.wikipedia.org/wiki/Zwei-Faktor-Authentifizierung + +Wenn du 2FA aktivierst, erhälst du jedes Mal, wenn du dich bei wallabag einloggen willst, einen Code per +Mail. Du musst den Code in das folgende Formular eingeben. + +.. image:: ../../img/user/2FA_form.png + :alt: Zwei-Faktor-Authentifizierung + :align: center + +Wenn du nicht jedes Mal, wenn du dich einloggen willst, einen Code zugesendet bekommen möchtest, kannst du +die Checkbox ``Ich bin an einem persönlichen Computer`` anhaken: wallabag wird sich an dich für 15 Tage +erinnern. + +Passwort +-------- + +Du kannst dein Passwort hier ändern (8 Zeichen Minimum). + +Tagging-Regeln +-------------- + +Wenn du automatisch einen Tag zu einem neuen Artikel zuweisen lassen möchtest, ist dieser Teil der +Konfiguration, was du suchst. + +Was ist mit Tagging-Regeln gemeint? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Dies sind Regeln, die von wallabag genutzt werden, um neue Artikel automatisch zu taggen +Jedes Mal, wenn ein neuer Artikel hinzugefügt wird, werden alle Tagging-Regeln genutzt, um deine +konfigurierten Tags hinzuzufügen, folglich um dir den Aufwand zu sparen, die Artikel manuell einzuteilen. + +Wie benutze ich sie? +~~~~~~~~~~~~~~~~~~~~ + +Nehmen wir an, du möchtest neuen Artikeln einen Tag *schnell gelesen*, wenn du die Lesezeit kleiner als +3 Minuten ist. +In diesem Fall solltest du in das Regelfeld "readingTime <= 3" eintragen und *schnell gelesen* in das Tags-Feld. +Mehrere Tags können gleichzeitig hinzugefügt werden, wenn man sie mit einem Komma trennt: +*schnell gelesen, Pflichtlektüre*. +Komplexe Regeln können mit vordefinierten Operatoren geschrieben werden: +Wenn *readingTime >= 5 AND domainName = "github.com"*, dann tagge als *lange zu lesen, github*. + +Welche Variablen und Operatoren kann ich zum Regeln schreiben nutzen? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Die folgenden Variabel und Operatoren können genutzt werden, um Tagging-Regeln zu erstellen: + +=========== ============================================== ======== ========== +Variable Bedeutung Operator Bedeutung +----------- ---------------------------------------------- -------- ---------- +title Titel des Artikels <= Kleiner gleich als… +url URL des Artikels < Kleiner als… +isArchived Ob der Artikel archiviert ist oder nicht => Größer gleich als… +isStarred Ob der Artikel favorisiert ist oder nicht > Größer als… +content Inhalt des Eintrags = Gleich zu… +language Sprache des Eintrags != Nicht gleich zu… +mimetype MIME-Typ des Eintrags OR Eine Regel oder die andere +readingTime Die geschätzte Lesezeit in Minuten AND Eine Regel und die andere +domainName Der Domain-Name des Eintrags matches Testet, dass ein Feld einer Suche (unabhängig von Groß- und Kleinschreibung) übereinstimmt. Z.B.: title matches "Fußball" +=========== ============================================== ======== ========== diff --git a/docs/de/user/create_account.rst b/docs/de/user/create_account.rst new file mode 100644 index 00000000..ce1b02a4 --- /dev/null +++ b/docs/de/user/create_account.rst @@ -0,0 +1,25 @@ +Account erstellen +================= + +Klicke auf der Loginseite auf den ``Registrieren`` Button- + +.. image:: ../../img/user/registration_form.png + :alt: Registrierungsformular + :align: center + +Du musst das Formular ausfüllen. Bitte stelle sicher, dass du eine gültige +E-Mail-Adresse eingibst, wir werden dir eine Aktivierungsmail schicken. + +.. image:: ../../img/user/sent_email.png + :alt: E-Mail wurde gesendet, um Account zu aktivieren + :align: center + +Überprüfge deinen Posteingang, du hast jetzt eine neue Mail mit einem Link wie diesen +``http://wallabag/register/confirm/Ba19wokGovN-DdBQNfg4YgRkUQWRP4-k2g0Bk-hBTX4``. +Klicke auf den Link, um deinen Account zu aktivieren. + +Dein Account ist nun aktiviert. + +.. image:: ../../img/user/activated_account.png + :alt: Willkommen! + :align: center diff --git a/docs/de/user/download_articles.rst b/docs/de/user/download_articles.rst new file mode 100644 index 00000000..6f5384b2 --- /dev/null +++ b/docs/de/user/download_articles.rst @@ -0,0 +1,17 @@ +Artikel herunterladen +===================== + +Du kannst jeden Artikel in verschiedenen Formaten herunterladen: ePUB, MOBI, PDF, XML, JSON, CSV. + +In der Artikelansicht, klickst du auf dieses Icon in der Seitenleiste: + +.. image:: ../../img/user/download_article.png + :alt: Artikel herunterladen + :align: center + +Du kannst auch eine ganze Kategorie (ungelesen, Favoriten, Archiv) in diesen Formaten herunterladen. +Zum Beispiel, in der Ansicht **Ungelesen**, klickst du auf das Icon in der oberen Leiste: + +.. image:: ../../img/user/download_articles.png + :alt: Artikel herunterladen + :align: center diff --git a/docs/de/user/errors_during_fetching.rst b/docs/de/user/errors_during_fetching.rst new file mode 100644 index 00000000..b8e3e999 --- /dev/null +++ b/docs/de/user/errors_during_fetching.rst @@ -0,0 +1,28 @@ +Fehler während des Artikelladens +================================ + +Warum schlägt das Laden eines Artikels fehl? +-------------------------------------------- + +Das kann verschiedene Ursachen haben: + +- Netzwerkprobleme +- wallabag kann den Inhalt aufgrund der Websitestruktur nicht laden + +Wie kann ich helfen das zu beheben? +----------------------------------- + +- `indem du uns eine Mail mit der URL des Artikels sendest `_ +- indem du versuchst das Laden des Artikels durch Erstellen einer Datei für den Artikel + selbst zu beheben + Du kannst `dieses Tool `__ nutzen. + +Wie kann ich versuchen, einen Artikel erneut zu laden? +------------------------------------------------------ + +Wenn wallabag beim Laden eines Artikels fehlschlägt, kannst du auf den erneut laden Button +klicken (der dritte in dem unteren Bild). + +.. image:: ../../img/user/refetch.png + :alt: Inhalt neu laden + :align: center diff --git a/docs/de/user/faq.rst b/docs/de/user/faq.rst new file mode 100644 index 00000000..1a199c1c --- /dev/null +++ b/docs/de/user/faq.rst @@ -0,0 +1,45 @@ +Häufig gestellte Fragen +========================== + +Während der Installation sehe ich den Fehler ``Error Output: sh: 1: @post-cmd: not found`` +------------------------------------------------------------------------------------------ + +Es scheint, dass du ein Problem bei deiner ``composer`` Installation hast. Versuche es zu deinstallieren und neu zu installieren. + +`Lies die Dokumentation über composer, um zu erfahren wie es installiert wird +`__. + +Ich kann das Registrierungsformular nicht validieren +---------------------------------------------------- + +Stelle sicher, dass alle Felder ausgefüllt sind: + +* valide E-Mail-Adresse +* das gleiche Passwort in zwei Feldern + +Ich erhalte meine Aktivierungsmail nicht +---------------------------------------- + +Bist du sicher, dass deine eingegebene E-Mail-Adresse korrekt war? Hast du deinen Spamordner überprüft? + +Wenn du dann immer noch nicht deine Aktivierungsmail siehst, stelle bitte sicher, dass du einen MTA +korrekt installiert und eingerichtet hast. Prüfe, dass deine Firewallregel existiert, z.B. für firewalld: + +:: + firewall-cmd --permanent --add-service=smtp + firewall-cmd --reload + +Schließlich, falls du SELinux aktiviert hast, setze folgende Regel: + +``setsebool -P httpd_can_sendmail 1`` + +Wenn ich den Aktivierungslink klicke, bekomme ich die Nachricht ``Der Nutzer mit dem Bestätigungstoken "DtrOPfbQeVkWf6N" existiert nicht`` +------------------------------------------------------------------------------------------------------------------------------------------ + +Du hast deinen Account schon aktiviert oder die URL der Aktivierungsmail ist falsch. + +Ich habe mein Passwort vergessen +-------------------------------- + +Du kannst dein Passwort zurücksetzen, indem du auf den Link ``Kennwort vergessen?`` auf der Loginseite klickst. Fülle dann das Formular mit deiner E-Mail-Adresse oder deinem Nutzernamen aus +und du wirst eine E-Mail zum Passwort zurücksetzen erhalten. diff --git a/docs/de/user/filters.rst b/docs/de/user/filters.rst new file mode 100644 index 00000000..c9cda6b6 --- /dev/null +++ b/docs/de/user/filters.rst @@ -0,0 +1,49 @@ +Filter +====== + +Um Artikel leichter zu erreichen, kannst du sie filtern. +Klicke auf das dritte Symbol in der oberen Leiste. + +.. image:: ../../img/user/topbar.png + :alt: Obere Leiste + :align: center + +Alle diese Filter können kombiniert werden. + +.. image:: ../../img/user/filters.png + :alt: Kombiniere alle Filter + :align: center + +Status +------ + +Nutze die Checkboxen, um einen archivierten oder favorisierten Artikel zu finden. + +Vorschaubild +--------------- + +Hake diesen Filter an, wenn du Artikel mit einem Vorschaubild erhalten willst. + +Sprache +------- + +wallabag (via graby) kann die Artikelsprache erkennen. Es ist einfach für dich, Artikel +in einer bestimmten Sprache zu filtern. + +Lesezeit +-------- + +wallabag schätzt wieviel Zeit du brauchst, um einen Artikel zu lesen. Mit diesem Filter +kannst du zum Beispiel Artikel mit einer Lesezeit zwischen 2 und 5 Minuten finden. + +Domainname +---------- + +Dank dieses Filters, kannst ud Artikel von der gleichen Domain finden. +Zum Beispiel tippst du in diesem Feld ``bbc.co.uk``, um Artikel dieser Website zu finden. + +Erstellungsdatum +---------------- + +Wenn du Artikel speicherst, merkt sich wallabag das aktuelle Datum. So praktisch, um Aritkel, die +zwischen dem 1. und 31. Januar geschrieben sind, zu finden. diff --git a/docs/de/user/first_article.rst b/docs/de/user/first_article.rst new file mode 100644 index 00000000..b8ceda07 --- /dev/null +++ b/docs/de/user/first_article.rst @@ -0,0 +1,68 @@ +Speichere deinen ersten Artikel +=============================== + +Der Hauptzweck von wallabag ist es Webartikel zu speichern. Du hast viele Wege das zu tun. + +.. note:: + + Eine Schnellstartanleitung wird in der Anwendung angezeigt bis du deinen ersten + Artikel gespeichert hast. + +Durch Nutzung eines Bookmarklets +-------------------------------- + +Auf der ``How-To`` Seite, hast du einen Reiter ``Bookmarklet``. Ziehe und lasse den +``bag it!`` Link in die Lesezeichenleiste deines Browser los. + +Jetzt kannst du immer wenn du einen Artikel im Web liest und ihn du ihn speichern +willst, klicke auf den ``bag it!`` Link in deiner Lesezeichenleiste. Der Artikel +wird gespeichert. + +Durch Nutzung des klassischen Formulars +--------------------------------------- + +In der oberen Leiste auf deinem Bildschirm, hast du drei Icons. Mit dem ersten, einem +Pluszeichen, kannst du einfach neue Artikel speichern. + +.. image:: ../../img/user/topbar.png + :alt: obere Leiste + :align: center + +Klick darauf, um ein neues Feld anzeigen zu lassen, füge deine Artikel URL ein und +drücke die ``Enter`` Taste. Der Artikel wird gespeichert. + +Durch Nutzung eines Browser Add-ons +----------------------------------- + +Firefox +~~~~~~~ + +*Dieses Addon ist noch nicht für wallbag v2 verfügbar*. + +Chrome +~~~~~~ + +*Dieses Addon ist noch nicht für wallbag v2 verfügbar*. + +Durch Nutzung deiner Smartphone App +----------------------------------- + +Android +~~~~~~~ + +*Diese Applikation ist noch nicht für wallbag v2 verfügbar*. + +Firefox OS +~~~~~~~~~~ + +*Diese Applikation ist noch nicht für wallbag v2 verfügbar*. + +Windows Phone +~~~~~~~~~~~~~ + +*Diese Applikation ist noch nicht für wallbag v2 verfügbar*. + +iOS +~~~ + +*Diese Applikation ist noch nicht für wallbag v2 verfügbar*. diff --git a/docs/de/user/import.rst b/docs/de/user/import.rst new file mode 100644 index 00000000..ecd3134b --- /dev/null +++ b/docs/de/user/import.rst @@ -0,0 +1,46 @@ +Migration von einem Drittanbieter +================================= + +Von Pocket +----------- + +Erstelle eine neue Applikation in Pocket +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Um deine Daten von Pocket zu importieren, nutzen wir die Pocket API. Du musst +eine neue Applikation auf ihrer Entwicklerwebsite erstellen, um fortzufahren. + +* Erstelle eine neue Applikation `auf der Entwicklerwebsite `_ +* Fülle die erforderlichen Felder aus: Name, Beschreibung, Berechtigungen (nur **abrufen**), Plattform + (**web**), akzeptiere die Nutzungsbedingungen und reiche deine neue Applikation ein + +Pocket wird dir einen **Consumer Key** geben (z.B. `49961-985e4b92fe21fe4c78d682c1`). +Du musst den ``pocket_consumer_key`` in dem Abschnitt ``Import`` in dem ``Interne Einstellungen`` Menü +konfigurieren. + +Jetzt ist alles in Ordnung, um von Pocket zu migrieren. + +Importiere deine Daten in wallabag 2.x +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Klicke auf den ``Importieren`` Link im menü, auf ``Inhalte importieren`` in dem Pocketabschnitt und +dann auf ``Verbinde mit Pocket und importieren Daten``. + +Du musst wallabag erlauben, mit deinem Pocketaccount zu interagieren. +Deine Daten werden importiert. Datenimport kann ein sehr anspruchsvoller Prozess für deinen Server +sein (wir müssen daran arbeiten, um diesen Import zu verbessern). + +Von Instapaper +-------------- + +*Funktion noch nicht implementiert in wallabag v2.* + +Von Readability +--------------- + +*Funktion noch nicht implementiert in wallabag v2.* + +Von einer HTML oder JSON Datei +------------------------------ + +*Funktion noch nicht implementiert in wallabag v2.* diff --git a/docs/de/user/installation.rst b/docs/de/user/installation.rst new file mode 100644 index 00000000..0fc2f447 --- /dev/null +++ b/docs/de/user/installation.rst @@ -0,0 +1,326 @@ +Installation von wallabag +========================= + +Voraussetzungen +--------------- + +wallabag ist kompatibel mit PHP >= 5.5, inkl. PHP 7. + +Du benötigst die folgenden Extensions damit wallabag funktioniert. Einige von diesen sind vielleicht schon in deiner Version von PHP aktiviert, somit musst du eventuell +nicht alle folgenden Pakete installieren. + +- php-session +- php-ctype +- php-dom +- php-hash +- php-simplexml +- php-json +- php-gd +- php-mbstring +- php-xml +- php-tidy +- php-iconv +- php-curl +- php-gettext +- php-tokenizer + +wallabag nutzt PDO, um sich mit der Datenbank zu verbinden, darum benötigst du eines der folgenden Komponenten: + +- pdo_mysql +- pdo_sqlite +- pdo_pgsql + +und dessen dazugehörigen Datenbankserver. + +Installation +------------ + +Auf einem dedizierten Webserver (empfohlener Weg) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +wallabag nutzt eine große Anzahl an Bibliotheken, um zu funktionieren. Diese Bibliotheken müssen mit einem Tool namens Composer installiert werden. Du musst es installieren sofern du es bisher noch nicht gemacht hast. + +Composer installieren: + +:: + + curl -s http://getcomposer.org/installer | php + +Du kannst eine spezifische Anleitung `hier `__ finden: + +Um wallabag selbst zu installieren, musst du die folgenden Kommandos ausführen: + +:: + + git clone https://github.com/wallabag/wallabag.git + cd wallabag + git checkout 2.0.6 + SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist + php bin/console wallabag:install --env=prod + +Um PHPs eingebauten Server zu starten und zu testen, ob alles korrekt installiert wurde, kannst du folgendes Kommando ausführen: + +:: + + php bin/console server:run --env=prod + +Und wallabag unter http://deineserverip:8000 erreichen + +.. tip:: + + Um Parameter mit Umgebungsvariable zu definieren, musst du die Variable mit dem ``SYMFONY__`` Präfix setzen. Zum Beispiel ``SYMFONY__DATABASE_DRIVER``. Du kannst einen Blick die `Symfony Dokumentation `__ werfen. + +Auf einem geteilten Webhosting +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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``. + +.. caution:: Mit diesem Paket überprüft wallabag nicht die von der Applikation gebrauchten Exentions (diese Tests werden während ``composer install`` durchgeführt wenn du einen dedizierten Webserver hast, siehe oben). + +Führe dieses Kommando aus, um das neueste Paket herunterzuladen und zu entpacken: + +.. code-block:: bash + + wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package + +Jetzt lese die Dokumentation, um einen Virtualhost zu erstellen, dann greife auf dein wallabag zu. +Wenn du die Datenbankkonfiguration eingestellt hast, MySQL oder PostgreSQL zu nutzen, musst du einen Nutzer über das folgende Kommando erstellen ``php bin/console wallabag:install --env=prod``. + +Installation mit Docker +------------------------ + +Wir stellen ein Docker Image zu Verfügung, um wallabag einfach zu installieren. Schaue in unser Repository in unserem `Docker Hub `__, um mehr Informationen zu erhalten. + +Kommando, um den Container zu starten +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: bash + + docker pull wallabag/wallabag + +Virtualhosts +------------ + +Konfiguration von Apache +~~~~~~~~~~~~~~~~~~~~~~~ + +Angenommen du willst wallabag in das Verzeichnis ``/var/www/wallabag`` installieren und du willst PHP als Apache Modul nutzen, dann ist hier ein vhost für wallabag: + +:: + + + ServerName domain.tld + ServerAlias www.domain.tld + + DocumentRoot /var/www/wallabag/web + + AllowOverride None + Order Allow,Deny + Allow from All + + + Options -MultiViews + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ app.php [QSA,L] + + + + # uncomment the following lines if you install assets as symlinks + # or run into problems when compiling LESS/Sass/CoffeScript assets + # + # Options FollowSymlinks + # + + # optionally disable the RewriteEngine for the asset directories + # which will allow apache to simply reply with a 404 when files are + # not found instead of passing the request into the full symfony stack + + + RewriteEngine Off + + + ErrorLog /var/log/apache2/wallabag_error.log + CustomLog /var/log/apache2/wallabag_access.log combined + + +Nach dem du Apache neugeladen oder neugestartet hast, solltest du nun wallabag unter http://domain.tld erreichen. + +Konfiguration von Nginx +~~~~~~~~~~~~~~~~~~~~~~~ + +Angenommen du willst wallabag in das Verzeichnis ``/var/www/wallabag`` installieren, dann ist hier ein Rezept für wallabag: + +:: + + server { + server_name domain.tld www.domain.tld; + root /var/www/wallabag/web; + + location / { + # try to serve file directly, fallback to app.php + try_files $uri /app.php$is_args$args; + } + location ~ ^/app\.php(/|$) { + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_split_path_info ^(.+\.php)(/.*)$; + include fastcgi_params; + # When you are using symlinks to link the document root to the + # current version of your application, you should pass the real + # application path instead of the path to the symlink to PHP + # FPM. + # Otherwise, PHP's OPcache may not properly detect changes to + # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126 + # for more information). + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root; + # Prevents URIs that include the front controller. This will 404: + # http://domain.tld/app.php/some-path + # Remove the internal directive to allow URIs like this + internal; + } + + error_log /var/log/nginx/wallabag_error.log; + access_log /var/log/nginx/wallabag_access.log; + } + +Nach dem neuladen oder neustarten von nginx, solltest du nun wallabag unter http://domain.tld erreichen. + +.. tip:: + + When you want to import large file into wallabag, you need to add this line in your nginx configuration ``client_max_body_size XM; # allows file uploads up to X megabytes``. + Wenn du eine große Datei in wallabag importieren willst, solltest du diese Zeile zu deiner nginx Konfiguration hinzufügen ``client_max_body_size XM; # allows file uploads up to X megabytes``. + +Konfiguration von lighttpd +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Angenommen du willst wallabag in das Verzeichnis ``/var/www/wallabag`` installieren, dann ist hier ein Rezept für wallabag (bearbeite deine ``lighttpd.conf`` und füge die Konfiguration dort ein): + +:: + + server.modules = ( + "mod_fastcgi", + "mod_access", + "mod_alias", + "mod_compress", + "mod_redirect", + "mod_rewrite", + ) + server.document-root = "/var/www/wallabag/web" + server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) + server.errorlog = "/var/log/lighttpd/error.log" + server.pid-file = "/var/run/lighttpd.pid" + server.username = "www-data" + server.groupname = "www-data" + server.port = 80 + server.follow-symlink = "enable" + index-file.names = ( "index.php", "index.html", "index.lighttpd.html") + url.access-deny = ( "~", ".inc" ) + static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) + compress.cache-dir = "/var/cache/lighttpd/compress/" + compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" ) + include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port + include_shell "/usr/share/lighttpd/create-mime.assign.pl" + include_shell "/usr/share/lighttpd/include-conf-enabled.pl" + dir-listing.activate = "disable" + + url.rewrite-if-not-file = ( + "^/([^?]*)(?:\?(.*))?" => "/app.php?$1&$2", + "^/([^?]*)" => "/app.php?=$1", + ) + +Rechte, um das Projektverzeichnis zu betreten +--------------------------------------------- + +Testumgebung +~~~~~~~~~~~~ + +Wenn wir nur wallabag testen wollen, führen wir nur das Kommando ``php bin/console server:run --env=prod`` aus, um unsere wallabag Instanz zu starten und alles wird geschmeidig laufen, weil der Nutzer, der das Projekt gestartet hat, den aktuellen Ordner ohne Probleme betreten kann. + +Produktionsumgebung +~~~~~~~~~~~~~~~~~~~ + +Sobald wir Apache oder Nginx nutzen, um unsere wallabag Instanz zu erreichen, und nicht das Kommando ``php bin/console server:run --env=prod`` nutzen, sollten wir dafür sorgen, die Rechte vernünftig zu vergeben, um die Ordner des Projektes zu schützen. + +Um dies zu machen, muss der Ordner, bekannt als ``DocumentRoot`` (bei Apache) oder ``root`` (bei Nginx), von dem Apache-/Nginx-Nutzer zugänglich sein. Sein Name ist meist ``www-data``, ``apache`` oder ``nobody`` (abhängig vom genutzten Linuxsystem). + +Der Ordner ``/var/www/wallabag/web`` musst dem letztgenannten zugänglich sein. Aber dies könnte nicht genug sein, wenn wir nur auf diesen Ordner achten, weil wir eine leere Seite sehen könnten oder einen Fehler 500, wenn wir die Homepage des Projekt öffnen. + +Dies kommt daher, dass wir die gleichen Rechte dem Ordner ``/var/www/wallabag/var`` geben müssen, so wie wir es für den Ordner ``/var/www/wallabag/web`` gemacht haben. Somit beheben wir das Problem mit dem folgenden Kommando: + +.. code-block:: bash + + chown -R www-data:www-data /var/www/wallabag/var + +Es muss analog für die folgenden Ordner ausgeführt werden + +* /var/www/wallabag/bin/ +* /var/www/wallabag/app/config/ +* /var/www/wallabag/vendor/ +* /var/www/wallabag/data/ + +durch Eingabe der Kommandos + +.. code-block:: bash + + chown -R www-data:www-data /var/www/wallabag/bin + chown -R www-data:www-data /var/www/wallabag/app/config + chown -R www-data:www-data /var/www/wallabag/vendor + chown -R www-data:www-data /var/www/wallabag/data/ + +ansonsten wirst du früher oder später folgenden Fehlermeldung sehen: + +.. code-block:: bash + + Unable to write to the "bin" directory. + file_put_contents(app/config/parameters.yml): failed to open stream: Permission denied + file_put_contents(/.../wallabag/vendor/autoload.php): failed to open stream: Permission denied + +Zusätzliche Regeln für SELinux +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Wenn SELinux in deinem System aktiviert ist, wirst du zusätzliche Kontexte konfigurieren müssen damit wallabag ordentlich funktioniert. Um zu testen, ob SELinux aktiviert ist, führe einfach folgendes aus: + +``getenforce`` + +Dies wird ``Enforcing`` ausgeben, wenn SELinux aktiviert ist. Einen neuen Kontext zu erstellen, erfordert die folgende Syntax: + +``semanage fcontext -a -t `` + +Zum Beispiel: + +``semanage fcontext -a -t httpd_sys_content_t "/var/www/wallabag(/.*)?"`` + +Dies wird rekursiv den httpd_sys_content_t Kontext auf das wallabag Verzeichnis und alle darunterliegenden Dateien und Ordner anwenden. Die folgenden Regeln werden gebraucht: + ++-----------------------------------+----------------------------+ +| Vollständiger Pfad | Kontext | ++===================================+============================+ +| /var/www/wallabag(/.*)? | ``httpd_sys_content_t`` | ++-----------------------------------+----------------------------+ +| /var/www/wallabag/data(/.*)? | ``httpd_sys_rw_content_t`` | ++-----------------------------------+----------------------------+ +| /var/www/wallabag/var/logs(/.*)? | ``httpd_log_t`` | ++-----------------------------------+----------------------------+ +| /var/www/wallabag/var/cache(/.*)? | ``httpd_cache_t`` | ++-----------------------------------+----------------------------+ + +Nach dem diese Kontexte erstellt wurden, tippe das folgende, um deine Regeln anzuwenden: + +``restorecon -R -v /var/www/wallabag`` + +Du kannst deine Kontexte in einem Verzeichnis überprüfen, indem du ``ls -lZ`` tippst und alle deine aktuellen Regeln mit ``semanage fcontext -l -C`` überprüfst. + +Wenn du das vorkonfigurierte latest-v2-package installierst, dann ist eine weitere Regel während der Installation nötig: + +``semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/wallabag/var"`` + +Nachdem du erfolgreich dein wallabag erreichst und die Installation fertiggestellt hast, kann dieser Kontext entfernt werden: + +:: + + semanage fcontext -d -t httpd_sys_rw_content_t "/var/www/wallabag/var" + retorecon -R -v /var/www/wallabag/var diff --git a/docs/de/user/login.rst b/docs/de/user/login.rst new file mode 100644 index 00000000..cf1cdc4c --- /dev/null +++ b/docs/de/user/login.rst @@ -0,0 +1,13 @@ +Login +===== + +Dein Account ist nun aktiviert, Glückwünsch! + +Um dich bei wallabag einzuloggen, fülle das Formular auf der Loginseite aus. + +Wenn du an deinem persönlichen Computer arbeitest und verbunden bleiben willst, +kannst du die Checkbox ``Angemeldet bleiben`` anhaken: wallabag wird sich für ein Jahr an deinen Login erinnern. + +.. image:: ../../img/user/login_form.png + :alt: Loginformular + :align: center diff --git a/docs/de/user/migration.rst b/docs/de/user/migration.rst new file mode 100644 index 00000000..bc8a61b0 --- /dev/null +++ b/docs/de/user/migration.rst @@ -0,0 +1,62 @@ +Migration von v1 oder v2 +======================== + +Von wallabag 1.x +----------------- + +Wenn du bisher wallabag v1.x genutzt hast, musst du deine Daten exportieren bevor du zu wallabag v2.x migrierst, weil die Applikation und ihre Datenbank sich stark geändert haben. In deiner alten wallabag Installation kannst du deine Daten auf der Konfigurationsseite exportieren. + +.. image:: ../../img/user/export_v1.png + :alt: Export von wallabag v1 + :align: center + +.. note:: + Wenn du mehrere Accounts auf der gleichen Instanz von wallabag hast, muss jeder Nutzer von v1 exportieren und in v2 seine Daten importieren. + +.. note:: + Wenn du Probleme während des Exports oder Imports hast, scheue dich nicht davor `nach Hilfe zu fragen `__. + +Wenn du eine JSON Datei mit deinen Artikeln erhalten hast, kannst du wallabag v2 installieren falls benötigt durch Befolgen `der Standardprozedur `__. + +Nachdem du einen Nutzerkonto auf deiner neuen wallabag v2 Instanz eingerichtet hast, kannst du zu dem Abschnitt `Import` springen und `Import von wallabag v1` auswählen. Wähle deine JSON Datei aus und lade sie hoch. + +.. image:: ../../img/user/import_wallabagv1.png + :alt: Import von wallabag v1 + :align: center + +Import via command-line interface (CLI) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Wenn du CLI Zugang zu deinem Webserver hast, kannst du dieses Kommando ausführen, um deine Aritkel vom wallabag v1 Export zu importieren: + +:: + + bin/console wallabag:import-v1 1 ~/Downloads/wallabag-export-1-2016-04-05.json --env=prod + +Bitte ersetze folgende Werte: + +* ``1`` ist die Nutzer ID in der Databank (Die ID von dem ersten erstellten Nutzer in wallabag ist 1) +* ``~/Downloads/wallabag-export-1-2016-04-05.json`` ist der Pfad zu deinem wallabag v1 Export + +Du wirst eine solche Ausgabe erhalten: + +:: + + Start : 05-04-2016 11:36:07 --- + 403 imported + 0 already saved + End : 05-04-2016 11:36:09 --- + +Von wallabag 2.x +---------------- + +In der vorherigen wallabag Instanz, gehe zu `Alle Artikel` und exportiere diese Artikel als JSON. + +.. image:: ../../img/user/export_v2.png + :alt: Export von wallabag v2 + :align: center + +In deiner neuen wallabag Instanz erstellst du ein Nutzerkonto und klickst auf den Link im Menü, um den Import fortzusetzen. Wähle Import von wallabag v2 aus und lade deine JSON Datei hoch. + +.. note:: + Wenn du Probleme während des Exports oder Imports hast, scheue dich nicht davor `nach Hilfe zu fragen `__. diff --git a/docs/de/user/tags.rst b/docs/de/user/tags.rst new file mode 100644 index 00000000..8ddc0f40 --- /dev/null +++ b/docs/de/user/tags.rst @@ -0,0 +1,2 @@ +Tags +==== \ No newline at end of file diff --git a/docs/de/user/upgrade.rst b/docs/de/user/upgrade.rst new file mode 100644 index 00000000..13e3104f --- /dev/null +++ b/docs/de/user/upgrade.rst @@ -0,0 +1,32 @@ +Wallabag updaten +================ + +Update auf einem dedizierten Webserver +-------------------------------------- + +Das neueste Release ist auf https://www.wallabag.org/pages/download-wallabag.html veröffentlicht. Um deine wallabag Installation auf die neueste Version upzudaten, führe die folgenden Kommandos in deinem wallabag Ordner aus (ersetze ``2.0.3`` mit der neuesten Releasenummer): + +:: + + git fetch origin + git fetch --tags + git checkout 2.0.3 + SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist + php bin/console cache:clear --env=prod + +Update auf einem Shared Webhosting +---------------------------------- + +Sichere deine ``app/config/parameters.yml`` Datei. + +Lade das neueste Release von wallabag herunter: + +.. code-block:: bash + + wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package + +Entpacke das Archiv in deinen wallabag Ordner und ersetze ``app/config/parameters.yml`` mit deiner Datei. + +Wenn du SQLite nutzt, musst auch das ``data/`` Verzeichnis in die neue Installation kopieren. + +Leere den ``var/cache`` Ordner. diff --git a/docs/en/user/android.rst b/docs/en/user/android.rst index c13cf031..4271f037 100644 --- a/docs/en/user/android.rst +++ b/docs/en/user/android.rst @@ -13,61 +13,61 @@ Steps to configure your app When you first start the app, you see the welcome screen, where you are adviced to configure the app for your wallabag instance at first. -.. image:: ../../img/user/android_welcome_screen.de.png +.. image:: ../../img/user/android_welcome_screen.en.png :alt: Welcome screen :align: center Just confirm that message and you get redirected to the settings screen. -.. image:: ../../img/user/android_configuration_screen.de.png +.. image:: ../../img/user/android_configuration_screen.en.png :alt: Settings screen :align: center Fill in your wallabag data. You need to enter your wallabag address. It is important that this URL does not end with a slash. Also add your wallabag credentials to the user name and password field. -.. image:: ../../img/user/android_configuration_filled_in.de.png +.. image:: ../../img/user/android_configuration_filled_in.en.png :alt: Filled in settings :align: center After you have filled in your data, push the button Connection test and wait for the test to finish. -.. image:: ../../img/user/android_configuration_connection_test.de.png +.. image:: ../../img/user/android_configuration_connection_test.en.png :alt: Connection test with your wallabag data :align: center The connection test shall finish with success. If not, you need to fix this first until you proceed. -.. image:: ../../img/user/android_configuration_connection_test_success.de.png +.. image:: ../../img/user/android_configuration_connection_test_success.en.png :alt: Connection test successful :align: center After the connection test was successful, you can push the button to get your feed credentials. The app now tries to login to your wallabag instance and get the user id and the corresponding token for the feeds. -.. image:: ../../img/user/android_configuration_get_feed_credentials.de.png +.. image:: ../../img/user/android_configuration_get_feed_credentials.en.png :alt: Getting the feed credentials :align: center When the process of getting your feed credentials finishes with success you see a toast message that the user id and the token were automatically filled in to the form. -.. image:: ../../img/user/android_configuration_feed_credentials_automatically_filled_in.de.png +.. image:: ../../img/user/android_configuration_feed_credentials_automatically_filled_in.en.png :alt: Getting feed credentials successful :align: center Now you need to scroll to the bottom of the settings menu. Of course you can adjust the given settings to your needs. Finish the configuration of your app with pushing the save button. -.. image:: ../../img/user/android_configuration_scroll_bottom.de.png +.. image:: ../../img/user/android_configuration_scroll_bottom.en.png :alt: Bottom of the settings screen :align: center After hitting the save button, you get the following screen. The app proposes to initiate a syncronisation process to update your feeds of articles. It is recommended to acknowledge this action and press Yes. -.. image:: ../../img/user/android_configuration_saved_feed_update.de.png +.. image:: ../../img/user/android_configuration_saved_feed_update.en.png :alt: Settings saved the first time :align: center Finally after the syncronisation finished successfully, you are presented the list of unread articles. -.. image:: ../../img/user/android_unread_feed_synced.de.png +.. image:: ../../img/user/android_unread_feed_synced.en.png :alt: Filled article list cause feeds successfully syncronized :align: center diff --git a/docs/en/user/configuration.rst b/docs/en/user/configuration.rst index f681d874..f4c55dea 100644 --- a/docs/en/user/configuration.rst +++ b/docs/en/user/configuration.rst @@ -108,7 +108,7 @@ Variable Meaning Operator Meaning title Title of the entry <= Less than… url URL of the entry < Strictly less than… isArchived Whether the entry is archived or not => Greater than… -isStared Whether the entry is starred or not > Strictly greater than… +isStarred Whether the entry is starred or not > Strictly greater than… content The entry's content = Equal to… language The entry's language != Not equal to… mimetype The entry's mime-type OR One rule or another diff --git a/docs/en/user/faq.rst b/docs/en/user/faq.rst index 1e36dc26..61303604 100644 --- a/docs/en/user/faq.rst +++ b/docs/en/user/faq.rst @@ -1,26 +1,39 @@ Frequently Asked Questions ========================== -During the installation, I've got this error ``Error Output: sh: 1: @post-cmd: not found`` ------------------------------------------------------------------------------------------- +During the installation, I got the error ``Error Output: sh: 1: @post-cmd: not found`` +-------------------------------------------------------------------------------------- It seems you have a problem with your ``composer`` installation. Try to uninstall and reinstall it. `Read the documentation about composer to know how to install it `__. -I can't valid the registration form ------------------------------------ +I can't validate the registration form +-------------------------------------- -Make sure that all fields are well filled: +Ensure that all fields are properly filled: * valid email address * same passwords in two fields -I don't receive my activation email ------------------------------------ +I'm not receiving my activation email +------------------------------------- -Are you sure your email address was correct? Did you check your spams folder? +Are you sure your email address was correct? Did you check your spam folder? + +If you still don't see the activation email, please ensure that you have +installed and properly configured a mail transfer agent. Be sure to include a +firewall rule for SMTP. E.g., if using firewalld: + +:: + + firewall-cmd --permanent --add-service=smtp + firewall-cmd --reload + +Lastly, if you have SELinux enabled, set the following rule: + +``setsebool -P httpd_can_sendmail 1`` When I click on the activation link, I've got this message: ``The user with confirmation token "DtrOPfbQeVkWf6N" does not exist``. ---------------------------------------------------------------------------------------------------------------------------------- diff --git a/docs/en/user/installation.rst b/docs/en/user/installation.rst index 6d804304..0aa391e8 100644 --- a/docs/en/user/installation.rst +++ b/docs/en/user/installation.rst @@ -23,13 +23,13 @@ You'll need the following extensions for wallabag to work. Some of these may alr - php-gettext - php-tokenizer -wallabag uses PDO to connect to database, so you'll need one of: +wallabag uses PDO to connect to the database, so you'll need one of the following: - pdo_mysql - pdo_sqlite - pdo_pgsql -and it's corresponding database server. +and its corresponding database server. Installation ------------ @@ -37,7 +37,7 @@ Installation On a dedicated web server (recommended way) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -wallabag uses a big number of libraries in order to function. These libraries must be installed with a tool called Composer. You need to install it if you don't already have. +wallabag uses a large number of libraries in order to function. These libraries must be installed with a tool called Composer. You need to install it if you have not already done so and be sure to use the 1.2 version (if you already have Composer, run a ``composer selfupdate``). Install Composer: @@ -47,13 +47,13 @@ Install Composer: You can find specific instructions `here `__: -To install wallabag itself, you must run these two commands: +To install wallabag itself, you must run the following commands: :: git clone https://github.com/wallabag/wallabag.git cd wallabag - git checkout 2.0.4 + git checkout 2.0.6 SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist php bin/console wallabag:install --env=prod @@ -67,17 +67,17 @@ And access wallabag at http://yourserverip:8000 .. tip:: - To define parameters with environment variables, you have to set these variables with ``SYMFONY__`` prefix. For example, ``SYMFONY__DATABASE_DRIVER``. You can have a look to the `Symfony documentation `__. + To define parameters with environment variables, you have to set these variables with ``SYMFONY__`` prefix. For example, ``SYMFONY__DATABASE_DRIVER``. You can have a look at `Symfony documentation `__. On a shared hosting ~~~~~~~~~~~~~~~~~~~ -We provide you a package with all dependancies inside. +We provide a package with all dependencies inside. The default configuration uses SQLite for the database. If you want to change these settings, please edit ``app/config/parameters.yml``. We already created a user: login and password are ``wallabag``. -.. caution:: With this package, wallabag don't check mandatory extensions used in the application (theses checks are made during ``composer install`` when you have a dedicated web server, see above). +.. caution:: With this package, wallabag doesn't check for mandatory extensions used in the application (theses checks are made during ``composer install`` when you have a dedicated web server, see above). Execute this command to download and extract the latest package: @@ -85,7 +85,7 @@ Execute this command to download and extract the latest package: wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package -Now, read the following documentation to create your virtual host, then access to your wallabag. +Now, read the following documentation to create your virtual host, then access your wallabag. If you changed the database configuration to use MySQL or PostgreSQL, you need to create a user via this command ``php bin/console wallabag:install --env=prod``. Installation with Docker @@ -151,7 +151,7 @@ After reloading or restarting Apache, you should now be able to access wallabag Configuration on Nginx ~~~~~~~~~~~~~~~~~~~~~~ -Assuming you install wallabag in the ``/var/www/wallabag`` folder, here's the recipe for wallabag : +Assuming you installed wallabag in the ``/var/www/wallabag`` folder, here's the recipe for wallabag : :: @@ -226,7 +226,7 @@ Assuming you install wallabag in the /var/www/wallabag folder, here's the recipe dir-listing.activate = "disable" url.rewrite-if-not-file = ( - "^/([^?])(?:\?(.))?" => "/app.php?$1&$2", + "^/([^?]*)(?:\?(.*))?" => "/app.php?$1&$2", "^/([^?]*)" => "/app.php?=$1", ) @@ -258,7 +258,7 @@ It has to be the same for the following folders * /var/www/wallabag/bin/ * /var/www/wallabag/app/config/ * /var/www/wallabag/vendor/ -* /var/www/wallabag/data/ +* /var/www/wallabag/data/ by entering @@ -269,10 +269,56 @@ by entering chown -R www-data:www-data /var/www/wallabag/vendor chown -R www-data:www-data /var/www/wallabag/data/ -otherwise, sooner or later you will meet this error messages +otherwise, sooner or later you will see these error messages: .. code-block:: bash Unable to write to the "bin" directory. file_put_contents(app/config/parameters.yml): failed to open stream: Permission denied file_put_contents(/.../wallabag/vendor/autoload.php): failed to open stream: Permission denied + +Additional rules for SELinux +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If SELinux is enabled on your system, you will need to configure additional contexts in order for wallabag to function properly. To check if SELinux is enabled, simply enter the following: + +``getenforce`` + +This will return ``Enforcing`` if SELinux is enabled. Creating a new context involves the following syntax: + +``semanage fcontext -a -t `` + +For example: + +``semanage fcontext -a -t httpd_sys_content_t "/var/www/wallabag(/.*)?"`` + +This will recursively apply the httpd_sys_content_t context to the wallabag directory and all underlying files and folders. The following rules are needed: + ++-----------------------------------+----------------------------+ +| Full path | Context | ++===================================+============================+ +| /var/www/wallabag(/.*)? | ``httpd_sys_content_t`` | ++-----------------------------------+----------------------------+ +| /var/www/wallabag/data(/.*)? | ``httpd_sys_rw_content_t`` | ++-----------------------------------+----------------------------+ +| /var/www/wallabag/var/logs(/.*)? | ``httpd_log_t`` | ++-----------------------------------+----------------------------+ +| /var/www/wallabag/var/cache(/.*)? | ``httpd_cache_t`` | ++-----------------------------------+----------------------------+ + +After creating these contexts, enter the following in order to apply your rules: + +``restorecon -R -v /var/www/wallabag`` + +You can check contexts in a directory by typing ``ls -lZ`` and you can see all of your current rules with ``semanage fcontext -l -C``. + +If you're installing the preconfigured latest-v2-package, then an additional rule is needed during the initial setup: + +``semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/wallabag/var"`` + +After you successfully access your wallabag and complete the initial setup, this context can be removed: + +:: + + semanage fcontext -d -t httpd_sys_rw_content_t "/var/www/wallabag/var" + retorecon -R -v /var/www/wallabag/var diff --git a/docs/fr/user/configuration.rst b/docs/fr/user/configuration.rst index 89305998..278f0022 100644 --- a/docs/fr/user/configuration.rst +++ b/docs/fr/user/configuration.rst @@ -110,7 +110,7 @@ Variable Sens Opérateur Sens title Titre de l'article <= Inférieur ou égal à … url URL de l'article < Strictement inférieur à … isArchived Si l'article est archivé ou non => Supérieur ou égal à … -isStared Si l'article est en favori ou non > Strictement supérieur à … +isStarred Si l'article est en favori ou non > Strictement supérieur à … content Le contenu de l'article = Égal à … language La langue de l'article != Différent de … mimetype The type MIME de l'article OR Telle règle ou telle autre règle diff --git a/docs/fr/user/installation.rst b/docs/fr/user/installation.rst index 8f9a7932..069396cc 100644 --- a/docs/fr/user/installation.rst +++ b/docs/fr/user/installation.rst @@ -35,7 +35,7 @@ Installation Sur un serveur dédié (méthode conseillée) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -wallabag utilise un grand nombre de bibliothèques pour fonctionner. Ces bibliothèques doivent être installées à l'aide d'un outil nommé Composer. Vous devez l'installer si ce n'est déjà fait. +wallabag utilise un grand nombre de bibliothèques pour fonctionner. Ces bibliothèques doivent être installées à l'aide d'un outil nommé Composer. Vous devez l'installer si ce n'est déjà fait et vous assurer que vous utilisez bien la version 1.2 (si vous avez déjà Composer, faite un ``composer selfupdate``). Installation de Composer : @@ -51,7 +51,7 @@ Pour installer wallabag, vous devez exécuter ces deux commandes : git clone https://github.com/wallabag/wallabag.git cd wallabag - git checkout 2.0.4 + git checkout 2.0.6 SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist php bin/console wallabag:install --env=prod diff --git a/docs/img/user/android_configuration_connection_test.en.png b/docs/img/user/android_configuration_connection_test.en.png new file mode 100644 index 00000000..479cd09a Binary files /dev/null and b/docs/img/user/android_configuration_connection_test.en.png differ diff --git a/docs/img/user/android_configuration_connection_test_success.en.png b/docs/img/user/android_configuration_connection_test_success.en.png new file mode 100644 index 00000000..840f00cd Binary files /dev/null and b/docs/img/user/android_configuration_connection_test_success.en.png differ diff --git a/docs/img/user/android_configuration_feed_credentials_automatically_filled_in.en.png b/docs/img/user/android_configuration_feed_credentials_automatically_filled_in.en.png new file mode 100644 index 00000000..df071b8b Binary files /dev/null and b/docs/img/user/android_configuration_feed_credentials_automatically_filled_in.en.png differ diff --git a/docs/img/user/android_configuration_filled_in.en.png b/docs/img/user/android_configuration_filled_in.en.png new file mode 100644 index 00000000..368ac515 Binary files /dev/null and b/docs/img/user/android_configuration_filled_in.en.png differ diff --git a/docs/img/user/android_configuration_get_feed_credentials.en.png b/docs/img/user/android_configuration_get_feed_credentials.en.png new file mode 100644 index 00000000..2a8958ff Binary files /dev/null and b/docs/img/user/android_configuration_get_feed_credentials.en.png differ diff --git a/docs/img/user/android_configuration_saved_feed_update.en.png b/docs/img/user/android_configuration_saved_feed_update.en.png new file mode 100644 index 00000000..f1c06f17 Binary files /dev/null and b/docs/img/user/android_configuration_saved_feed_update.en.png differ diff --git a/docs/img/user/android_configuration_screen.en.png b/docs/img/user/android_configuration_screen.en.png new file mode 100644 index 00000000..945fd7c8 Binary files /dev/null and b/docs/img/user/android_configuration_screen.en.png differ diff --git a/docs/img/user/android_configuration_scroll_bottom.en.png b/docs/img/user/android_configuration_scroll_bottom.en.png new file mode 100644 index 00000000..11a6fc5a Binary files /dev/null and b/docs/img/user/android_configuration_scroll_bottom.en.png differ diff --git a/docs/img/user/android_unread_feed_synced.en.png b/docs/img/user/android_unread_feed_synced.en.png new file mode 100644 index 00000000..8451557e Binary files /dev/null and b/docs/img/user/android_unread_feed_synced.en.png differ diff --git a/docs/img/user/android_welcome_screen.en.png b/docs/img/user/android_welcome_screen.en.png new file mode 100644 index 00000000..a3741d50 Binary files /dev/null and b/docs/img/user/android_welcome_screen.en.png differ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e68df9de..38880908 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,24 +1,20 @@ - +> - src/Wallabag/*Bundle/Tests + tests + diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 5202c524..af24e498 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -110,8 +110,8 @@ class WallabagRestController extends FOSRestController $url = $request->request->get('url'); $title = $request->request->get('title'); - $isArchived = (int) $request->request->get('archive'); - $isStarred = (int) $request->request->get('starred'); + $isArchived = $request->request->get('archive'); + $isStarred = $request->request->get('starred'); $entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId()); @@ -172,8 +172,8 @@ class WallabagRestController extends FOSRestController $this->validateUserAccess($entry->getUser()->getId()); $title = $request->request->get('title'); - $isArchived = (int) $request->request->get('archive'); - $isStarred = (int) $request->request->get('starred'); + $isArchived = $request->request->get('archive'); + $isStarred = $request->request->get('starred'); if (!is_null($title)) { $entry->setTitle($title); diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 69dfd4b1..4eb314f7 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -23,10 +23,16 @@ class EntryController extends Controller { try { $entry = $this->get('wallabag_core.content_proxy')->updateEntry($entry, $entry->getUrl()); + $em = $this->getDoctrine()->getManager(); $em->persist($entry); $em->flush(); } catch (\Exception $e) { + $this->get('logger')->error('Error while saving an entry', [ + 'exception' => $e, + 'entry' => $entry, + ]); + return false; } @@ -60,11 +66,12 @@ class EntryController extends Controller return $this->redirect($this->generateUrl('view', ['id' => $existingEntry->getId()])); } - $this->updateEntry($entry); - $this->get('session')->getFlashBag()->add( - 'notice', - 'flashes.entry.notice.entry_saved' - ); + $message = 'flashes.entry.notice.entry_saved'; + if (false === $this->updateEntry($entry)) { + $message = 'flashes.entry.notice.entry_saved_failed'; + } + + $this->get('session')->getFlashBag()->add('notice', $message); return $this->redirect($this->generateUrl('homepage')); } @@ -399,7 +406,7 @@ class EntryController extends Controller $url = $this->generateUrl( 'view', ['id' => $entry->getId()], - UrlGeneratorInterface::ABSOLUTE_URL + UrlGeneratorInterface::ABSOLUTE_PATH ); $em = $this->getDoctrine()->getManager(); @@ -411,8 +418,9 @@ class EntryController extends Controller 'flashes.entry.notice.entry_deleted' ); - // don't redirect user to the deleted entry - $to = ($url !== $request->headers->get('referer') ? $request->headers->get('referer') : null); + // don't redirect user to the deleted entry (check that the referer doesn't end with the same url) + $referer = $request->headers->get('referer'); + $to = (1 !== preg_match('#'.$url.'$#i', $referer) ? $referer : null); $redirectUrl = $this->get('wallabag_core.helper.redirect')->to($to); diff --git a/src/Wallabag/CoreBundle/Controller/FooterController.php b/src/Wallabag/CoreBundle/Controller/FooterController.php new file mode 100644 index 00000000..fd93c436 --- /dev/null +++ b/src/Wallabag/CoreBundle/Controller/FooterController.php @@ -0,0 +1,27 @@ +container->getParameter('addons_url'); + $socialsUrl = $this->container->getParameter('socials_url'); + + return $this->render( + 'WallabagCoreBundle::footer.html.twig', + [ + 'addonsUrl' => $addonsUrl, + 'socialsUrl' => $socialsUrl, + ] + ); + } +} diff --git a/src/Wallabag/CoreBundle/Controller/StaticController.php b/src/Wallabag/CoreBundle/Controller/StaticController.php index b41302f8..2a57f06f 100644 --- a/src/Wallabag/CoreBundle/Controller/StaticController.php +++ b/src/Wallabag/CoreBundle/Controller/StaticController.php @@ -12,9 +12,11 @@ class StaticController extends Controller */ public function howtoAction() { + $addonsUrl = $this->container->getParameter('addons_url'); + return $this->render( 'WallabagCoreBundle:Static:howto.html.twig', - [] + ['addonsUrl' => $addonsUrl] ); } diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php index 5a376453..03be9667 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php @@ -6,7 +6,6 @@ use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Common\Persistence\ObjectManager; use Wallabag\CoreBundle\Entity\Config; -use Wallabag\CoreBundle\Entity\TaggingRule; class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface { @@ -16,12 +15,6 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface public function load(ObjectManager $manager) { $adminConfig = new Config($this->getReference('admin-user')); - $taggingRule = new TaggingRule(); - - $taggingRule->setConfig($adminConfig); - $taggingRule->setRule('title matches "wallabag"'); - $taggingRule->setTags(['wallabag']); - $manager->persist($taggingRule); $adminConfig->setTheme('material'); $adminConfig->setItemsPerPage(30); diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php index 2e1cc270..7efe6356 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTaggingRuleData.php @@ -28,6 +28,14 @@ class LoadTaggingRuleData extends AbstractFixture implements OrderedFixtureInter $manager->persist($tr2); + $tr3 = new TaggingRule(); + + $tr3->setRule('title matches "wallabag"'); + $tr3->setTags(['wallabag']); + $tr3->setConfig($this->getReference('admin-config')); + + $manager->persist($tr3); + $manager->flush(); } diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index 84599f0d..7d08b73b 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -25,6 +25,7 @@ class WallabagCoreExtension extends Extension $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); + $loader->load('parameters.yml'); } public function getAlias() diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 1271f1f5..ceae78b0 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -177,8 +177,16 @@ class Entry private $user; /** - * @ORM\ManyToMany(targetEntity="Tag", inversedBy="entries", cascade={"persist", "remove"}) - * @ORM\JoinTable + * @ORM\ManyToMany(targetEntity="Tag", inversedBy="entries", cascade={"persist"}) + * @ORM\JoinTable( + * name="entry_tag", + * joinColumns={ + * @ORM\JoinColumn(name="entry_id", referencedColumnName="id") + * }, + * inverseJoinColumns={ + * @ORM\JoinColumn(name="tag_id", referencedColumnName="id") + * } + * ) * * @Groups({"entries_for_user", "export_all"}) */ @@ -526,13 +534,18 @@ class Entry } } - $this->tags[] = $tag; + $this->tags->add($tag); $tag->addEntry($this); } public function removeTag(Tag $tag) { + if (!$this->tags->contains($tag)) { + return; + } + $this->tags->removeElement($tag); + $tag->removeEntry($this); } /** diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index b4adbbd3..4b480ff1 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php @@ -98,9 +98,30 @@ class Tag return $this->slug; } + /** + * @param Entry $entry + */ public function addEntry(Entry $entry) { - $this->entries[] = $entry; + if ($this->entries->contains($entry)) { + return; + } + + $this->entries->add($entry); + $entry->addTag($this); + } + + /** + * @param Entry $entry + */ + public function removeEntry(Entry $entry) + { + if (!$this->entries->contains($entry)) { + return; + } + + $this->entries->removeElement($entry); + $entry->removeTag($this); } public function hasEntry($entry) diff --git a/src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php b/src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php index b712ad15..cb4bee83 100644 --- a/src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php +++ b/src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php @@ -16,7 +16,7 @@ class StringToListTransformer implements DataTransformerInterface private $separator; /** - * @param string $separator The separator used in the list. + * @param string $separator The separator used in the list */ public function __construct($separator = ',') { diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 4cf22200..7d25cc80 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -21,7 +21,9 @@ class ConfigType extends AbstractType { $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; @@ -32,7 +34,6 @@ class ConfigType extends AbstractType $builder ->add('theme', ChoiceType::class, [ 'choices' => array_flip($this->themes), - 'choices_as_values' => true, 'label' => 'config.form_settings.theme_label', ]) ->add('items_per_page', null, [ @@ -49,7 +50,6 @@ class ConfigType extends AbstractType ]) ->add('language', ChoiceType::class, [ 'choices' => array_flip($this->languages), - 'choices_as_values' => true, 'label' => 'config.form_settings.language_label', ]) ->add('save', SubmitType::class, [ diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index cd4d3490..3c597b5d 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php @@ -36,17 +36,26 @@ class EntryFilterType extends AbstractType $builder ->add('readingTime', NumberRangeFilterType::class, [ 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { - $value = $values['value']; + $lower = $values['value']['left_number'][0]; + $upper = $values['value']['right_number'][0]; + + $min = (int) ($lower * $this->user->getConfig()->getReadingSpeed()); + $max = (int) ($upper * $this->user->getConfig()->getReadingSpeed()); - if (null === $value['left_number'][0] || null === $value['right_number'][0]) { + if (null === $lower && null === $upper) { + // no value? no filter return; + } elseif (null === $lower && null !== $upper) { + // only lower value is defined: query all entries with reading LOWER THAN this value + $expression = $filterQuery->getExpr()->lte($field, $max); + } elseif (null !== $lower && null === $upper) { + // only upper value is defined: query all entries with reading GREATER THAN this value + $expression = $filterQuery->getExpr()->gte($field, $min); + } else { + // both value are defined, perform a between + $expression = $filterQuery->getExpr()->between($field, $min, $max); } - $min = (int) ($value['left_number'][0] * $this->user->getConfig()->getReadingSpeed()); - $max = (int) ($value['right_number'][0] * $this->user->getConfig()->getReadingSpeed()); - - $expression = $filterQuery->getExpr()->between($field, $min, $max); - return $filterQuery->createCondition($expression); }, 'label' => 'entry.filters.reading_time.label', @@ -87,6 +96,18 @@ class EntryFilterType extends AbstractType ->add('isStarred', CheckboxFilterType::class, [ 'label' => 'entry.filters.starred_label', ]) + ->add('isUnread', CheckboxFilterType::class, [ + 'label' => 'entry.filters.unread_label', + 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { + if (false === $values['value']) { + return; + } + + $expression = $filterQuery->getExpr()->eq('e.isArchived', 'false'); + + return $filterQuery->createCondition($expression); + }, + ]) ->add('previewPicture', CheckboxFilterType::class, [ 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { if (false === $values['value']) { @@ -101,7 +122,6 @@ class EntryFilterType extends AbstractType ]) ->add('language', ChoiceFilterType::class, [ 'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())), - 'choices_as_values' => true, 'label' => 'entry.filters.language_label', ]) ; diff --git a/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php b/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php index 14ef4a64..239d09ae 100644 --- a/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php +++ b/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php @@ -25,7 +25,7 @@ class RuleBasedTagger /** * 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) { @@ -49,7 +49,7 @@ class RuleBasedTagger * * @param User $user * - * @return array A list of modified entries. + * @return array A list of modified entries */ public function tagAllForUser(User $user) { @@ -75,7 +75,7 @@ class RuleBasedTagger /** * Fetch a tag. * - * @param string $label The tag's label. + * @param string $label The tag's label * * @return Tag */ diff --git a/src/Wallabag/CoreBundle/Resources/config/parameters.yml b/src/Wallabag/CoreBundle/Resources/config/parameters.yml new file mode 100644 index 00000000..abd9ab68 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/config/parameters.yml @@ -0,0 +1,12 @@ +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 diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/ratatouille.css b/src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/ratatouille.css index b203cbb8..605eb641 100644 --- a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/ratatouille.css +++ b/src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/ratatouille.css @@ -64,7 +64,7 @@ pre { max-width: 61.25em;/*980px*/ } -table, img { +table, img, figure { max-width: 100%; height :auto; } diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/material/css/main.css b/src/Wallabag/CoreBundle/Resources/public/themes/material/css/main.css index b106d91a..b4e082d3 100755 --- a/src/Wallabag/CoreBundle/Resources/public/themes/material/css/main.css +++ b/src/Wallabag/CoreBundle/Resources/public/themes/material/css/main.css @@ -345,7 +345,8 @@ main ul.row { max-width: 40em; } -#article img { +#article img, +#article figure { max-width: 100%; height: auto; } diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 8d392063..213d5790 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -154,6 +154,7 @@ entry: status_label: 'Status' archived_label: 'Arkiveret' starred_label: 'Favorit' + unread_label: 'Ulæst' preview_picture_label: 'Har et vist billede' preview_picture_help: 'Forhåndsvis billede' language_label: 'Sprog' @@ -396,6 +397,7 @@ flashes: notice: # entry_already_saved: 'Entry already saved on %date%' # entry_saved: 'Entry saved' + # entry_saved_failed: 'Failed to save entry' # entry_updated: 'Entry updated' # entry_reloaded: 'Entry reloaded' # entry_reload_failed: 'Failed to reload entry' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index c7a89492..c98cf0fc 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -154,6 +154,7 @@ entry: status_label: 'Status' archived_label: 'Archiviert' starred_label: 'Favorisiert' + unread_label: 'Ungelesene' preview_picture_label: 'Vorschaubild vorhanden' preview_picture_help: 'Vorschaubild' language_label: 'Sprache' @@ -395,7 +396,8 @@ flashes: 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' entry_reload_failed: 'Neuladen des Eintrags fehlgeschlagen' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 1cc42404..b65e4522 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -81,7 +81,7 @@ config: archive: 'archived' rss_limit: 'Number of items in the feed' form_user: - two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion" + two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connection." name_label: 'Name' email_label: 'Email' twoFactorAuthentication_label: 'Two factor authentication' @@ -98,9 +98,9 @@ config: faq: title: 'FAQ' tagging_rules_definition_title: 'What does « tagging rules » mean?' - tagging_rules_definition_description: 'They are rules used by Wallabag to automatically tag new entries.
Each time a new entry is added, all the tagging rules will be used to add the tags you configured, thus saving you the trouble to manually classify your entries.' + tagging_rules_definition_description: 'They are rules used by Wallabag to automatically tag new entries.
Each time a new entry is added, all the tagging rules will be used to add the tags you configured, thus saving you the trouble of manually classifying your entries.' how_to_use_them_title: 'How do I use them?' - how_to_use_them_description: 'Let assume you want to tag new entries as « short reading » when the reading time is inferior to 3 minutes.
In that case, you should put « readingTime <= 3 » in the Rule field and « short reading » in the Tags field.
Several tags can added simultaneously by separating them by a comma: « short reading, must read »
Complex rules can be written by using predefined operators: if « readingTime >= 5 AND domainName = "github.com" » then tag as « long reading, github »' + how_to_use_them_description: 'Let us assume you want to tag new entries as « short reading » when the reading time is under 3 minutes.
In that case, you should put « readingTime <= 3 » in the Rule field and « short reading » in the Tags field.
Several tags can added simultaneously by separating them with a comma: « short reading, must read »
Complex rules can be written by using predefined operators: if « readingTime >= 5 AND domainName = "github.com" » then tag as « long reading, github »' variables_available_title: 'Which variables and operators can I use to write rules?' variables_available_description: 'The following variables and operators can be used to create tagging rules:' meaning: 'Meaning' @@ -140,7 +140,7 @@ entry: archived: 'Archived entries' filtered: 'Filtered entries' list: - number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' + number_on_the_page: '{0} There are no entries.|{1} There is one entry.|]1,Inf[ There are %count% entries.' reading_time: 'estimated reading time' reading_time_minutes: 'estimated reading time: %readingTime% min' reading_time_less_one_minute: 'estimated reading time: < 1 min' @@ -154,6 +154,7 @@ entry: status_label: 'Status' archived_label: 'Archived' starred_label: 'Starred' + unread_label: 'Unread' preview_picture_label: 'Has a preview picture' preview_picture_help: 'Preview picture' language_label: 'Language' @@ -222,14 +223,14 @@ about: bug_reports: 'Bug reports' support: 'On our support website or on GitHub' helping: - description: 'wallabag is free and opensource. You can help us:' + description: 'wallabag is free and open source. You can help us:' by_contributing: 'by contributing to the project:' by_contributing_2: 'an issue lists all our needs' by_paypal: 'via Paypal' contributors: description: 'Thank you to contributors on wallabag web application' third_party: - description: 'Here are the list of third-party libraries used in wallabag (with their licenses):' + description: 'Here is the list of third-party libraries used in wallabag (with their licenses):' package: 'Package' license: 'License' @@ -258,7 +259,7 @@ quickstart: page_title: 'Quickstart' intro: title: 'Welcome to wallabag!' - paragraph_1: "We'll accompany you to visit wallabag and show you some features which can interest you." + paragraph_1: "We'll accompany you on your visit to wallabag and show you some features that might interest you." paragraph_2: 'Follow us!' configure: title: 'Configure the application' @@ -290,7 +291,7 @@ quickstart: title: 'Full documentation' annotate: 'Annotate your article' export: 'Convert your articles into ePUB or PDF' - search_filters: 'See how you can look for an article by using search engine and filters' + search_filters: 'See how you can look for an article by using the search engine and filters' fetching_errors: 'What can I do if an article encounters errors during fetching?' all_docs: 'And so many other articles!' support: @@ -303,11 +304,11 @@ quickstart: tag: page_title: 'Tags' list: - number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' + number_on_the_page: '{0} There are no tags.|{1} There is one tag.|]1,Inf[ There are %count% tags.' import: page_title: 'Import' - page_description: 'Welcome to wallabag importer. Please select your previous service that you want to migrate.' + page_description: 'Welcome to wallabag importer. Please select your previous service from which you want to migrate.' action: import_contents: 'Import contents' form: @@ -317,7 +318,7 @@ import: save_label: 'Upload file' pocket: page_title: 'Import > Pocket' - description: "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." + description: "This importer will import all of 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." config_missing: description: "Pocket import isn't configured." admin_message: 'You need to define %keyurls%a pocket_consumer_key%keyurle%.' @@ -396,6 +397,7 @@ flashes: notice: entry_already_saved: 'Entry already saved on %date%' entry_saved: 'Entry saved' + entry_saved_failed: 'Failed to save entry' entry_updated: 'Entry updated' entry_reloaded: 'Entry reloaded' entry_reload_failed: 'Failed to reload entry' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index e8461247..75978f16 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -135,7 +135,7 @@ config: entry: page_titles: - unread: 'Artúclos no leídos' + unread: 'Artículos no leídos' starred: 'Artículos favoritos' archived: 'Artículos archivados' filtered: 'Artículos filtrados' @@ -154,6 +154,7 @@ entry: status_label: 'Estatus' archived_label: 'Archivado' starred_label: 'Favorito' + unread_label: 'Sin leer' preview_picture_label: 'Hay una foto' preview_picture_help: 'Foto de preview' language_label: 'Idioma' @@ -396,6 +397,7 @@ flashes: notice: entry_already_saved: 'Entrada ya guardada por %fecha%' entry_saved: 'Entrada guardada' + # entry_saved_failed: 'Failed to save entry' entry_updated: 'Entrada actualizada' entry_reloaded: 'Entrada recargada' entry_reload_failed: 'Entrada recargada reprobada' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index d34ff8ff..db6e5960 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -96,8 +96,8 @@ config: rule_label: 'قانون' tags_label: 'برچسب‌ها' faq: - title: 'پرسش‌های متداول' - tagging_rules_definition_title: 'برچسب‌گذاری خودکار یعنی چه؟' + title: 'پرسش‌های متداول' + tagging_rules_definition_title: 'برچسب‌گذاری خودکار یعنی چه؟' # tagging_rules_definition_description: 'They are rules used by Wallabag to automatically tag new entries.
Each time a new entry is added, all the tagging rules will be used to add the tags you configured, thus saving you the trouble to manually classify your entries.' # how_to_use_them_title: 'How do I use them?' # how_to_use_them_description: 'Let assume you want to tag new entries as « short reading » when the reading time is inferior to 3 minutes.
In that case, you should put « readingTime <= 3 » in the Rule field and « short reading » in the Tags field.
Several tags can added simultaneously by separating them by a comma: « short reading, must read »
Complex rules can be written by using predefined operators: if « readingTime >= 5 AND domainName = "github.com" » then tag as « long reading, github »' @@ -154,6 +154,7 @@ entry: status_label: 'وضعیت' archived_label: 'بایگانی‌شده' starred_label: 'برگزیده' + unread_label: 'خوانده‌نشده' preview_picture_label: 'دارای عکس پیش‌نمایش' preview_picture_help: 'پیش‌نمایش عکس' language_label: 'زبان' @@ -383,30 +384,31 @@ developer: flashes: config: notice: - config_saved: 'پیکربندی ذخیره شد. برخی از تنظیمات پس از این که قطع شدید اعمال می‌شود.' - password_updated: 'رمز به‌روز شد' - password_not_updated_demo: "در حالت نمایشی نمی‌توانید رمز کاربر را عوض کنید." - user_updated: 'اطلاعات به‌روز شد' - rss_updated: 'اطلاعات آر-اس-اس به‌روز شد' - tagging_rules_updated: 'برچسب‌گذاری خودکار به‌روز شد' - tagging_rules_deleted: 'قانون برچسب‌گذاری پاک شد' - user_added: 'کابر "%username%" افزوده شد' - rss_token_updated: 'کد آر-اس-اس به‌روز شد' + config_saved: 'پیکربندی ذخیره شد. برخی از تنظیمات پس از این که قطع شدید اعمال می‌شود.' + password_updated: 'رمز به‌روز شد' + password_not_updated_demo: "در حالت نمایشی نمی‌توانید رمز کاربر را عوض کنید." + user_updated: 'اطلاعات به‌روز شد' + rss_updated: 'اطلاعات آر-اس-اس به‌روز شد' + tagging_rules_updated: 'برچسب‌گذاری خودکار به‌روز شد' + tagging_rules_deleted: 'قانون برچسب‌گذاری پاک شد' + user_added: 'کابر "%username%" افزوده شد' + rss_token_updated: 'کد آر-اس-اس به‌روز شد' entry: notice: - entry_already_saved: 'این مقاله در تاریخ %date% ذخیره شده بود' - entry_saved: 'مقاله ذخیره شد' - entry_updated: 'مقاله به‌روز شد' - entry_reloaded: 'مقاله به‌روز شد' - entry_reload_failed: 'به‌روزرسانی مقاله شکست خورد' - entry_archived: 'مقاله بایگانی شد' - entry_unarchived: 'مقاله از بایگانی درآمد' - entry_starred: 'مقاله برگزیده شد' - entry_unstarred: 'مقاله نابرگزیده شد' - entry_deleted: 'مقاله پاک شد' + entry_already_saved: 'این مقاله در تاریخ %date% ذخیره شده بود' + entry_saved: 'مقاله ذخیره شد' + # entry_saved_failed: 'Failed to save entry' + entry_updated: 'مقاله به‌روز شد' + entry_reloaded: 'مقاله به‌روز شد' + entry_reload_failed: 'به‌روزرسانی مقاله شکست خورد' + entry_archived: 'مقاله بایگانی شد' + entry_unarchived: 'مقاله از بایگانی درآمد' + entry_starred: 'مقاله برگزیده شد' + entry_unstarred: 'مقاله نابرگزیده شد' + entry_deleted: 'مقاله پاک شد' tag: notice: - tag_added: 'برچسب افزوده شد' + tag_added: 'برچسب افزوده شد' import: notice: failed: 'درون‌ریزی شکست خورد. لطفاً دوباره تلاش کنید.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 80ba0546..94300596 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -154,6 +154,7 @@ entry: status_label: 'Status' archived_label: 'Lus' starred_label: 'Favoris' + unread_label: 'Non lus' preview_picture_label: 'A une photo' preview_picture_help: 'Photo' language_label: 'Langue' @@ -267,12 +268,12 @@ quickstart: tagging_rules: 'Écrivez des règles pour classer automatiquement vos articles' admin: title: 'Administration' - description: "En tant qu'adminitrasteur sur wallabag, vous avez des privilèges qui vous permette de :" + description: "En tant qu'administrateur sur wallabag, vous avez des privilèges qui vous permettent de :" new_user: 'Créer un nouvel utilisateur' analytics: 'Configurer les statistiques' sharing: 'Activer des paramètres de partages' - export: 'Configurer les export' - import: 'Configurer les import' + export: "Configurer les formats d'export" + import: "Configurer l'import" first_steps: title: 'Premiers pas' new_article: 'Ajoutez votre premier article' @@ -288,7 +289,7 @@ quickstart: create_application: 'Créer votre application tierce' docs: title: 'Documentation complète' - annotate: 'Annotater votre article' + annotate: 'Annoter votre article' export: 'Convertissez vos articles en ePub ou en PDF' search_filters: "Apprenez à utiliser le moteur de recherche et les filtres pour retrouver l'article qui vous intéresse" fetching_errors: "Que faire si mon article n'est pas correctement récupéré ?" @@ -396,6 +397,7 @@ flashes: notice: entry_already_saved: 'Article déjà sauvergardé le %date%' entry_saved: 'Article enregistré' + entry_saved_failed: "L'enregistrement a échoué" entry_updated: 'Article mis à jour' entry_reloaded: 'Article rechargé' entry_reload_failed: "Le rechargement de l'article a échoué" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 4f3ac090..00ed9c98 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -396,6 +396,7 @@ flashes: notice: entry_already_saved: 'Contenuto già salvato in data %date%' entry_saved: 'Contenuto salvato' + # entry_saved_failed: 'Failed to save entry' entry_updated: 'Contenuto aggiornato' entry_reloaded: 'Contenuto ricaricato' entry_reload_failed: 'Errore nel ricaricamento del contenuto' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 46f58bbf..c81c852b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -154,6 +154,7 @@ entry: status_label: 'Estatus' archived_label: 'Legits' starred_label: 'Favorits' + unread_label: 'Pas legits' preview_picture_label: 'A una fotò' preview_picture_help: 'Fotò' language_label: 'Lenga' @@ -396,6 +397,7 @@ flashes: notice: entry_already_saved: 'Article ja salvargardat lo %date%' entry_saved: 'Article enregistrat' + # entry_saved_failed: 'Failed to save entry' entry_updated: 'Article mes a jorn' entry_reloaded: 'Article recargat' entry_reload_failed: "Fracàs de l'actualizacion de l'article" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 292749ed..3707a857 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -154,6 +154,7 @@ entry: status_label: 'Status' archived_label: 'Zarchiwizowane' starred_label: 'Oznaczone gwiazdką' + unread_label: 'Nieprzeczytane' preview_picture_label: 'Posiada podgląd obrazu' preview_picture_help: 'Podgląd obrazu' language_label: 'Język' @@ -396,6 +397,7 @@ flashes: notice: entry_already_saved: 'Wpis już został dodany %date%' entry_saved: 'Wpis zapisany' + # entry_saved_failed: 'Failed to save entry' entry_updated: 'Wpis zaktualizowany' entry_reloaded: 'Wpis ponownie załadowany' entry_reload_failed: 'Błąd ponownego załadowania' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 45040f35..27be1edc 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -154,6 +154,7 @@ entry: status_label: 'Status' archived_label: 'Arhivat' starred_label: 'Steluțe' + unread_label: 'Necitite' preview_picture_label: 'Are o imagine de previzualizare' preview_picture_help: 'Previzualizare imagine' language_label: 'Limbă' @@ -396,6 +397,7 @@ flashes: notice: # entry_already_saved: 'Entry already saved on %date%' # entry_saved: 'Entry saved' + # entry_saved_failed: 'Failed to save entry' # entry_updated: 'Entry updated' # entry_reloaded: 'Entry reloaded' # entry_reload_failed: 'Failed to reload entry' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 8a095a5b..85ee7316 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -154,6 +154,7 @@ entry: status_label: 'Durum' archived_label: 'Arşiv' starred_label: 'Favori' + unread_label: 'Okunmayan' preview_picture_label: 'Resim önizlemesi varsa' preview_picture_help: 'Resim önizlemesi' language_label: 'Dil' @@ -396,6 +397,7 @@ flashes: notice: entry_already_saved: 'Entry already saved on %date%' entry_saved: 'Makale kaydedildi' + # entry_saved_failed: 'Failed to save entry' # entry_updated: 'Entry updated' entry_reloaded: 'Makale içeriği yenilendi' # entry_reload_failed: 'Failed to reload entry' diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index c51f90d2..a8abe8d3 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -134,7 +134,8 @@ {% endif %} - {{ form_rest(form.user) }} + {{ form_widget(form.user._token) }} + {{ form_widget(form.user.save) }}

{{ 'config.tab_menu.password'|trans }}

diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index a2caaebf..778625ae 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -53,6 +53,11 @@ {{ form_label(form.isStarred) }} +
+ {{ form_widget(form.isUnread) }} + {{ form_label(form.isUnread) }} +
+
{{ form_widget(form.previewPicture) }} {{ form_label(form.previewPicture) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig index eab092c7..b529a0ac 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig @@ -11,14 +11,14 @@

{{ 'howto.top_menu.browser_addons'|trans }}

{{ 'howto.top_menu.mobile_apps'|trans }}

{{ 'howto.top_menu.bookmarklet'|trans }}

diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig index 5a90f227..afd5b499 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig @@ -158,7 +158,7 @@ {% endif %} {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} - {{ form_rest(form.user) }} + {{ form_widget(form.user._token) }}

diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index cc4038c5..920fa933 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig @@ -32,7 +32,7 @@
{% if not entry.previewPicture is null %} - + {% endif %} {{ entry.title|striptags|slice(0, 42)|raw }} @@ -126,6 +126,11 @@ {{ form_label(form.isStarred) }}
+
+ {{ form_widget(form.isUnread) }} + {{ form_label(form.isUnread) }} +
+
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig index 4354a6b7..6a177d6b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig @@ -18,17 +18,17 @@ diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig new file mode 100644 index 00000000..7cb19966 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig @@ -0,0 +1,41 @@ + diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index 25ad23dd..a5c16792 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig @@ -122,45 +122,5 @@ {% endblock %} {% block footer %} - + {{ render(controller("WallabagCoreBundle:Footer:index")) }} {% endblock %} diff --git a/src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php b/src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php deleted file mode 100644 index 05450c0b..00000000 --- a/src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php +++ /dev/null @@ -1,51 +0,0 @@ -client; - } - - public function setUp() - { - parent::setUp(); - - $this->client = static::createClient(); - } - - public function logInAs($username) - { - $crawler = $this->client->request('GET', '/login'); - $form = $crawler->filter('button[type=submit]')->form(); - $data = [ - '_username' => $username, - '_password' => 'mypassword', - ]; - - $this->client->submit($form, $data); - } - - /** - * Return the user id of the logged in user. - * You should be sure that you called `logInAs` before. - * - * @return int - */ - public function getLoggedInUserId() - { - $token = static::$kernel->getContainer()->get('security.token_storage')->getToken(); - - if (null !== $token) { - return $token->getUser()->getId(); - } - - throw new \RuntimeException('No logged in User.'); - } -} diff --git a/src/Wallabag/ImportBundle/Tests/Controller/PocketControllerTest.php b/src/Wallabag/ImportBundle/Tests/Controller/PocketControllerTest.php deleted file mode 100644 index 403fe9b0..00000000 --- a/src/Wallabag/ImportBundle/Tests/Controller/PocketControllerTest.php +++ /dev/null @@ -1,65 +0,0 @@ -logInAs('admin'); - $client = $this->getClient(); - - $crawler = $client->request('GET', '/import/pocket'); - - $this->assertEquals(200, $client->getResponse()->getStatusCode()); - $this->assertEquals(1, $crawler->filter('button[type=submit]')->count()); - } - - public function testImportPocketAuthBadToken() - { - $this->logInAs('admin'); - $client = $this->getClient(); - - $crawler = $client->request('GET', '/import/pocket/auth'); - - $this->assertEquals(302, $client->getResponse()->getStatusCode()); - } - - public function testImportPocketAuth() - { - $this->markTestSkipped('PocketImport: Find a way to properly mock a service.'); - - $this->logInAs('admin'); - $client = $this->getClient(); - - $pocketImport = $this->getMockBuilder('Wallabag\ImportBundle\Import\PocketImport') - ->disableOriginalConstructor() - ->getMock(); - - $pocketImport - ->expects($this->once()) - ->method('getRequestToken') - ->willReturn('token'); - - $client->getContainer()->set('wallabag_import.pocket.import', $pocketImport); - - $crawler = $client->request('GET', '/import/pocket/auth'); - - $this->assertEquals(301, $client->getResponse()->getStatusCode()); - $this->assertContains('getpocket.com/auth/authorize', $client->getResponse()->headers->get('location')); - } - - public function testImportPocketCallbackWithBadToken() - { - $this->logInAs('admin'); - $client = $this->getClient(); - - $crawler = $client->request('GET', '/import/pocket/callback'); - - $this->assertEquals(302, $client->getResponse()->getStatusCode()); - $this->assertContains('import/pocket', $client->getResponse()->headers->get('location')); - $this->assertEquals('flashes.import.notice.failed', $client->getContainer()->get('session')->getFlashBag()->peek('notice')[0]); - } -} diff --git a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig index c44fcfb7..3731f13b 100644 --- a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig @@ -74,7 +74,7 @@ - +
logologo

wallabag

{{ "auth_code.on"|trans({}, 'wallabag_user') }} {{ wallabag_url }}
diff --git a/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php b/tests/Wallabag/AnnotationBundle/Controller/AnnotationControllerTest.php similarity index 97% rename from src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php rename to tests/Wallabag/AnnotationBundle/Controller/AnnotationControllerTest.php index 3eba7193..70849f74 100644 --- a/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php +++ b/tests/Wallabag/AnnotationBundle/Controller/AnnotationControllerTest.php @@ -1,8 +1,8 @@ assertEquals($this->client->getContainer()->getParameter('wallabag_core.version'), $content); } + + public function testSaveIsArchivedAfterPost() + { + $entry = $this->client->getContainer() + ->get('doctrine.orm.entity_manager') + ->getRepository('WallabagCoreBundle:Entry') + ->findOneBy(['user' => 1, 'isArchived' => true]); + + if (!$entry) { + $this->markTestSkipped('No content found in db.'); + } + + $this->client->request('POST', '/api/entries.json', [ + 'url' => $entry->getUrl(), + ]); + + $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); + + $content = json_decode($this->client->getResponse()->getContent(), true); + + $this->assertEquals(true, $content['is_archived']); + } + + public function testSaveIsStarredAfterPost() + { + $entry = $this->client->getContainer() + ->get('doctrine.orm.entity_manager') + ->getRepository('WallabagCoreBundle:Entry') + ->findOneBy(['user' => 1, 'isStarred' => true]); + + if (!$entry) { + $this->markTestSkipped('No content found in db.'); + } + + $this->client->request('POST', '/api/entries.json', [ + 'url' => $entry->getUrl(), + ]); + + $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); + + $content = json_decode($this->client->getResponse()->getContent(), true); + + $this->assertEquals(true, $content['is_starred']); + } + + public function testSaveIsArchivedAfterPatch() + { + $entry = $this->client->getContainer() + ->get('doctrine.orm.entity_manager') + ->getRepository('WallabagCoreBundle:Entry') + ->findOneBy(['user' => 1, 'isArchived' => true]); + + if (!$entry) { + $this->markTestSkipped('No content found in db.'); + } + + $this->client->request('PATCH', '/api/entries/'.$entry->getId().'.json', [ + 'title' => $entry->getTitle().'++', + ]); + + $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); + + $content = json_decode($this->client->getResponse()->getContent(), true); + + $this->assertEquals(true, $content['is_archived']); + } + + public function testSaveIsStarredAfterPatch() + { + $entry = $this->client->getContainer() + ->get('doctrine.orm.entity_manager') + ->getRepository('WallabagCoreBundle:Entry') + ->findOneBy(['user' => 1, 'isStarred' => true]); + + if (!$entry) { + $this->markTestSkipped('No content found in db.'); + } + $this->client->request('PATCH', '/api/entries/'.$entry->getId().'.json', [ + 'title' => $entry->getTitle().'++', + ]); + + $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); + + $content = json_decode($this->client->getResponse()->getContent(), true); + + $this->assertEquals(true, $content['is_starred']); + } } diff --git a/src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php b/tests/Wallabag/ApiBundle/WallabagApiTestCase.php similarity index 97% rename from src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php rename to tests/Wallabag/ApiBundle/WallabagApiTestCase.php index 13d72d2c..cf9b3347 100644 --- a/src/Wallabag/ApiBundle/Tests/WallabagApiTestCase.php +++ b/tests/Wallabag/ApiBundle/WallabagApiTestCase.php @@ -1,6 +1,6 @@ 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', diff --git a/src/Wallabag/CoreBundle/Tests/Command/TagAllCommandTest.php b/tests/Wallabag/CoreBundle/Command/TagAllCommandTest.php similarity index 94% rename from src/Wallabag/CoreBundle/Tests/Command/TagAllCommandTest.php rename to tests/Wallabag/CoreBundle/Command/TagAllCommandTest.php index 4f544c1d..ec31708f 100644 --- a/src/Wallabag/CoreBundle/Tests/Command/TagAllCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/TagAllCommandTest.php @@ -1,11 +1,11 @@ logInAs('admin'); $client = $this->getClient(); @@ -181,8 +181,7 @@ class EntryControllerTest extends WallabagCoreTestCase $client->submit($form, $data); $this->assertEquals(302, $client->getResponse()->getStatusCode()); - - $client->followRedirect(); + $this->assertContains('/', $client->getResponse()->getTargetUrl()); $em = $client->getContainer() ->get('doctrine.orm.entity_manager'); @@ -196,6 +195,35 @@ class EntryControllerTest extends WallabagCoreTestCase $em->remove($entry); $em->flush(); + + // and now re-submit it to test the cascade persistence for tags after entry removal + // related https://github.com/wallabag/wallabag/issues/2121 + $crawler = $client->request('GET', '/new'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + + $form = $crawler->filter('form[name=entry]')->form(); + + $data = [ + 'entry[url]' => $url = 'https://github.com/wallabag/wallabag/tree/master', + ]; + + $client->submit($form, $data); + + $this->assertEquals(302, $client->getResponse()->getStatusCode()); + $this->assertContains('/', $client->getResponse()->getTargetUrl()); + + $entry = $em + ->getRepository('WallabagCoreBundle:Entry') + ->findOneByUrl($url); + + $tags = $entry->getTags(); + + $this->assertCount(1, $tags); + $this->assertEquals('wallabag', $tags[0]->getLabel()); + + $em->remove($entry); + $em->flush(); } public function testArchive() @@ -471,6 +499,60 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertCount(1, $crawler->filter('div[class=entry]')); } + public function testFilterOnReadingTimeOnlyUpper() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/unread/list'); + + $form = $crawler->filter('button[id=submit-filter]')->form(); + + $data = [ + 'entry_filter[readingTime][right_number]' => 22, + ]; + + $crawler = $client->submit($form, $data); + + $this->assertCount(2, $crawler->filter('div[class=entry]')); + } + + public function testFilterOnReadingTimeOnlyLower() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/unread/list'); + + $form = $crawler->filter('button[id=submit-filter]')->form(); + + $data = [ + 'entry_filter[readingTime][left_number]' => 22, + ]; + + $crawler = $client->submit($form, $data); + + $this->assertCount(4, $crawler->filter('div[class=entry]')); + } + + public function testFilterOnUnreadStatus() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/all/list'); + + $form = $crawler->filter('button[id=submit-filter]')->form(); + + $data = [ + 'entry_filter[isUnread]' => true, + ]; + + $crawler = $client->submit($form, $data); + + $this->assertCount(4, $crawler->filter('div[class=entry]')); + } + public function testFilterOnCreationDate() { $this->logInAs('admin'); diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ExportControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php similarity index 98% rename from src/Wallabag/CoreBundle/Tests/Controller/ExportControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php index 76c98055..b22156c3 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/ExportControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php @@ -1,8 +1,8 @@ persist($user); $em->flush(); - $this->logInAs('admin'); + $this->logInAsUsingHttp('admin'); $crawler = $client->request('GET', '/config'); $this->assertContains('scheb_two_factor.trusted', $crawler->filter('body')->extract(['_text'])[0]); diff --git a/src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php b/tests/Wallabag/CoreBundle/Controller/SettingsControllerTest.php similarity index 88% rename from src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/SettingsControllerTest.php index fd698b3e..9b8b5702 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/SettingsControllerTest.php @@ -1,8 +1,8 @@ submit($form, $data); $this->assertEquals(302, $client->getResponse()->getStatusCode()); + // be sure to reload the entry + $entry = $client->getContainer() + ->get('doctrine.orm.entity_manager') + ->getRepository('WallabagCoreBundle:Entry') + ->findOneByUsernameAndNotArchived('admin'); + $this->assertEquals(1, count($entry->getTags())); # tag already exists and already assigned diff --git a/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php b/tests/Wallabag/CoreBundle/EventListener/LocaleListenerTest.php similarity index 98% rename from src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php rename to tests/Wallabag/CoreBundle/EventListener/LocaleListenerTest.php index b4c022d5..2a7f9390 100644 --- a/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php +++ b/tests/Wallabag/CoreBundle/EventListener/LocaleListenerTest.php @@ -1,6 +1,6 @@ client; + } + + public function setUp() + { + parent::setUp(); + + $this->client = static::createClient(); + } + + /** + * Login a user without making a HTTP request. + * If we make a HTTP request we lose ability to mock service in the container. + * + * @param string $username User to log in + */ + public function logInAs($username) + { + $container = $this->client->getContainer(); + $session = $container->get('session'); + + $userManager = $container->get('fos_user.user_manager'); + $loginManager = $container->get('fos_user.security.login_manager'); + $firewallName = $container->getParameter('fos_user.firewall_name'); + + $user = $userManager->findUserBy(array('username' => $username)); + $loginManager->loginUser($firewallName, $user); + + $session->set('_security_'.$firewallName, serialize($container->get('security.token_storage')->getToken())); + $session->save(); + + $cookie = new Cookie($session->getName(), $session->getId()); + $this->client->getCookieJar()->set($cookie); + } + + /** + * Instead of `logInAs` this method use a HTTP request to log in the user. + * Could be better for some tests. + * + * @param string $username User to log in + */ + public function logInAsUsingHttp($username) + { + $crawler = $this->client->request('GET', '/login'); + $form = $crawler->filter('button[type=submit]')->form(); + $data = [ + '_username' => $username, + '_password' => 'mypassword', + ]; + + $this->client->submit($form, $data); + } + + /** + * Return the user id of the logged in user. + * You should be sure that you called `logInAs` before. + * + * @return int + */ + public function getLoggedInUserId() + { + $token = static::$kernel->getContainer()->get('security.token_storage')->getToken(); + + if (null !== $token) { + return $token->getUser()->getId(); + } + + throw new \RuntimeException('No logged in User.'); + } +} diff --git a/src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ImportControllerTest.php similarity index 87% rename from src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php rename to tests/Wallabag/ImportBundle/Controller/ImportControllerTest.php index 9f38fa82..96b5300b 100644 --- a/src/Wallabag/ImportBundle/Tests/Controller/ImportControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/ImportControllerTest.php @@ -1,8 +1,8 @@ logInAs('admin'); + $client = $this->getClient(); + + $crawler = $client->request('GET', '/import/pocket'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $this->assertEquals(1, $crawler->filter('button[type=submit]')->count()); + } + + public function testImportPocketAuthBadToken() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $client->request('GET', '/import/pocket/auth'); + + $this->assertEquals(302, $client->getResponse()->getStatusCode()); + } + + public function testImportPocketAuth() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $pocketImport = $this->getMockBuilder('Wallabag\ImportBundle\Import\PocketImport') + ->disableOriginalConstructor() + ->getMock(); + + $pocketImport + ->expects($this->once()) + ->method('getRequestToken') + ->willReturn('token'); + + static::$kernel->getContainer()->set('wallabag_import.pocket.import', $pocketImport); + + $client->request('GET', '/import/pocket/auth'); + + $this->assertEquals(301, $client->getResponse()->getStatusCode()); + $this->assertContains('getpocket.com/auth/authorize', $client->getResponse()->headers->get('location')); + } + + public function testImportPocketCallbackWithBadToken() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $pocketImport = $this->getMockBuilder('Wallabag\ImportBundle\Import\PocketImport') + ->disableOriginalConstructor() + ->getMock(); + + $pocketImport + ->expects($this->once()) + ->method('authorize') + ->willReturn(false); + + static::$kernel->getContainer()->set('wallabag_import.pocket.import', $pocketImport); + + $client->request('GET', '/import/pocket/callback'); + + $this->assertEquals(302, $client->getResponse()->getStatusCode()); + $this->assertContains('/', $client->getResponse()->headers->get('location'), 'Import is ok, redirect to homepage'); + $this->assertEquals('flashes.import.notice.failed', $client->getContainer()->get('session')->getFlashBag()->peek('notice')[0]); + } + + public function testImportPocketCallback() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $pocketImport = $this->getMockBuilder('Wallabag\ImportBundle\Import\PocketImport') + ->disableOriginalConstructor() + ->getMock(); + + $pocketImport + ->expects($this->once()) + ->method('authorize') + ->willReturn(true); + + $pocketImport + ->expects($this->once()) + ->method('setMarkAsRead') + ->with(false) + ->willReturn($pocketImport); + + $pocketImport + ->expects($this->once()) + ->method('import') + ->willReturn(true); + + static::$kernel->getContainer()->set('wallabag_import.pocket.import', $pocketImport); + + $client->request('GET', '/import/pocket/callback'); + + $this->assertEquals(302, $client->getResponse()->getStatusCode()); + $this->assertContains('/', $client->getResponse()->headers->get('location'), 'Import is ok, redirect to homepage'); + $this->assertEquals('flashes.import.notice.summary', $client->getContainer()->get('session')->getFlashBag()->peek('notice')[0]); + } +} diff --git a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php similarity index 97% rename from src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php rename to tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php index f7de3fef..c1025b41 100644 --- a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php @@ -1,8 +1,8 @@ unregister(); -$apcLoader->register(true); -*/ - $kernel = new AppKernel('prod', false); $kernel->loadClassCache(); //$kernel = new AppCache($kernel);