forked from wallabag/wallabag
Compare commits
297 Commits
2.0.0-alph
...
2.0.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
| 14044c99c0 | |||
| df3f45d4d0 | |||
| 6c9bb06393 | |||
| 6ab56c7b2c | |||
| b95ffda2a1 | |||
| 55e61971f3 | |||
| d6dba929a1 | |||
| 09d8bb6fa2 | |||
| 66e2be2371 | |||
| 6aed6d69a5 | |||
| c118131317 | |||
| 24c16007bb | |||
| 4c51979595 | |||
| 0f4e919100 | |||
| 83be3dc097 | |||
| e7931dbdf8 | |||
| b80841f23c | |||
| 612f5f1ec7 | |||
| 125460345f | |||
| d460a7377a | |||
| cebb42234c | |||
| f4109a9bbf | |||
| 3b32c122ab | |||
| d442cf4a92 | |||
| 807037884f | |||
| 6f8310b445 | |||
| 9761bfa18e | |||
| 2b4770301c | |||
| d11eb2e461 | |||
| f17281417c | |||
| 2766668b59 | |||
| 1256f6fe34 | |||
| 9bf15f0269 | |||
| 2c2308b783 | |||
| 1e5a4b36ab | |||
| e68568cd5b | |||
| d89908aed3 | |||
| e166a58fd9 | |||
| e18138dbca | |||
| fba9e7d44d | |||
| 11a452813c | |||
| 816ad4051b | |||
| 79d0e38e7f | |||
| 9e3355ee4f | |||
| 5dfd321d0e | |||
| c32ae320fe | |||
| c10fcb3bbb | |||
| fe8b37c137 | |||
| 3d15ea2fd7 | |||
| 76a9bc4797 | |||
| 7d12fd0628 | |||
| e5f3b04cce | |||
| 3ca529970c | |||
| 9931a37cf7 | |||
| 348e2b4852 | |||
| bd5b3ea8ea | |||
| 9c5cfd2823 | |||
| 0e576d2163 | |||
| 646df062df | |||
| 6b6f725182 | |||
| 461a171467 | |||
| f8b835f537 | |||
| df814148c3 | |||
| 7b70feb9d2 | |||
| 9adfede511 | |||
| 244ee24764 | |||
| a6a971d45f | |||
| 4be43814e2 | |||
| 2ebbbb26ae | |||
| c273b3a5c1 | |||
| 5d0f104bf0 | |||
| 6e3d65ccb0 | |||
| 5bf8f3f164 | |||
| 5bc2da5628 | |||
| 8a4690b6a5 | |||
| abc329453b | |||
| 6a2c524a2c | |||
| b6321bed7b | |||
| 24152cdb5e | |||
| 8808b79230 | |||
| 8edf89b29e | |||
| 1e18360cc7 | |||
| 3c39f5ac41 | |||
| dfad9ba0f9 | |||
| bb0efca468 | |||
| a19a371ae7 | |||
| 30e5174ea7 | |||
| 923a7e8d68 | |||
| 8249b988cc | |||
| 449df236ac | |||
| 8ccc306468 | |||
| 2b788cadab | |||
| 2481da00dc | |||
| f06e268fc9 | |||
| 6daadb6c44 | |||
| 162954763e | |||
| b07c7dfe78 | |||
| 4dc872238a | |||
| 9eab365e28 | |||
| a772d16b12 | |||
| 2b6e65a5e3 | |||
| 7720cca532 | |||
| f38e03dc02 | |||
| d3f1a9dc1a | |||
| 575e6907e5 | |||
| 74932af231 | |||
| ef186de38a | |||
| b60bff0c2a | |||
| 3174b764bc | |||
| f2fcb65b44 | |||
| f83125d2f5 | |||
| 7af794e525 | |||
| fd3fd481a6 | |||
| 7447461352 | |||
| d7cc16c8b5 | |||
| b091b1b330 | |||
| 0a7e695975 | |||
| db847ca0b7 | |||
| fc6020b2c8 | |||
| ff94ee94a6 | |||
| ecb266d0ec | |||
| 4a2c089c68 | |||
| 754cb2abc0 | |||
| 90280df080 | |||
| bb17ddea61 | |||
| 0504f5660e | |||
| 924ef7cacd | |||
| 2aadeea8cd | |||
| 2b71f68c95 | |||
| b6c00b0b80 | |||
| fe5597c433 | |||
| cd4d7f4b69 | |||
| 7bf4dd891a | |||
| 437f1985b0 | |||
| 5bcf1afd91 | |||
| fbbda94110 | |||
| e5b5270962 | |||
| a4f42c59f0 | |||
| d8d56448c9 | |||
| c3b43c8a3e | |||
| 36f20a6570 | |||
| 6c9f50a662 | |||
| 12b5a8cea1 | |||
| 077ddbe1ae | |||
| eabb9771f4 | |||
| 4bf0d4e0b5 | |||
| c56abae16b | |||
| 426bfdc3f0 | |||
| 89d95cdd18 | |||
| e6ebb14f0f | |||
| c90f8036ef | |||
| 8b197f27d8 | |||
| 8dbca9c133 | |||
| 9e60429c6d | |||
| 66755f8955 | |||
| 91485cf27d | |||
| 05e173f283 | |||
| ce168b6ead | |||
| 3495f78d77 | |||
| 0cde91cc6f | |||
| a8c6b8ee0c | |||
| 671a2b887f | |||
| 07643dde08 | |||
| c2656f96d4 | |||
| fa64d86110 | |||
| befa6f2fe9 | |||
| 04c0737817 | |||
| 88a5b0c753 | |||
| fdec3acab1 | |||
| c665b863c7 | |||
| 660d66cabd | |||
| 1f8f9eaac8 | |||
| bbbcd6997b | |||
| f37c9c3348 | |||
| 93d0aa40bb | |||
| 7dc8fac718 | |||
| db0e34e2ce | |||
| e87638227f | |||
| 75ff0e6e32 | |||
| 6a88b61cf1 | |||
| ee40ccf260 | |||
| 109bda0672 | |||
| 45c4a616ec | |||
| c94779e499 | |||
| ebac4090b5 | |||
| c44cc178b5 | |||
| 861bbfcbd4 | |||
| 28a5ee6fcf | |||
| 71d03b8536 | |||
| 6a21cc6cf7 | |||
| 29c9e8f18a | |||
| ab25e399f0 | |||
| d8f5b27012 | |||
| 2717089156 | |||
| e2b4f0e2e7 | |||
| b7c47a2a86 | |||
| f6249b67f6 | |||
| 8935a97c17 | |||
| 9e33bc9dfd | |||
| 559cd55bc8 | |||
| a8d5f8971e | |||
| 4ead9c648f | |||
| 56349e470a | |||
| e8d8026242 | |||
| daa2b7e7c3 | |||
| cfc90f8422 | |||
| fca2b05200 | |||
| 9856805540 | |||
| 0c6845a98f | |||
| 55da765e11 | |||
| c7a4f74f9f | |||
| 43e4a806bd | |||
| 7a97c7d06f | |||
| 6fa4be38eb | |||
| 06c190887f | |||
| a7c7de4e9b | |||
| 9b5edf33a0 | |||
| 5db084e05b | |||
| 6896ae1dda | |||
| eaf9dad777 | |||
| da0a9e01e9 | |||
| d7807ff5f6 | |||
| 0783c99a19 | |||
| e63252164f | |||
| 3a19060ca0 | |||
| 4c07a83b69 | |||
| e686a76d34 | |||
| 567421af50 | |||
| 6e2ca4d825 | |||
| d3c0bc03cf | |||
| dcb6bd7a9d | |||
| ae5b37ef2e | |||
| 4c46e2609f | |||
| f21a5388f9 | |||
| 565c8efb4f | |||
| cc67a81818 | |||
| a0e6a6eb67 | |||
| 8f06a8c416 | |||
| de3b19b2ce | |||
| f898102c85 | |||
| 704ed658a9 | |||
| eb79e1cc10 | |||
| ea3b573653 | |||
| 7e48c04089 | |||
| e3fc3fd4ca | |||
| 7e8e1178b4 | |||
| 22a267aeff | |||
| eb15061d0b | |||
| d3f31ec485 | |||
| f161122412 | |||
| 3b07d01937 | |||
| 3a2ada0be0 | |||
| 365a38984e | |||
| 6c08fb68b8 | |||
| 27c837dcd1 | |||
| 2ab20ed6f9 | |||
| eb3e3969a2 | |||
| 855a4c680f | |||
| bc358c9180 | |||
| 3eb06f2891 | |||
| e008c037f5 | |||
| 0796532460 | |||
| 74f39b0952 | |||
| f4243aa75f | |||
| 85ad629a3c | |||
| e43d27f845 | |||
| 74d8afa5fa | |||
| 79b9e49d94 | |||
| c7eef67291 | |||
| 61c640ed31 | |||
| 48e3007b7f | |||
| a74a6ca2b1 | |||
| 07c9b1c98a | |||
| 1c7d66645b | |||
| 2a58606983 | |||
| 67c99849ae | |||
| d6ba77e888 | |||
| 278b221e65 | |||
| 1e3ed71470 | |||
| 63e40f2d7c | |||
| 26975877d7 | |||
| bc78968764 | |||
| feb02cb709 | |||
| 51d8343954 | |||
| 143869525f | |||
| 2532f72c59 | |||
| b89444ad8b | |||
| f47101e0c4 | |||
| 95780f5abe | |||
| a40dd9896b | |||
| 5f8a785719 | |||
| b0b893eafd | |||
| 96fcb60c33 | |||
| 30d81a47c6 | |||
| 124f8091cb | |||
| 06657cb73c | |||
| 6785f4aa74 |
7
.composer-auth.json
Normal file
7
.composer-auth.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"github-oauth": {
|
||||
"github.com": "PLEASE DO NOT USE THIS TOKEN IN YOUR OWN PROJECTS/FORKS",
|
||||
"github.com": "This token is reserved for testing the wallabag/wallabag repository",
|
||||
"github.com": "73d9411c719a0a56259dbfa16673793b39973091"
|
||||
}
|
||||
}
|
||||
12
CONTRIBUTING.md → .github/CONTRIBUTING.md
vendored
12
CONTRIBUTING.md → .github/CONTRIBUTING.md
vendored
@ -4,27 +4,21 @@
|
||||
Please [open a new issue](https://github.com/wallabag/wallabag/issues/new).
|
||||
|
||||
To fix the bug quickly, we need some infos:
|
||||
* your wallabag version (on top of the ./index.php file, and also on config page)
|
||||
* 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 problem on the `wallabag_compatibility_test.php` page
|
||||
* any particular details which could be related
|
||||
|
||||
|
||||
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 :
|
||||
* enable DEBUG mode and look the output at cache/log.txt
|
||||
* look for errors into php and server 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 dev branch** only. **Do not work on master branch**.
|
||||
|
||||
[Don't forget to read our guidelines](https://github.com/wallabag/wallabag/blob/dev/GUIDELINES.md).
|
||||
Please fork wallabag and work with **the v2 branch** only. **Do not work on master branch**.
|
||||
19
.github/ISSUE_TEMPLATE.md
vendored
Normal file
19
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
### Issue details
|
||||
|
||||
Please provide issue details here.
|
||||
Remember, this is _not_ a place to ask questions. For that, go to http://gitter.im/wallabag/wallabag.
|
||||
|
||||
### Environment
|
||||
|
||||
* wallabag version (or git revision) that exhibits the issue:
|
||||
* How did you install wallabag? Via `composer create-project` or by downloading the package?
|
||||
* Last wallabag version that did not exhibit the issue (if applicable):
|
||||
* php version:
|
||||
* OS:
|
||||
* type of hosting (shared or dedicated):
|
||||
* which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL):
|
||||
|
||||
### Steps to reproduce/test case
|
||||
|
||||
Please provide necessary steps for reproduction of this issue, or better the
|
||||
reduced test case (without any external dependencies, if possible).
|
||||
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
| Q | A
|
||||
| ------------- | ---
|
||||
| Bug fix? | yes|no
|
||||
| New feature? | yes|no
|
||||
| BC breaks? | yes|no
|
||||
| Deprecations? | yes|no
|
||||
| Tests pass? | yes|no
|
||||
| Documentation | yes|no
|
||||
| Translation | yes|no
|
||||
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
|
||||
| License | MIT
|
||||
12
.travis.yml
12
.travis.yml
@ -34,16 +34,20 @@ matrix:
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
|
||||
# exclude v1 branches
|
||||
branches:
|
||||
only:
|
||||
- v2
|
||||
except:
|
||||
- master
|
||||
- dev
|
||||
|
||||
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;
|
||||
- composer self-update --no-progress
|
||||
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
|
||||
- if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag;' -U postgres; fi;
|
||||
- if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
|
||||
|
||||
before_install:
|
||||
- if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
|
||||
|
||||
script:
|
||||
- travis_wait composer update --no-interaction --no-progress
|
||||
|
||||
4
Gemfile
4
Gemfile
@ -1,5 +1,5 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem 'capistrano', '~> 3.1'
|
||||
gem 'capistrano-symfony', '~> 0.1', :github => 'capistrano/symfony'
|
||||
gem 'capistrano', '~> 3.4'
|
||||
gem 'capistrano-symfony', '~> 1.0.0.rc1'
|
||||
gem 'capistrano-composer', '~> 0.0.3'
|
||||
|
||||
21
Gemfile.lock
21
Gemfile.lock
@ -1,12 +1,3 @@
|
||||
GIT
|
||||
remote: git://github.com/capistrano/symfony.git
|
||||
revision: ca56a01b817097d2831400ef9b1867fc8e07dcf8
|
||||
specs:
|
||||
capistrano-symfony (0.4.0)
|
||||
capistrano (~> 3.1)
|
||||
capistrano-composer (~> 0.0.3)
|
||||
capistrano-file-permissions (~> 0.1.0)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
@ -16,8 +7,12 @@ GEM
|
||||
sshkit (~> 1.3)
|
||||
capistrano-composer (0.0.6)
|
||||
capistrano (>= 3.0.0.pre)
|
||||
capistrano-file-permissions (0.1.1)
|
||||
capistrano-file-permissions (1.0.0)
|
||||
capistrano (~> 3.0)
|
||||
capistrano-symfony (1.0.0.rc1)
|
||||
capistrano (~> 3.1)
|
||||
capistrano-composer (~> 0.0.3)
|
||||
capistrano-file-permissions (~> 1.0)
|
||||
colorize (0.7.7)
|
||||
i18n (0.7.0)
|
||||
net-scp (1.2.1)
|
||||
@ -33,9 +28,9 @@ PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
capistrano (~> 3.1)
|
||||
capistrano (~> 3.4)
|
||||
capistrano-composer (~> 0.0.3)
|
||||
capistrano-symfony (~> 0.1)!
|
||||
capistrano-symfony (~> 1.0.0.rc1)
|
||||
|
||||
BUNDLED WITH
|
||||
1.10.6
|
||||
1.11.2
|
||||
|
||||
17
README.md
17
README.md
@ -1,23 +1,26 @@
|
||||
[](https://travis-ci.org/wallabag/wallabag)
|
||||
[](https://scrutinizer-ci.com/g/wallabag/wallabag/?branch=v2)
|
||||
[](https://scrutinizer-ci.com/g/wallabag/wallabag/?branch=v2)
|
||||
[](https://gitter.im/wallabag/wallabag)
|
||||
|
||||
# What is wallabag?
|
||||
wallabag is a self hostable application allowing you to not miss any content anymore.
|
||||
Click, save and read it when you can. It extracts content so that you can read it when you have time.
|
||||
|
||||
More informations on our website: [wallabag.org](http://wallabag.org)
|
||||
More informations on our website: [wallabag.org](https://wallabag.org)
|
||||
|
||||
# Want to test the v2?
|
||||
|
||||
Keep in mind it's an **unstable** branch, everything can be broken :)
|
||||
|
||||
If you don't have it yet, please [install composer](https://getcomposer.org/download/). Then you can install wallabag by executing the following commands:
|
||||
If you don't have it yet, please [install composer](https://getcomposer.org/download/).
|
||||
Then you can install wallabag by executing the following commands:
|
||||
|
||||
```
|
||||
composer create-project wallabag/wallabag wallabag 2.0.0-alpha.1
|
||||
php bin/console wallabag:install
|
||||
php bin/console server:run
|
||||
git clone https://github.com/wallabag/wallabag.git
|
||||
cd wallabag
|
||||
git checkout 2.0.0-beta.2
|
||||
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
||||
php bin/console wallabag:install --env=prod
|
||||
php bin/console server:run --env=prod
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
67
RELEASE_PROCESS.md
Normal file
67
RELEASE_PROCESS.md
Normal file
@ -0,0 +1,67 @@
|
||||
## Definition
|
||||
|
||||
A release is mostly a git tag of http://github.com/wallabag/wallabag, following [semantic versioning](http://semver.org).
|
||||
The last release at the time of writing is 2.0.0-alpha.2, from the v2 branch.
|
||||
|
||||
### Steps to release
|
||||
|
||||
During this documentation, we assume the release is `release-2.0.0-beta.1`.
|
||||
|
||||
#### Files to edit
|
||||
|
||||
- `app/config/config.yml` (`wallabag_core.version`)
|
||||
- `README.md` (`composer create-project` command)
|
||||
- `docs/en/user/installation.rst` and its translations (`composer create-project` command)
|
||||
|
||||
#### Create release on GitHub
|
||||
|
||||
- Run these commands to create the tag:
|
||||
|
||||
```
|
||||
git checkout v2
|
||||
git pull origin v2
|
||||
git checkout -b release-2.0.0-beta.1
|
||||
SYMFONY_ENV=prod composer up --no-dev
|
||||
git add --force composer.lock
|
||||
git add README.md
|
||||
git commit -m "Release wallabag 2.0.0-beta.1"
|
||||
git push origin release-2.0.0-beta.1
|
||||
```
|
||||
|
||||
- Create a new pull request with this title `DON'T MERGE Release wallabag 2.0.0-beta.1`. This pull request is used to launch builds on Travis-CI.
|
||||
- Run these commands to create the package:
|
||||
|
||||
```
|
||||
git clone git@github.com:wallabag/wallabag.git -b release-2.0.0-beta.1 release-2.0.0-beta.1
|
||||
SYMFONY_ENV=prod composer up -d=release-2.0.0-beta.1 --no-dev
|
||||
tar czf wallabag-release-2.0.0-beta.1.tar.gz --exclude="var/*" --exclude=".git" release-2.0.0-beta.1
|
||||
```
|
||||
|
||||
- [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new). You have to upload on this page the package.
|
||||
- Delete the `release-2.0.0-beta.1` branch and close the pull request (**DO NOT MERGE IT**).
|
||||
- Update the URL shortener (used on `wllbg.org` to generate links like `http://wllbg.org/latest-v2-package` or `http://wllbg.org/latest-v2`)
|
||||
- Update [the downloads page](https://github.com/wallabag/wallabag.org/blob/master/content/pages/download.md) on the website (MD5 sum, release date)
|
||||
- Drink a beer!
|
||||
|
||||
### `composer.lock`
|
||||
A release tag must contain a `composer.lock` file. It sets which dependencies were available at the time a release was done,
|
||||
making it easier to fix issues after the release. It also speeds up `composer install` on stable versions a LOT, by skipping the
|
||||
dependencies resolution part.
|
||||
|
||||
Since `composer.lock` is ignored by default, either it must be removed from `.gitignore` _in the release branch_,
|
||||
or it must be added using `git add --force composer.lock`.
|
||||
|
||||
### Target PHP version
|
||||
`composer.lock` is _always_ built for a particular version, by default the one it is generated (with `composer update`).
|
||||
|
||||
If the PHP version used to generate the .lock isn't a widely available one (like PHP 7), a more common one should
|
||||
be locally specified in `composer.lock`:
|
||||
|
||||
```json
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.5.9",
|
||||
"ext-something": "4.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -33,6 +33,9 @@ class AppKernel extends Kernel
|
||||
new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
|
||||
new Wallabag\ImportBundle\WallabagImportBundle(),
|
||||
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
|
||||
new Craue\ConfigBundle\CraueConfigBundle(),
|
||||
new Lexik\Bundle\MaintenanceBundle\LexikMaintenanceBundle(),
|
||||
new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
|
||||
];
|
||||
|
||||
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
||||
|
||||
0
app/DoctrineMigrations/.gitkeep
Normal file
0
app/DoctrineMigrations/.gitkeep
Normal file
@ -0,0 +1,29 @@
|
||||
download_pictures: Download billeder på din server
|
||||
carrot: Aktiver deling til Carrot
|
||||
diaspora_url: Diaspora URL, hvis tjenesten er aktiv
|
||||
export_epub: Aktiver eksport til ePub
|
||||
export_mobi: Aktiver eksport til .mobi
|
||||
export_pdf: Aktiver eksport til PDF
|
||||
export_csv: Aktiver eksport til CSV
|
||||
export_json: Aktiver eksport til JSON
|
||||
export_txt: Aktiver eksport til TXT
|
||||
export_xml: Aktiver eksport til XML
|
||||
pocket_consumer_key: Brugers nøgle til Pocket for at importere materialer (https://getpocket.com/developer/docs/authentication)
|
||||
shaarli_url: Shaarli-URL, hvis tjenesten er aktiv
|
||||
share_diaspora: Aktiver deling til Diaspora
|
||||
share_mail: Aktiver deling med email
|
||||
share_shaarli: Aktiver deling gennem Shaarli
|
||||
share_twitter: Aktiver deling gennem Twitter
|
||||
show_printlink: Vis et link til print-indhold
|
||||
wallabag_support_url: Support-URL for wallabag
|
||||
wallabag_url: URL for *sin* wallabag-installation
|
||||
entry: "artikel"
|
||||
export: "eksport"
|
||||
import: "import"
|
||||
misc: "misc"
|
||||
modify_settings: "Gem ændring"
|
||||
piwik_host: Hosting af din side hos Piwik
|
||||
piwik_site_id: ID for din side hos Piwik
|
||||
piwik_enabled: Aktiver Piwik
|
||||
demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)"
|
||||
demo_mode_username: "Demobruger"
|
||||
@ -0,0 +1,29 @@
|
||||
download_pictures: Download pictures on your server
|
||||
carrot: Enable share to Carrot
|
||||
diaspora_url: Diaspora URL, if the service is enabled
|
||||
export_epub: Enable ePub export
|
||||
export_mobi: Enable .mobi export
|
||||
export_pdf: Enable PDF export
|
||||
export_csv: Enable CSV export
|
||||
export_json: Enable JSON export
|
||||
export_txt: Enable TXT export
|
||||
export_xml: Enable XML export
|
||||
pocket_consumer_key: Consumer key for Pocket to import contents (https://getpocket.com/developer/docs/authentication)
|
||||
shaarli_url: Shaarli URL, if the service is enabled
|
||||
share_diaspora: Enable share to Diaspora
|
||||
share_mail: Enable share by email
|
||||
share_shaarli: Enable share to Shaarli
|
||||
share_twitter: Enable share to Twitter
|
||||
show_printlink: Display a link to print content
|
||||
wallabag_support_url: Support URL for wallabag
|
||||
wallabag_url: URL of *your* wallabag instance
|
||||
entry: "article"
|
||||
export: "export"
|
||||
import: "import"
|
||||
misc: "misc"
|
||||
modify_settings: "apply"
|
||||
piwik_host: Host of your website in Piwik
|
||||
piwik_site_id: ID of your website in Piwik
|
||||
piwik_enabled: Enable Piwik
|
||||
demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
||||
demo_mode_username: "Demo user"
|
||||
@ -0,0 +1,29 @@
|
||||
download_pictures: Descagar imagenes
|
||||
carrot: Activar compartir con Carrot
|
||||
diaspora_url: Diaspora URL, si el servicio esta activado
|
||||
export_epub: Activar exportación a ePub
|
||||
export_mobi: Activar exportación a .mobi
|
||||
export_pdf: Activar exportación a PDF
|
||||
export_csv: Activar exportación a CSV
|
||||
export_json: Activar exportación a JSON
|
||||
export_txt: Activar exportación a TXT
|
||||
export_xml: Activar exportación a XML
|
||||
pocket_consumer_key: Consumer key for Pocket to import contents (https://getpocket.com/developer/docs/authentication)
|
||||
shaarli_url: Shaarli URL, si el servicio está activado
|
||||
share_diaspora: Activar compartir con Diaspora
|
||||
share_mail: Activar compartir con email
|
||||
share_shaarli: Activar compartir con Shaarli
|
||||
share_twitter: Activar compartir con Twitter
|
||||
show_printlink: Mostrar un link para imprimir contenido
|
||||
wallabag_support_url: URL de soporte de wallabag
|
||||
wallabag_url: URL de *tu* instancia de wallabag
|
||||
entry: "artículo"
|
||||
export: "exportar"
|
||||
import: "importar"
|
||||
misc: "misc"
|
||||
modify_settings: "modificar configuración"
|
||||
piwik_host: Host de tu website de Piwik
|
||||
piwik_site_id: ID de tu website de Piwik
|
||||
piwik_enabled: Activar Piwik
|
||||
demo_mode_enabled: "Activar modo demo (sólo usado para la demo de wallabag)"
|
||||
demo_mode_username: "Nombre de usuario demo"
|
||||
@ -0,0 +1,24 @@
|
||||
download_pictures: تصاویر را در کارگزار خودتان باربگیرید
|
||||
carrot: فعالسازی همرسانی به Carrot
|
||||
diaspora_url: نشانی Diaspora، اگر فعال بود
|
||||
export_epub: فعالسازی برونسپاری به ePub
|
||||
export_mobi: فعالسازی برونسپاری به mobi
|
||||
export_pdf: فعالسازی برونسپاری به PDF
|
||||
export_csv: فعالسازی برونسپاری به CSV
|
||||
export_json: فعالسازی برونسپاری به JSON
|
||||
export_txt: فعالسازی برونسپاری به TXT
|
||||
export_xml: فعالسازی برونسپاری به XML
|
||||
pocket_consumer_key: کلید کاربری Pocket برای درونریزی مطالب (https://getpocket.com/developer/docs/authentication)
|
||||
shaarli_url: نشانی Shaarli، اگر فعال بود
|
||||
share_diaspora: فعالسازی همرسانی به Diaspora
|
||||
share_mail: فعالسازی همرسانی با ایمیل
|
||||
share_shaarli: فعالسازی همرسانی به Shaarli
|
||||
share_twitter: فعالسازی همرسانی به Twitter
|
||||
show_printlink: نمایش پیوندی برای چاپ مطلب
|
||||
wallabag_support_url: نشانی صفحهٔ پشتیبانی wallabag
|
||||
wallabag_url: نشانی صفحهٔ wallabag *شما*
|
||||
entry: "مقاله"
|
||||
export: "برونسپاری"
|
||||
import: "درونریزی"
|
||||
misc: "غیره"
|
||||
modify_settings: "اعمال"
|
||||
@ -0,0 +1,29 @@
|
||||
download_pictures: Télécharger les images sur le serveur
|
||||
carrot: Activer le partage vers Carrot
|
||||
diaspora_url: URL de Diaspora, si le service Diaspora est activé
|
||||
export_epub: Activer l'export ePub
|
||||
export_mobi: Activer l'export .mobi
|
||||
export_pdf: Activer l'export PDF
|
||||
export_csv: Activer l'export CSV
|
||||
export_json: Activer l'export JSON
|
||||
export_txt: Activer l'export TXT
|
||||
export_xml: Activer l'export XML
|
||||
pocket_consumer_key: Clé d'authentification Pocket pour importer les données (https://getpocket.com/developer/docs/authentication)
|
||||
shaarli_url: URL de Shaarli, si le service Shaarli est activé
|
||||
share_diaspora: Activer le partage vers Diaspora
|
||||
share_mail: Activer le partage par email
|
||||
share_shaarli: Activer le partage vers Shaarli
|
||||
share_twitter: Activer le partage vers Twitter
|
||||
show_printlink: Afficher un lien pour imprimer
|
||||
wallabag_support_url: URL de support de wallabag
|
||||
wallabag_url: URL de *votre* instance de wallabag
|
||||
entry: "article"
|
||||
export: "export"
|
||||
import: "import"
|
||||
misc: "divers"
|
||||
modify_settings: "appliquer"
|
||||
piwik_host: URL de votre site dans Piwik
|
||||
piwik_site_id: ID de votre site dans Piwik
|
||||
piwik_enabled: Activer Piwik
|
||||
demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)"
|
||||
demo_mode_username: "Utilisateur de la démo"
|
||||
@ -0,0 +1,24 @@
|
||||
download_pictures: Pobierz obrazy na swój serwer
|
||||
carrot: Włącz udostępnianie dla Carrot
|
||||
diaspora_url: Adres URL Diaspora, jeżeli usługa jest włączona
|
||||
export_epub: Włącz eksport do ePub
|
||||
export_mobi: Włącz eksport do .mobi
|
||||
export_pdf: Włącz eksport do PDF
|
||||
export_csv: Włącz eksport do CSV
|
||||
export_json: Włącz eksport do JSON
|
||||
export_txt: Włącz eksport do TXT
|
||||
export_xml: Włącz eksport do XML
|
||||
pocket_consumer_key: Klucz klienta Pocket do importu zawartości (https://getpocket.com/developer/docs/authentication)
|
||||
shaarli_url: Adress URL Shaarli, jeżeli usługa jest włączona
|
||||
share_diaspora: Włącz udostępnianie dla Diaspora
|
||||
share_mail: Włącz udostępnianie przez email
|
||||
share_shaarli: Włącz udostępnianie dla Shaarli
|
||||
share_twitter: Włącz udostępnianie dla Twitter
|
||||
show_printlink: Pokaż link do wydrukowania zawartości
|
||||
wallabag_support_url: Adres URL wsparcia dla wallabag
|
||||
wallabag_url: Adres *twojej* instacji wallabag
|
||||
entry: "artykuł"
|
||||
export: "eksport"
|
||||
import: "import"
|
||||
misc: "różne"
|
||||
modify_settings: "zatwierdz"
|
||||
@ -0,0 +1,24 @@
|
||||
download_pictures: Descarcă poze pe server
|
||||
carrot: Permite share către Carrot
|
||||
diaspora_url: Diaspora URL, dacă serviciul este permis
|
||||
export_epub: Permite exportare ePub
|
||||
export_mobi: Permite exportare .mobi
|
||||
export_pdf: Permite exportare PDF
|
||||
export_csv: Permite exportare CSV
|
||||
export_json: Permite exportare JSON
|
||||
export_txt: Permite exportare TXT
|
||||
export_xml: Permite exportare XML
|
||||
pocket_consumer_key: Cheie consumator pentru importarea contentului din Pocket (https://getpocket.com/developer/docs/authentication)
|
||||
shaarli_url: Shaarli URL, dacă serviciul este permis
|
||||
share_diaspora: Permite share către Diaspora
|
||||
share_mail: Permite share prin email
|
||||
share_shaarli: Permite share către Shaarli
|
||||
share_twitter: Permite share către Twitter
|
||||
show_printlink: Afișează un link pentru a printa content-ul
|
||||
wallabag_support_url: URL-ul de suport pentru wallabag
|
||||
wallabag_url: URL-ul instanței tale wallabag
|
||||
entry: "alticol"
|
||||
export: "exportă"
|
||||
import: "importă"
|
||||
misc: "diverse"
|
||||
modify_settings: "aplică"
|
||||
@ -0,0 +1,43 @@
|
||||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}internal settings{% endtrans %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card-panel settings">
|
||||
{{ form_start(form, {'attr': {'class': 'craue_config_settings_modify'}}) }}
|
||||
{{ form_errors(form) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="div_tabs col s12">
|
||||
<ul class="tabs">
|
||||
{% for section in sections | craue_sortSections %}
|
||||
<li class="tab col s3"><a href="#set-{{ section }}">{{ section | trans({}, 'CraueConfigBundle') }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% for section in sections | craue_sortSections %}
|
||||
<div id="set-{{ section }}" class="col s12">
|
||||
{% for setting in form.settings if setting.section.vars.value == section %}
|
||||
{{ form_row(setting.name) }}
|
||||
{{ form_row(setting.section) }}
|
||||
{{ form_row(setting.value, {
|
||||
'label': setting.name.vars.value | trans({}, 'CraueConfigBundle'),
|
||||
}) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<button class="btn waves-effect waves-light" type="submit" name="action">
|
||||
{{ 'modify_settings' | trans({}, 'CraueConfigBundle') }}
|
||||
</button>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@ -0,0 +1,2 @@
|
||||
Login: "Log ind"
|
||||
Enter your email address below and we'll send you password reset instructions.: "Indtast din emailadresse nedenfor, så sender vi dig instrukser til at nulstille din adgangskode."
|
||||
@ -0,0 +1,2 @@
|
||||
Login: "Logearse"
|
||||
Enter your email address below and we'll send you password reset instructions.: "Introduzca su dirección de email y le enviaremos las instrucciones para resetear su contraseña."
|
||||
@ -0,0 +1,2 @@
|
||||
Login: "Se connecter"
|
||||
Enter your email address below and we'll send you password reset instructions.: "Renseignez votre adresse email, nous vous enverrons les instructions pour réinitialiser votre mot de passe."
|
||||
@ -1,6 +1,10 @@
|
||||
# config valid only for current version of Capistrano
|
||||
lock '3.4.0'
|
||||
|
||||
set :log_path, "var/logs"
|
||||
set :cache_path, "var/cache"
|
||||
set :symfony_console_path, 'bin/console'
|
||||
|
||||
set :application, 'wallabag'
|
||||
set :repo_url, 'git@github.com:wallabag/wallabag.git'
|
||||
|
||||
@ -16,8 +20,7 @@ set :log_level, :info
|
||||
set :composer_install_flags, '--no-dev --prefer-dist --no-interaction --optimize-autoloader'
|
||||
|
||||
set :linked_files, %w{app/config/parameters.yml}
|
||||
set :linked_dirs, %w{app/logs web/uploads data}
|
||||
|
||||
set :linked_dirs, [fetch(:log_path), "var/sessions", "web/uploads", "data"]
|
||||
set :keep_releases, 3
|
||||
|
||||
after 'deploy:finishing', 'deploy:cleanup'
|
||||
|
||||
@ -28,10 +28,22 @@ framework:
|
||||
assets: ~
|
||||
|
||||
wallabag_core:
|
||||
version: 2.0.0-beta.2
|
||||
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
|
||||
languages:
|
||||
en: 'English'
|
||||
fr: 'Français'
|
||||
de: 'Deutsch'
|
||||
tr: 'Türkçe'
|
||||
fa: 'فارسی'
|
||||
ro: 'Română'
|
||||
pl: 'Polish'
|
||||
da: 'Dansk'
|
||||
es: 'Español'
|
||||
items_on_page: 12
|
||||
theme: material
|
||||
language: en
|
||||
rss_limit: 50
|
||||
|
||||
wallabag_import:
|
||||
allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain']
|
||||
@ -41,25 +53,6 @@ wallabag_import:
|
||||
twig:
|
||||
debug: "%kernel.debug%"
|
||||
strict_variables: "%kernel.debug%"
|
||||
globals:
|
||||
share_twitter: %share_twitter%
|
||||
share_mail: %share_mail%
|
||||
share_shaarli: %share_shaarli%
|
||||
shaarli_url: %shaarli_url%
|
||||
share_diaspora: %share_diaspora%
|
||||
diaspora_url: %diaspora_url%
|
||||
flattr: %flattr%
|
||||
flattrable: 1
|
||||
flattred: 2
|
||||
carrot: %carrot%
|
||||
show_printlink: %show_printlink%
|
||||
export_epub: %export_epub%
|
||||
export_mobi: %export_mobi%
|
||||
export_pdf: %export_pdf%
|
||||
version: %app.version%
|
||||
twofactor_auth: %twofactor_auth%
|
||||
warning_message: %warning_message%
|
||||
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
|
||||
form_themes:
|
||||
- "LexikFormFilterBundle:Form:form_div_layout.html.twig"
|
||||
|
||||
@ -180,8 +173,10 @@ fos_user:
|
||||
user_class: Wallabag\UserBundle\Entity\User
|
||||
registration:
|
||||
confirmation:
|
||||
enabled: true
|
||||
|
||||
enabled: %fosuser_confirmation%
|
||||
from_email:
|
||||
address: %from_email%
|
||||
sender_name: wallabag
|
||||
fos_oauth_server:
|
||||
db_driver: orm
|
||||
client_class: Wallabag\ApiBundle\Entity\Client
|
||||
@ -207,3 +202,13 @@ scheb_two_factor:
|
||||
kphoen_rulerz:
|
||||
executors:
|
||||
doctrine: true
|
||||
|
||||
lexik_maintenance:
|
||||
authorized:
|
||||
ips: ['127.0.0.1']
|
||||
driver:
|
||||
ttl: 3600
|
||||
class: 'Lexik\Bundle\MaintenanceBundle\Drivers\DatabaseDriver'
|
||||
response:
|
||||
code: 503
|
||||
status: "wallabag Service Temporarily Unavailable"
|
||||
|
||||
@ -35,41 +35,13 @@ parameters:
|
||||
locale: en
|
||||
|
||||
# A secret key that's used to generate certain security-related tokens
|
||||
secret: ThisTokenIsNotSoSecretChangeIt
|
||||
secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
|
||||
|
||||
# wallabag misc
|
||||
app.version: 2.0.0-alpha
|
||||
# two factor stuff
|
||||
twofactor_auth: true
|
||||
twofactor_sender: no-reply@wallabag.org
|
||||
|
||||
# message to display at the bottom of the page
|
||||
warning_message: >
|
||||
You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
|
||||
# fosuser stuff
|
||||
fosuser_confirmation: true
|
||||
|
||||
download_pictures: false # if true, pictures will be stored into data/assets for each article
|
||||
|
||||
# Entry view
|
||||
share_twitter: true
|
||||
share_mail: true
|
||||
share_shaarli: true
|
||||
shaarli_url: http://myshaarli.com
|
||||
share_diaspora: true
|
||||
diaspora_url: http://diasporapod.com
|
||||
flattr: true
|
||||
carrot: true
|
||||
show_printlink: true
|
||||
export_epub: true
|
||||
export_mobi: true
|
||||
export_pdf: true
|
||||
wallabag_url: http://v2.wallabag.org
|
||||
wallabag_support_url: 'https://www.wallabag.org/pages/support.html'
|
||||
|
||||
# default user config
|
||||
items_on_page: 12
|
||||
theme: material
|
||||
language: en
|
||||
from_email: no-reply@wallabag.org
|
||||
rss_limit: 50
|
||||
|
||||
# pocket import
|
||||
pocket_consumer_key: xxxxxxxx
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
wallabag_annotation:
|
||||
type : rest
|
||||
resource: "@WallabagAnnotationBundle/Resources/config/routing_annotations.yml"
|
||||
|
||||
wallabag_import:
|
||||
resource: "@WallabagImportBundle/Controller/"
|
||||
type: annotation
|
||||
@ -22,7 +26,9 @@ rest :
|
||||
|
||||
homepage:
|
||||
path: "/{page}"
|
||||
defaults: { _controller: WallabagCoreBundle:Entry:showUnread, page : 1 }
|
||||
defaults:
|
||||
_controller: WallabagCoreBundle:Entry:showUnread
|
||||
page : 1
|
||||
requirements:
|
||||
page: \d+
|
||||
|
||||
@ -31,3 +37,8 @@ fos_user:
|
||||
|
||||
fos_oauth_server_token:
|
||||
resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml"
|
||||
|
||||
craue_config_settings_modify:
|
||||
path: /settings
|
||||
defaults:
|
||||
_controller: CraueConfigBundle:Settings:modify
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
Rest_Wallabag:
|
||||
type : rest
|
||||
resource: "@WallabagApiBundle/Resources/config/routing_rest.yml"
|
||||
|
||||
|
||||
@ -53,8 +53,11 @@ security:
|
||||
|
||||
access_control:
|
||||
- { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: ^/settings, roles: ROLE_SUPER_ADMIN }
|
||||
- { path: ^/annotations, roles: ROLE_USER }
|
||||
- { path: ^/, roles: ROLE_USER }
|
||||
|
||||
@ -19,6 +19,12 @@ services:
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
wallabag.twig_piwik_extension:
|
||||
class: PiwikTwigExtension\PiwikTwigExtension
|
||||
public: false
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
wallabag.locale_listener:
|
||||
class: Wallabag\CoreBundle\EventListener\LocaleListener
|
||||
arguments: ["%kernel.default_locale%"]
|
||||
|
||||
@ -12,7 +12,7 @@ parameters:
|
||||
test_database_driver: pdo_mysql
|
||||
test_database_host: localhost
|
||||
test_database_port: 3306
|
||||
test_database_name: wallabag
|
||||
test_database_name: wallabag_test
|
||||
test_database_user: root
|
||||
test_database_password: ~
|
||||
test_database_path: ~
|
||||
@ -27,39 +27,11 @@ parameters:
|
||||
# A secret key that's used to generate certain security-related tokens
|
||||
secret: ThisTokenIsNotSoSecretChangeIt
|
||||
|
||||
# wallabag misc
|
||||
app.version: 2.0.0-alpha
|
||||
# two factor stuff
|
||||
twofactor_auth: true
|
||||
twofactor_sender: no-reply@wallabag.org
|
||||
|
||||
# message to display at the bottom of the page
|
||||
warning_message: >
|
||||
You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
|
||||
# fosuser stuff
|
||||
fosuser_confirmation: true
|
||||
|
||||
download_pictures: false # if true, pictures will be stored into data/assets for each article
|
||||
|
||||
# Entry view
|
||||
share_twitter: true
|
||||
share_mail: true
|
||||
share_shaarli: true
|
||||
shaarli_url: http://myshaarli.com
|
||||
share_diaspora: true
|
||||
diaspora_url: http://diasporapod.com
|
||||
flattr: true
|
||||
carrot: true
|
||||
show_printlink: true
|
||||
export_epub: true
|
||||
export_mobi: true
|
||||
export_pdf: true
|
||||
wallabag_url: http://v2.wallabag.org
|
||||
wallabag_support_url: 'https://www.wallabag.org/pages/support.html'
|
||||
|
||||
# default user config
|
||||
items_on_page: 12
|
||||
theme: material
|
||||
language: en_US
|
||||
from_email: no-reply@wallabag.org
|
||||
rss_limit: 50
|
||||
|
||||
# pocket import
|
||||
pocket_consumer_key: xxxxxxxx
|
||||
|
||||
@ -12,7 +12,7 @@ parameters:
|
||||
test_database_driver: pdo_pgsql
|
||||
test_database_host: localhost
|
||||
test_database_port:
|
||||
test_database_name: wallabag
|
||||
test_database_name: wallabag_test
|
||||
test_database_user: travis
|
||||
test_database_password: ~
|
||||
test_database_path: ~
|
||||
@ -27,39 +27,11 @@ parameters:
|
||||
# A secret key that's used to generate certain security-related tokens
|
||||
secret: ThisTokenIsNotSoSecretChangeIt
|
||||
|
||||
# wallabag misc
|
||||
app.version: 2.0.0-alpha
|
||||
# two factor stuff
|
||||
twofactor_auth: true
|
||||
twofactor_sender: no-reply@wallabag.org
|
||||
|
||||
# message to display at the bottom of the page
|
||||
warning_message: >
|
||||
You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
|
||||
# fosuser stuff
|
||||
fosuser_confirmation: true
|
||||
|
||||
download_pictures: false # if true, pictures will be stored into data/assets for each article
|
||||
|
||||
# Entry view
|
||||
share_twitter: true
|
||||
share_mail: true
|
||||
share_shaarli: true
|
||||
shaarli_url: http://myshaarli.com
|
||||
share_diaspora: true
|
||||
diaspora_url: http://diasporapod.com
|
||||
flattr: true
|
||||
carrot: true
|
||||
show_printlink: true
|
||||
export_epub: true
|
||||
export_mobi: true
|
||||
export_pdf: true
|
||||
wallabag_url: http://v2.wallabag.org
|
||||
wallabag_support_url: 'https://www.wallabag.org/pages/support.html'
|
||||
|
||||
# default user config
|
||||
items_on_page: 12
|
||||
theme: material
|
||||
language: en_US
|
||||
from_email: no-reply@wallabag.org
|
||||
rss_limit: 50
|
||||
|
||||
# pocket import
|
||||
pocket_consumer_key: xxxxxxxx
|
||||
|
||||
@ -27,39 +27,11 @@ parameters:
|
||||
# A secret key that's used to generate certain security-related tokens
|
||||
secret: ThisTokenIsNotSoSecretChangeIt
|
||||
|
||||
# wallabag misc
|
||||
app.version: 2.0.0-alpha
|
||||
# two factor stuff
|
||||
twofactor_auth: true
|
||||
twofactor_sender: no-reply@wallabag.org
|
||||
|
||||
# message to display at the bottom of the page
|
||||
warning_message: >
|
||||
You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
|
||||
# fosuser stuff
|
||||
fosuser_confirmation: true
|
||||
|
||||
download_pictures: false # if true, pictures will be stored into data/assets for each article
|
||||
|
||||
# Entry view
|
||||
share_twitter: true
|
||||
share_mail: true
|
||||
share_shaarli: true
|
||||
shaarli_url: http://myshaarli.com
|
||||
share_diaspora: true
|
||||
diaspora_url: http://diasporapod.com
|
||||
flattr: true
|
||||
carrot: true
|
||||
show_printlink: true
|
||||
export_epub: true
|
||||
export_mobi: true
|
||||
export_pdf: true
|
||||
wallabag_url: http://v2.wallabag.org
|
||||
wallabag_support_url: 'https://www.wallabag.org/pages/support.html'
|
||||
|
||||
# default user config
|
||||
items_on_page: 12
|
||||
theme: material
|
||||
language: en_US
|
||||
from_email: no-reply@wallabag.org
|
||||
rss_limit: 50
|
||||
|
||||
# pocket import
|
||||
pocket_consumer_key: xxxxxxxx
|
||||
|
||||
@ -7,7 +7,7 @@ $lineSize = 70;
|
||||
$symfonyRequirements = new SymfonyRequirements();
|
||||
$iniPath = $symfonyRequirements->getPhpIniConfigPath();
|
||||
|
||||
echo_title('Symfony2 Requirements Checker');
|
||||
echo_title('Symfony Requirements Checker');
|
||||
|
||||
echo '> PHP is using the following php.ini file:'.PHP_EOL;
|
||||
if ($iniPath) {
|
||||
@ -43,9 +43,9 @@ foreach ($symfonyRequirements->getRecommendations() as $req) {
|
||||
}
|
||||
|
||||
if ($checkPassed) {
|
||||
echo_block('success', 'OK', 'Your system is ready to run Symfony2 projects');
|
||||
echo_block('success', 'OK', 'Your system is ready to run Symfony projects');
|
||||
} else {
|
||||
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony2 projects');
|
||||
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects');
|
||||
|
||||
echo_title('Fix the following mandatory requirements', 'red');
|
||||
|
||||
|
||||
@ -29,6 +29,20 @@
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"ext-pcre": "*",
|
||||
"ext-dom": "*",
|
||||
"ext-curl": "*",
|
||||
"ext-gd": "*",
|
||||
"ext-session": "*",
|
||||
"ext-ctype": "*",
|
||||
"ext-hash": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-iconv": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-pdo": "*",
|
||||
"symfony/symfony": "3.0.*",
|
||||
"doctrine/orm": "^2.5",
|
||||
"doctrine/doctrine-bundle": "^1.6",
|
||||
@ -54,8 +68,8 @@
|
||||
"pagerfanta/pagerfanta": "~1.0.3",
|
||||
"lexik/form-filter-bundle": "~5.0",
|
||||
"j0k3r/graby": "~1.0",
|
||||
"friendsofsymfony/user-bundle": "dev-master",
|
||||
"friendsofsymfony/oauth-server-bundle": "^1.5@dev",
|
||||
"friendsofsymfony/user-bundle": "~2.0@dev",
|
||||
"friendsofsymfony/oauth-server-bundle": "^1.5",
|
||||
"stof/doctrine-extensions-bundle": "^1.2@dev",
|
||||
"scheb/two-factor-bundle": "~2.0",
|
||||
"grandt/phpepub": "~4.0",
|
||||
@ -63,7 +77,10 @@
|
||||
"kphoen/rulerz-bundle": "~0.10",
|
||||
"guzzlehttp/guzzle": "^5.2.0",
|
||||
"doctrine/doctrine-migrations-bundle": "^1.0",
|
||||
"paragonie/random_compat": "~1.0"
|
||||
"paragonie/random_compat": "~1.0",
|
||||
"craue/config-bundle": "~1.4",
|
||||
"mnapoli/piwik-twig-extension": "^1.0",
|
||||
"lexik/maintenance-bundle": "~2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
||||
@ -108,7 +125,7 @@
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "": "src/" },
|
||||
"psr-4": { "Wallabag\\": "src/Wallabag/" },
|
||||
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
|
||||
},
|
||||
"config": {
|
||||
|
||||
6042
composer.lock
generated
Normal file
6042
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,5 @@
|
||||
version: '2'
|
||||
services:
|
||||
nginx:
|
||||
image: nginx
|
||||
ports:
|
||||
@ -10,7 +12,11 @@ nginx:
|
||||
- php:php
|
||||
command: nginx -c /nginx.conf
|
||||
php:
|
||||
build: docker/php
|
||||
build:
|
||||
context: docker/php
|
||||
args:
|
||||
# Set here your timezone using one of this: http://php.net/manual/en/timezones.php
|
||||
timezone: 'Europe/Monaco'
|
||||
ports:
|
||||
- "9000:9000"
|
||||
volumes:
|
||||
|
||||
@ -1,10 +1,15 @@
|
||||
FROM php:fpm
|
||||
|
||||
# Default timezone. To change it, use the argument in the docker-compose.yml file
|
||||
ARG timezone='Europe/Paris'
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libmcrypt-dev libicu-dev libpq-dev libxml2-dev \
|
||||
&& docker-php-ext-install \
|
||||
iconv mcrypt mbstring intl pdo pdo_mysql pdo_pgsql
|
||||
|
||||
RUN echo "date.timezone="$timezone > /usr/local/etc/php/conf.d/date_timezone.ini
|
||||
|
||||
RUN usermod -u 1000 www-data
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Run Wallabag in docker-compose
|
||||
Run wallabag in docker-compose
|
||||
==============================
|
||||
|
||||
In order to run your own development instance of wallabag, you may
|
||||
@ -15,8 +15,8 @@ your system and up to date.
|
||||
Switch DBMS
|
||||
-----------
|
||||
|
||||
By default, Wallabag will start with a sqlite database.
|
||||
Since Wallabag provide support for Postgresql and MySQL, docker
|
||||
By default, wallabag will start with a SQLite database.
|
||||
Since wallabag provides support for Postgresql and MySQL, docker
|
||||
containers are also available for these ones.
|
||||
|
||||
In ``docker-compose.yml``, for the chosen DBMS uncomment:
|
||||
@ -33,7 +33,7 @@ In order to keep running Symfony commands on your host (such as
|
||||
like ``SYMFONY__ENV__DATABASE_HOST`` will exist.
|
||||
- create a ``127.0.0.1 rdbms`` on your system ``hosts`` file
|
||||
|
||||
Run Wallabag
|
||||
Run wallabag
|
||||
------------
|
||||
|
||||
#. Fork and clone the project
|
||||
|
||||
32
docs/en/developer/maintenance.rst
Normal file
32
docs/en/developer/maintenance.rst
Normal file
@ -0,0 +1,32 @@
|
||||
Maintenance mode
|
||||
================
|
||||
|
||||
If you have some long tasks to do on your wallabag instance, you can enable a maintenance mode.
|
||||
Nobody will have access to your instance.
|
||||
|
||||
Enable maintenance mode
|
||||
-----------------------
|
||||
|
||||
To enable maintenance mode, execute this command:
|
||||
|
||||
::
|
||||
|
||||
bin/console lexik:maintenance:lock --no-interaction
|
||||
|
||||
You can set your IP address in ``app/config/config.yml`` if you want to access to wallabag even if maintenance mode is enabled. For example:
|
||||
|
||||
::
|
||||
|
||||
lexik_maintenance:
|
||||
authorized:
|
||||
ips: ['127.0.0.1']
|
||||
|
||||
|
||||
Disable maintenance mode
|
||||
------------------------
|
||||
|
||||
To disable maintenance mode, execute this command:
|
||||
|
||||
::
|
||||
|
||||
bin/console lexik:maintenance:unlock
|
||||
60
docs/en/developer/translate.rst
Normal file
60
docs/en/developer/translate.rst
Normal file
@ -0,0 +1,60 @@
|
||||
Translate wallabag
|
||||
==================
|
||||
|
||||
wallabag web application
|
||||
------------------------
|
||||
|
||||
Translation files
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
As wallabag is mainly developed by a French team, please consider that french
|
||||
translation is the most updated one and please copy it to create your own translation.
|
||||
|
||||
You can find translation files here: https://github.com/wallabag/wallabag/tree/v2/src/Wallabag/CoreBundle/Resources/translations.
|
||||
|
||||
You have to create ``messages.CODE.yml`` and ``validators.CODE.yml``, where CODE
|
||||
is the ISO 639-1 code of your language (`see wikipedia <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`__).
|
||||
|
||||
Other files to translate:
|
||||
|
||||
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/CraueConfigBundle/translations.
|
||||
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/FOSUserBundle/translations.
|
||||
|
||||
You have to create ``THE_TRANSLATION_FILE.CODE.yml`` files.
|
||||
|
||||
Configuration file
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You have to edit `app/config/config.yml
|
||||
<https://github.com/wallabag/wallabag/blob/v2/app/config/config.yml>`__ to display
|
||||
your language on Configuration page of wallabag (to allow users to switch to this new translation).
|
||||
|
||||
Under the ``wallabag_core.languages`` section, you have to add a new line with
|
||||
your translation. For example:
|
||||
|
||||
::
|
||||
|
||||
wallabag_core:
|
||||
...
|
||||
languages:
|
||||
en: 'English'
|
||||
fr: 'Français'
|
||||
|
||||
|
||||
For the first column (``en``, ``fr``, etc.), you have to add the ISO 639-1 code
|
||||
of your language (see above).
|
||||
|
||||
For the second column, it's the name of your language. Just that.
|
||||
|
||||
wallabag documentation
|
||||
----------------------
|
||||
|
||||
.. note::
|
||||
|
||||
Contrary to the web application, the main language for documentation is english.
|
||||
|
||||
Documentation files are stored here: https://github.com/wallabag/wallabag/tree/v2/docs
|
||||
|
||||
You need to respect the ``en`` folder structure when you create your own translation.
|
||||
@ -8,6 +8,10 @@ wallabag documentation
|
||||
**wallabag** is a read-it-later application: it saves a web page by
|
||||
keeping content only. Elements like navigation or ads are deleted.
|
||||
|
||||
.. note::
|
||||
|
||||
This documentation is about wallabag v2. If you want to read documentation for wallabag v1, `please have a look here <https://github.com/wallabag/documentation>`__.
|
||||
|
||||
The main documentation for this application is organized into a couple sections:
|
||||
|
||||
* :ref:`user-docs`
|
||||
@ -19,10 +23,13 @@ The main documentation for this application is organized into a couple sections:
|
||||
:maxdepth: 2
|
||||
:caption: User documentation
|
||||
|
||||
user/installation
|
||||
user/create_account
|
||||
user/login
|
||||
user/configuration
|
||||
user/first_article
|
||||
user/errors_during_fetching
|
||||
user/annotations
|
||||
user/import
|
||||
user/download_articles
|
||||
user/filters
|
||||
@ -35,3 +42,6 @@ The main documentation for this application is organized into a couple sections:
|
||||
:caption: Developer documentation
|
||||
|
||||
developer/docker
|
||||
developer/translate
|
||||
developer/maintenance
|
||||
developer/releasing
|
||||
|
||||
24
docs/en/user/annotations.rst
Normal file
24
docs/en/user/annotations.rst
Normal file
@ -0,0 +1,24 @@
|
||||
Annotations
|
||||
===========
|
||||
|
||||
In each article you read, you can write annotations. It's easier to understand with some pictures.
|
||||
|
||||
Select the part of the article that you want to annotate and click on the pencil:
|
||||
|
||||
.. image:: ../../img/user/annotations_1.png
|
||||
:alt: Select your text
|
||||
:align: center
|
||||
|
||||
Then, write your annotation:
|
||||
|
||||
.. image:: ../../img/user/annotations_2.png
|
||||
:alt: Write your annotation
|
||||
:align: center
|
||||
|
||||
The text is now highlighted and you can read your annotation if you move the mouse cursor over it.
|
||||
|
||||
.. image:: ../../img/user/annotations_3.png
|
||||
:alt: Read your annotation
|
||||
:align: center
|
||||
|
||||
You can create as many annotations as you wish.
|
||||
@ -3,7 +3,8 @@ Configuration
|
||||
|
||||
Now you're logged in, it's time to configure your account as you want.
|
||||
|
||||
Click on ``Config`` menu. You have five tabs: ``Settings``, ``RSS``, ``User information``, ``Password`` and ``Tagging rules``.
|
||||
Click on ``Config`` menu. You have five tabs: ``Settings``, ``RSS``,
|
||||
``User information``, ``Password`` and ``Tagging rules``.
|
||||
|
||||
Settings
|
||||
--------
|
||||
@ -11,7 +12,9 @@ Settings
|
||||
Theme
|
||||
~~~~~
|
||||
|
||||
wallabag is customizable. You can choose your prefered theme here. You can also create a new one, a chapter is dedicated for this. The default theme is ``Material``, it's the theme used in the documentation screenshots.
|
||||
wallabag is customizable. You can choose your prefered theme here. You can also
|
||||
create a new one, a chapter will be dedicated for this. The default theme is
|
||||
``Material``, it's the theme used in the documentation screenshots.
|
||||
|
||||
Items per page
|
||||
~~~~~~~~~~~~~~
|
||||
@ -21,7 +24,8 @@ You can change the number of articles displayed on each page.
|
||||
Language
|
||||
~~~~~~~~
|
||||
|
||||
You can change the language of wallabag interface.
|
||||
You can change the language of wallabag interface. You need to logout for this change
|
||||
to take effect.
|
||||
|
||||
RSS
|
||||
---
|
||||
@ -43,41 +47,49 @@ You can change your name, your email address and enable ``Two factor authenticat
|
||||
Two factor authentication
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Two-factor authentication (also known as 2FA) is a technology patented in 1984 that provides identification of users by means of the combination of two different components.
|
||||
Two-factor authentication (also known as 2FA) is a technology patented in 1984
|
||||
that provides identification of users by means of the combination of two different components.
|
||||
|
||||
https://en.wikipedia.org/wiki/Two-factor_authentication
|
||||
|
||||
If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email. You have to put this code on the following form.
|
||||
If you enable 2FA, each time you want to login to wallabag, you'll receive
|
||||
a code by email. You have to put this code on the following form.
|
||||
|
||||
.. image:: ../../img/user/2FA_form.png
|
||||
:alt: Two factor authentication
|
||||
:align: center
|
||||
|
||||
If you don't want to receive a code each time you want to login, you can check the ``I'm on a trusted computer`` checkbox: wallabag will remember you for 15 days.
|
||||
If you don't want to receive a code each time you want to login, you can check
|
||||
the ``I'm on a trusted computer`` checkbox: wallabag will remember you for 15 days.
|
||||
|
||||
Password
|
||||
--------
|
||||
|
||||
You can change your password here.
|
||||
You can change your password here (8 characters minimum).
|
||||
|
||||
Tagging rules
|
||||
-------------
|
||||
|
||||
If you want to automatically assign a tag to new articles, this part of the configuration is for you.
|
||||
If you want to automatically assign a tag to new articles, this part
|
||||
of the configuration is for you.
|
||||
|
||||
What does « tagging rules » mean?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
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.
|
||||
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 do I use them?
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
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.
|
||||
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 »*.
|
||||
Complex rules can be written by using predefined operators:
|
||||
if *« readingTime >= 5 AND domainName = "github.com" »* then tag as *« long reading, github »*.
|
||||
|
||||
Which variables and operators can I use to write rules?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -7,13 +7,16 @@ On the login page, click on ``Register`` button.
|
||||
:alt: Registration form
|
||||
:align: center
|
||||
|
||||
You have to fill the form. Please sure to type a valid email address, we'll send you an activation email.
|
||||
You have to fill the form. Please sure to type a valid email address,
|
||||
we'll send you an activation email.
|
||||
|
||||
.. image:: ../../img/user/sent_email.png
|
||||
:alt: Email was sent to activate account
|
||||
:align: center
|
||||
|
||||
Check your inbox, you now have a new mail with a link like this ``http://wallabag/register/confirm/Ba19wokGovN-DdBQNfg4YgRkUQWRP4-k2g0Bk-hBTX4``. Click on it to activate your account.
|
||||
Check your inbox, you now have a new mail with a link like this
|
||||
``http://wallabag/register/confirm/Ba19wokGovN-DdBQNfg4YgRkUQWRP4-k2g0Bk-hBTX4``.
|
||||
Click on it to activate your account.
|
||||
|
||||
Your account is now activated.
|
||||
|
||||
@ -33,11 +36,11 @@ Make sure that all fields are well filled:
|
||||
* same passwords in two fields
|
||||
|
||||
I don't receive my activation email
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Are you sure your email address was correct? Did you check your spams folder?
|
||||
|
||||
When I click on the activation link, I've got this message: ``The user with confirmation token "DtrOPfbQeVkWf6N" does not exist``.
|
||||
~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You already enabled your account or the URL of the activation email is wrong.
|
||||
|
||||
@ -9,7 +9,8 @@ On the article view, click on this icon, in the sidebar:
|
||||
:alt: download article
|
||||
:align: center
|
||||
|
||||
You can also download a full category in these formats. For example, on **Unread** view, click on this icon in the top bar:
|
||||
You can also download a full category (unread, starred, archive) in these formats.
|
||||
For example, on **Unread** view, click on this icon in the top bar:
|
||||
|
||||
.. image:: ../../img/user/download_articles.png
|
||||
:alt: download articles
|
||||
|
||||
27
docs/en/user/errors_during_fetching.rst
Normal file
27
docs/en/user/errors_during_fetching.rst
Normal file
@ -0,0 +1,27 @@
|
||||
Errors during fetching articles
|
||||
===============================
|
||||
|
||||
Why does the fetch of an article fail?
|
||||
--------------------------------------
|
||||
|
||||
There may be several reasons:
|
||||
|
||||
- network problem
|
||||
- wallabag can't fetch content due to the website structure
|
||||
|
||||
How can I help to fix that?
|
||||
---------------------------
|
||||
|
||||
- `by sending us an email with the article's URL <mailto:hello@wallabag.org>`_
|
||||
- by trying to fix this article by yourself :) by creating a file for the article.
|
||||
You can use this tool http://siteconfig.fivefilters.org/.
|
||||
|
||||
How can I try to re-fetch this article?
|
||||
---------------------------------------
|
||||
|
||||
If wallabag failed when fetching an article, you can click on the reload button
|
||||
(the third on the below picture).
|
||||
|
||||
.. image:: ../../img/user/refetch.png
|
||||
:alt: Refetch content
|
||||
:align: center
|
||||
@ -1,2 +1,49 @@
|
||||
Filters
|
||||
=======
|
||||
|
||||
To retrieve articles easier, you can use filters.
|
||||
Click on the third icon in the top bar.
|
||||
|
||||
.. image:: ../../img/user/topbar.png
|
||||
:alt: Top bar
|
||||
:align: center
|
||||
|
||||
All these filters can be combined.
|
||||
|
||||
.. image:: ../../img/user/filters.png
|
||||
:alt: Combine all filters
|
||||
:align: center
|
||||
|
||||
Status
|
||||
------
|
||||
|
||||
Use these checkboxes to find archived or starred articles.
|
||||
|
||||
Preview picture
|
||||
---------------
|
||||
|
||||
Check this filter if you want to retrieve articles with a preview picture.
|
||||
|
||||
Language
|
||||
--------
|
||||
|
||||
wallabag (via graby) can detect article language. It's easy to you to retrieve articles
|
||||
written in a specific language.
|
||||
|
||||
Reading time
|
||||
------------
|
||||
|
||||
wallabag estimates how many time you need to read an article. With this filter,
|
||||
you can for example find the articles with a reading time between 2 and 5 minutes.
|
||||
|
||||
Domain name
|
||||
-----------
|
||||
|
||||
Thanks to this filter, you can retrieve the articles from the same domain name.
|
||||
For example, in this field, type ``bbc.co.uk`` to retrieve the articles of this website.
|
||||
|
||||
Creation date
|
||||
-------------
|
||||
|
||||
When you save an article, wallabag stored the current date. So handful to retrieve articles written
|
||||
between 1st and 31th January for example.
|
||||
|
||||
@ -10,20 +10,24 @@ The main purpose of wallabag is to save web articles. You have many ways to do i
|
||||
By using a bookmarklet
|
||||
----------------------
|
||||
|
||||
On the ``Howto`` page, you have a ``Bookmarklet`` tab. Drag and drop the ``bag it!`` link to your bookmarks bar of your browser.
|
||||
On the ``Howto`` page, you have a ``Bookmarklet`` tab. Drag and drop the ``bag it!``
|
||||
link to your bookmarks bar of your browser.
|
||||
|
||||
Now, each time you're reading an article on the web and you want to save it, click on the ``bag it!`` link in your bookmarks bar. The article is saved.
|
||||
Now, each time you're reading an article on the web and you want to save it,
|
||||
click on the ``bag it!`` link in your bookmarks bar. The article is saved.
|
||||
|
||||
By using the classic form
|
||||
-------------------------
|
||||
|
||||
In the top bar of your screen, you have 3 icons. With the first one, a plus sign, you can easily save a new article.
|
||||
In the top bar of your screen, you have 3 icons. With the first one, a plus sign,
|
||||
you can easily save a new article.
|
||||
|
||||
.. image:: ../../img/user/topbar.png
|
||||
:alt: Top bar
|
||||
:align: center
|
||||
|
||||
Click on it to display a new field, paste the article URL inside and press your ``Return`` key. The article is saved.
|
||||
Click on it to display a new field, paste the article URL inside and press your
|
||||
``Return`` key. The article is saved.
|
||||
|
||||
By using a browser add-on
|
||||
-------------------------
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
Migrate to wallabag
|
||||
===================
|
||||
|
||||
From wallabag 1.x
|
||||
-----------------
|
||||
From wallabag
|
||||
-------------
|
||||
|
||||
Export your data from your wallabag 1.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -15,38 +15,57 @@ On your config page, click on ``JSON export`` in the ``Export your wallabag data
|
||||
|
||||
You will have a ``wallabag-export-1-1970-01-01.json`` file.
|
||||
|
||||
Export your data from your wallabag 2.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
On the export sidebar, click on ``JSON``.
|
||||
|
||||
.. image:: ../../img/user/export_wllbg_2.png
|
||||
:alt: Export from wallabag 2.x
|
||||
:align: center
|
||||
|
||||
You will have a ``Unread articles.json`` file.
|
||||
|
||||
Import your data into wallabag 2.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Click on ``Import`` link in the menu, select your export file on your computer and import it.
|
||||
Click on ``Import`` link in the menu, choose the right wallabag version,
|
||||
select your export file on your computer and import it.
|
||||
|
||||
.. image:: ../../img/user/import_wllbg.png
|
||||
:alt: Import from wallabag 1.x
|
||||
:align: center
|
||||
|
||||
All your wallabag 1.x articles will be imported.
|
||||
All your wallabag articles will be imported.
|
||||
|
||||
From Pocket
|
||||
-----------
|
||||
|
||||
Create a new applicaton on Pocket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Create a new application on Pocket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To import your data from Pocket, we use the Pocket API. You need to create a new application on their developer website to continue.
|
||||
To import your data from Pocket, we use the Pocket API. You need to create
|
||||
a new application on their developer website to continue.
|
||||
|
||||
* Create a new application `on the developer website <https://getpocket.com/developer/apps/new>`_
|
||||
* Fill in the required fields: application name, application description, permissions (only **retrieve**), platform (**web**), accept the terms of service and submit your new application
|
||||
* Fill in the required fields: application name, application description,
|
||||
permissions (only **retrieve**), platform (**web**), accept the terms of service
|
||||
and submit your new application
|
||||
|
||||
Pocket will give you a **Consumer Key** (for example, `49961-985e4b92fe21fe4c78d682c1`). You need to configure the ``pocket_consumer_key`` into the ``app/config/parameters.yml`` file in wallabag.
|
||||
Pocket will give you a **Consumer Key** (for example, `49961-985e4b92fe21fe4c78d682c1`).
|
||||
You need to configure the ``pocket_consumer_key`` into the ``app/config/parameters.yml`` file in wallabag.
|
||||
|
||||
Now, all is fine to migrate from Pocket.
|
||||
|
||||
Import your data into wallabag 2.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Click on ``Import`` link in the menu, on ``Import contents`` in Pocket section and then on ``Connect to Pocket and import data``.
|
||||
Click on ``Import`` link in the menu, on ``Import contents`` in Pocket section
|
||||
and then on ``Connect to Pocket and import data``.
|
||||
|
||||
You need to authorize wallabag to interact with your Pocket account. Your data will be imported. Data import can be a demanding process for your server (we need to work on this import to improve it).
|
||||
You need to authorize wallabag to interact with your Pocket account.
|
||||
Your data will be imported. Data import can be a demanding process for your server
|
||||
(we need to work on this import to improve it).
|
||||
|
||||
From Instapaper
|
||||
---------------
|
||||
|
||||
148
docs/en/user/installation.rst
Normal file
148
docs/en/user/installation.rst
Normal file
@ -0,0 +1,148 @@
|
||||
Install wallabag
|
||||
================
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
wallabag is compatible with php >= 5.5, including php 7.
|
||||
|
||||
You'll need the following extensions for wallabag to work. Some of these may already activated in your version of php, so you may not have to install all corresponding packages.
|
||||
|
||||
- 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 uses PDO to connect to database, so you'll need one of:
|
||||
|
||||
- php-pdo_mysql
|
||||
- php-pdo_sqlite
|
||||
- php-pdo_pgsql
|
||||
|
||||
and it's corresponding database server.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
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.
|
||||
|
||||
Install Composer:
|
||||
|
||||
::
|
||||
|
||||
curl -s http://getcomposer.org/installer | php
|
||||
|
||||
You can find specific instructions here : __ https://getcomposer.org/doc/00-intro.md
|
||||
|
||||
To install wallabag itself, you must run these two commands:
|
||||
|
||||
::
|
||||
|
||||
git clone https://github.com/wallabag/wallabag.git
|
||||
cd wallabag
|
||||
git checkout 2.0.0-beta.2
|
||||
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
||||
php bin/console wallabag:install --env=prod
|
||||
|
||||
To start php's build-in server and test if everything did install correctly, you can do:
|
||||
|
||||
::
|
||||
|
||||
php bin/console server:run --env=prod
|
||||
|
||||
And access wallabag at http://yourserverip:8000
|
||||
|
||||
Installing on Apache
|
||||
--------------------
|
||||
|
||||
Assuming you install wallabag in the /var/www/wallabag folder and that you want to use php as an Apache module, here's a vhost for wallabag:
|
||||
|
||||
::
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName domain.tld
|
||||
ServerAlias www.domain.tld
|
||||
|
||||
DocumentRoot /var/www/wallabag/web
|
||||
<Directory /var/www/wallabag/web>
|
||||
AllowOverride None
|
||||
Order Allow,Deny
|
||||
Allow from All
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
Options -MultiViews
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^(.*)$ app.php [QSA,L]
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
# uncomment the following lines if you install assets as symlinks
|
||||
# or run into problems when compiling LESS/Sass/CoffeScript assets
|
||||
# <Directory /var/www/wallabag>
|
||||
# Options FollowSymlinks
|
||||
# </Directory>
|
||||
|
||||
# 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
|
||||
<Directory /var/www/wallabag/web/bundles>
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine Off
|
||||
</IfModule>
|
||||
</Directory>
|
||||
ErrorLog /var/log/apache2/wallabag_error.log
|
||||
CustomLog /var/log/apache2/wallabag_access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
After reloading or restarting Apache, you should now be able to access wallabag at http://domain.tld.
|
||||
|
||||
Installing on Nginx
|
||||
-------------------
|
||||
|
||||
Assuming you install wallabag in the /var/www/wallabag folder, here's the recipe for 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;
|
||||
}
|
||||
|
||||
After reloading or restarting nginx, you should now be able to access wallabag at http://domain.tld.
|
||||
@ -5,7 +5,8 @@ Your account is now enabled, congratulations!
|
||||
|
||||
To login to wallabag, fill the form on login page.
|
||||
|
||||
If you are on your personal computer and you want to stay connected, you can check the ``Keep me logged in`` checkbox: wallabag will remember you for one year.
|
||||
If you are on your personal computer and you want to stay connected,
|
||||
you can check the ``Keep me logged in`` checkbox: wallabag will remember you for one year.
|
||||
|
||||
.. image:: ../../img/user/login_form.png
|
||||
:alt: Login form
|
||||
@ -17,4 +18,6 @@ Frequently asked questions
|
||||
I forgot my password
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can reset your password by clicking on ``Forgot your password?`` link, on the login page. Then, fill the form with your email address
|
||||
You can reset your password by clicking on ``Forgot your password?`` link,
|
||||
on the login page. Then, fill the form with your email address or your username,
|
||||
you'll receive an email to reset your password.
|
||||
|
||||
50
docs/fr/developer/docker.rst
Normal file
50
docs/fr/developer/docker.rst
Normal file
@ -0,0 +1,50 @@
|
||||
Exécuter wallabag avec docker-compose
|
||||
=====================================
|
||||
|
||||
Pour faire tourner votre propre instance de développement de wallabag, vous pouvez
|
||||
utiliser les fichiers docker pré-configurés.
|
||||
|
||||
Pré-requis
|
||||
----------
|
||||
|
||||
Soyez sur d'avoir `Docker
|
||||
<https://docs.docker.com/installation/ubuntulinux/>`__ et `Docker
|
||||
Compose <https://docs.docker.com/compose/install/>`__ installés et à jour sur votre
|
||||
système.
|
||||
|
||||
Changer de SGBD
|
||||
---------------
|
||||
|
||||
Par défaut, wallabag fonctionne avec une base de données SQLite.
|
||||
Depuis que wallabag supporte Postgresql et MySQL, les conteneurs Docker sont
|
||||
aussi disponibles pour ces SGBD.
|
||||
|
||||
Dans ``docker-compose.yml``, en fonction de votre SGBD, décommentez :
|
||||
|
||||
- la définition du conteneur (le block racine ``postgres`` ou ``mariadb``)
|
||||
- le conteneur ``links`` dans le conteneur ``php``
|
||||
- le conteneur ``env_file`` dans le conteneur ``php``
|
||||
|
||||
Pour que les commandes Symfony (par exemple ``wallabag:install``) continuent de
|
||||
fonctionner sur votre système, vous devez aussi :
|
||||
|
||||
- charger le bon fichier d'environnement dans votre ligne de commandes (``source``),
|
||||
pour que les variables comme ``SYMFONY__ENV__DATABASE_HOST`` existent.
|
||||
- ajouter une ligne ``127.0.0.1 rdbms`` dans votre fichier ``hosts``
|
||||
|
||||
Exécuter wallabag
|
||||
-----------------
|
||||
|
||||
#. Forker et cloner le projet
|
||||
#. Editer ``app/config/parameters.yml`` pour remplacer les propriétés ``database_*``
|
||||
par les lignes commentées (celles avec des valeurs préfixées par ``env.``)
|
||||
#. ``composer install`` pour installer les dépendances
|
||||
#. ``php app/console wallabag:install`` pour créer le schéma de la BDD
|
||||
#. ``docker-compose up`` pour démarrer les conteneurs
|
||||
#. Enfin, se rendre sur http://localhost:8080/ pour accéder à une installation
|
||||
tout propre de wallabag.
|
||||
|
||||
Il est possible de rencontrer des problèmes de droits UNIX, de mauvais chemins
|
||||
dans les fichiers de cache, etc…
|
||||
Les opérations comme vider le cache ou restaurer les permissions des fichiers
|
||||
peuvent être fréquemment nécessaires, n'ayez crainte !
|
||||
33
docs/fr/developer/maintenance.rst
Normal file
33
docs/fr/developer/maintenance.rst
Normal file
@ -0,0 +1,33 @@
|
||||
Mode maintenance
|
||||
================
|
||||
|
||||
Si vous devez effectuer de longues tâches sur votre instance de wallabag, vous pouvez activer le mode maintenance.
|
||||
Plus personne ne pourra accéder à wallabag.
|
||||
|
||||
Activer le mode maintenance
|
||||
---------------------------
|
||||
|
||||
Pour activer le mode maintenance, exécutez cette commande :
|
||||
|
||||
::
|
||||
|
||||
bin/console lexik:maintenance:lock --no-interaction
|
||||
|
||||
Vous pouvez spécifier votre adresse IP dans ``app/config/config.yml`` si vous souhaitez accéder à wallabag même si
|
||||
le mode maintenance est activé. Par exemple :
|
||||
|
||||
::
|
||||
|
||||
lexik_maintenance:
|
||||
authorized:
|
||||
ips: ['127.0.0.1']
|
||||
|
||||
|
||||
Désactiver le mode maintenance
|
||||
------------------------------
|
||||
|
||||
Pour désactiver le mode maintenance, exécutez cette commande :
|
||||
|
||||
::
|
||||
|
||||
bin/console lexik:maintenance:unlock
|
||||
62
docs/fr/developer/translate.rst
Normal file
62
docs/fr/developer/translate.rst
Normal file
@ -0,0 +1,62 @@
|
||||
Traduire wallabag
|
||||
=================
|
||||
|
||||
L'application web
|
||||
-----------------
|
||||
|
||||
Fichiers de traductions
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
Comme wallabag est principalement dévelopée par une équipe française, c'est
|
||||
cette traduction qui est considérée comme la plus récente. Merci de vous baser
|
||||
sur celle-ci pour créer votre traduction.
|
||||
|
||||
Les principaux fichiers de traduction se trouvent ici : https://github.com/wallabag/wallabag/tree/v2/src/Wallabag/CoreBundle/Resources/translations.
|
||||
|
||||
Vous devez créer les fichiers ``messages.CODE.yml`` et ``validators.CODE.yml``,
|
||||
où CODE est le code ISO 639-1 de votre langue (`cf wikipedia <https://fr.wikipedia.org/wiki/Liste_des_codes_ISO_639-1>`__).
|
||||
|
||||
Autres fichiers à traduire :
|
||||
|
||||
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/CraueConfigBundle/translations.
|
||||
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/FOSUserBundle/translations.
|
||||
|
||||
Vous devez créer les fichiers ``LE_FICHIER_DE_TRADUCTION.CODE.yml``.
|
||||
|
||||
Fichier de configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Vous devez éditer `app/config/config.yml
|
||||
<https://github.com/wallabag/wallabag/blob/v2/app/config/config.yml>`__ pour
|
||||
afficher votre langue dans la page Configuration de wallabag (pour permettre aux
|
||||
utilisateurs de choisir cette nouvelle traduction).
|
||||
|
||||
Dans la section ``wallabag_core.languages``, vous devez ajouter une nouvelle ligne
|
||||
avec votre traduction. Par exemple :
|
||||
|
||||
::
|
||||
|
||||
wallabag_core:
|
||||
...
|
||||
languages:
|
||||
en: 'English'
|
||||
fr: 'Français'
|
||||
|
||||
|
||||
Pour la première colonne (``en``, ``fr``, etc.), vous devez ajouter le code ISO 639-1
|
||||
de votre langue (voir ci-dessus).
|
||||
|
||||
Pour la seconde colonne, c'est juste le nom de votre langue.
|
||||
|
||||
Documentation de wallabag
|
||||
-------------------------
|
||||
|
||||
.. note::
|
||||
|
||||
Contrairement à l'application, la langue principale de la documentation est l'anglais
|
||||
|
||||
Les fichiers de documentation se trouvent ici : https://github.com/wallabag/wallabag/tree/v2/docs
|
||||
|
||||
Vous devez respecter la structure du dossier ``en`` quand vous crééz votre traduction.
|
||||
@ -9,9 +9,39 @@ Documentation de wallabag
|
||||
simplement d’archiver une page web en ne conservant que le contenu. Les
|
||||
éléments superflus (menu, publicité, etc.) sont supprimés.
|
||||
|
||||
.. note::
|
||||
|
||||
Vous vous trouvez sur la documentation de wallabag v2. Si vous voulez lire la documentation de wallabag v1, `vous pouvez jeter un œil ici <https://github.com/wallabag/documentation>`__.
|
||||
|
||||
La documentation principale de cette application est découpée en plusieurs sections :
|
||||
|
||||
* :ref:`user-docs`
|
||||
* :ref:`dev-docs`
|
||||
|
||||
.. _user-docs:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Documentation utilisateur
|
||||
|
||||
index
|
||||
user/installation
|
||||
user/create_account
|
||||
user/login
|
||||
user/configuration
|
||||
user/first_article
|
||||
user/errors_during_fetching
|
||||
user/annotations
|
||||
user/import
|
||||
user/download_articles
|
||||
user/filters
|
||||
user/tags
|
||||
|
||||
.. _dev-docs:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Documentation développeur
|
||||
|
||||
developer/docker
|
||||
developer/translate
|
||||
developer/maintenance
|
||||
|
||||
25
docs/fr/user/annotations.rst
Normal file
25
docs/fr/user/annotations.rst
Normal file
@ -0,0 +1,25 @@
|
||||
Annotations
|
||||
===========
|
||||
|
||||
Sur chaque article que vous lisez, vous pouvez écrire des annotations. Puisqu'une image vaut mieux qu'un long discours,
|
||||
voici ce que ça donne.
|
||||
|
||||
Sélectionnez la zone du texte que vous souhaitez annoter et cliquez sur le crayon :
|
||||
|
||||
.. image:: ../../img/user/annotations_1.png
|
||||
:alt: Sélectionnez votre texte
|
||||
:align: center
|
||||
|
||||
Ensuite, écrivez votre annotation :
|
||||
|
||||
.. image:: ../../img/user/annotations_2.png
|
||||
:alt: Écrivez votre annotation
|
||||
:align: center
|
||||
|
||||
Le texte est maintenant surligné et vous pouvez lire le annotation en le survolant avec votre souris.
|
||||
|
||||
.. image:: ../../img/user/annotations_3.png
|
||||
:alt: Lisez votre annotation
|
||||
:align: center
|
||||
|
||||
Vous pouvez créer autant de annotations que vous le souhaitez.
|
||||
114
docs/fr/user/configuration.rst
Normal file
114
docs/fr/user/configuration.rst
Normal file
@ -0,0 +1,114 @@
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Maintenant que vous êtes connecté, il est temps de configurer votre compte.
|
||||
|
||||
Cliquez sur le menu ``Configuration``. Vous avez accès à 5 onglets :
|
||||
``Paramètres``, ``RSS``, ``Mon compte``, ``Mot de passe`` and ``Règles de tag automatiques``.
|
||||
|
||||
Paramètres
|
||||
----------
|
||||
|
||||
Thème
|
||||
~~~~~
|
||||
|
||||
L'affichage de wallabag est personnalisable. C'est ici que vous choisissez le thème
|
||||
que vous préférez. Vous pouvez aussi en créer un nouveau, une documentation sera
|
||||
disponible pour guider. Le thème par défaut est ``Material``, c'est celui
|
||||
qui est utilisé dans les captures d'écran de la documentation.
|
||||
|
||||
Nombre d'articles par page
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Vous pouvez définir le nombre d'articles affichés sur chaque page.
|
||||
|
||||
Langue
|
||||
~~~~~~
|
||||
|
||||
Vous pouvez définir la langue de l'interface de wallabag. Vous devrez vous déconnecter
|
||||
pour que la nouvelle langue soit prise en compte.
|
||||
|
||||
RSS
|
||||
---
|
||||
|
||||
wallabag propose un flux RSS pour chaque statut d'article : non lus, favoris et lus.
|
||||
|
||||
Tout d'abord, vous devez vous créer un jeton personnel : cliquez sur ``Créez votre jeton``.
|
||||
Il est possible de regénérer votre jeton en cliquant sur ``Réinitialisez votre jeton``.
|
||||
|
||||
Vous avez maintenant trois liens, un par statut : ajoutez-les dans votre agrégateur de flux RSS préféré.
|
||||
|
||||
Vous pouvez aussi définir combien d'articles vous souhaitez dans vos flux RSS
|
||||
(50 est la valeur par défaut).
|
||||
|
||||
Mon compte
|
||||
----------
|
||||
|
||||
Vous pouvez ici modifier votre nom, votre adresse email et activer la ``Double authentification``.
|
||||
|
||||
Double authentification (2FA)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
L'authentification à deux facteurs (également appelée 2FA) est une technologie brevetée en 1984
|
||||
qui fournit l'identification des utilisateurs au moyen de la combinaison de deux composants différents .
|
||||
|
||||
https://fr.wikipedia.org/wiki/Authentification_forte
|
||||
|
||||
Si vous activez 2FA, à chaque tentative de connexion à wallabag, vous recevrez
|
||||
un code par email. Vous devez renseigner ce code dans le formulaire suivant :
|
||||
|
||||
.. image:: ../../img/user/2FA_form.png
|
||||
:alt: Authentification à deux facteurs
|
||||
:align: center
|
||||
|
||||
Si vous ne souhaitez pas recevoir un code à chaque fois que vous vous connectez,
|
||||
vous pouvez cocher la case ``Je suis sur un ordinateur de confiance`` : wallabag
|
||||
se souviendra de vous pour 15 jours.
|
||||
|
||||
Mot de passe
|
||||
------------
|
||||
|
||||
Vous pouvez changer de mot de passe ici (8 caractères minimum).
|
||||
|
||||
Règles de tag automatiques
|
||||
--------------------------
|
||||
|
||||
Si vous voulez automatiquement assigner un tag à de nouveaux articles en fonction de
|
||||
certains critères, cette partie de la configuration est pour vous.
|
||||
|
||||
Que veut dire « règles de tag automatiques » ?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Ce sont des règles utilisées par wallabag pour automatiquement assigner un tag
|
||||
à un nouvel article.
|
||||
À chaque fois que vous ajoutez un nouvel article, toutes les règles sont utilisées pour ajouter
|
||||
les tags que vous avez configurés, vous épargnant ainsi la peine de classer manuellement vos articles.
|
||||
|
||||
Comment les utiliser ?
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Admettons que vous voulez ajouter comme tag *« lecture rapide »* quand le temps de lecture
|
||||
d'un article est inférieur à 3 minutes.
|
||||
Dans ce cas, vous devez ajouter « readingTime <= 3 » dans le champ **Règle** et *« lecture rapide »* dans le champ **Tags**.
|
||||
Plusieurs tags peuvent être ajoutés en même temps en les séparant par une virgule : *« lecture rapide, à lire »*.
|
||||
Des règles complexes peuvent être écrites en utilisant les opérateurs pré-définis :
|
||||
if *« readingTime >= 5 AND domainName = "github.com" »* then tag as *« long reading, github »*.
|
||||
|
||||
Quels variables et opérateurs puis-je utiliser pour écrire mes règles ?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Les variables et opérateurs suivants peuvent être utilisés lors de la création de vos règles :
|
||||
|
||||
=========== ============================================== ========== ==========
|
||||
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 à …
|
||||
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
|
||||
readingTime Le temps de lecture de l'article, en minutes AND Telle règle et telle règle
|
||||
domainName Le nom de domaine de l'article matches Contient telle chaîne de caractère (insensible à la casse). Exemple : title matches "football"
|
||||
=========== ============================================== ========== ==========
|
||||
46
docs/fr/user/create_account.rst
Normal file
46
docs/fr/user/create_account.rst
Normal file
@ -0,0 +1,46 @@
|
||||
Se créer un compte
|
||||
==================
|
||||
|
||||
Sur la page de connexion, cliquez sur le bouton ``Créer un compte``.
|
||||
|
||||
.. image:: ../../img/user/registration_form.png
|
||||
:alt: Formulaire de création de compte
|
||||
:align: center
|
||||
|
||||
Vous devez renseigner le formulaire. Faites attention de bien renseigner une adresse
|
||||
email valide, nous allons vous envoyer un email d'activation.
|
||||
|
||||
.. image:: ../../img/user/sent_email.png
|
||||
:alt: Un email a été envoyé pour activer votre compte
|
||||
:align: center
|
||||
|
||||
Vérifiez votre boite de réception, vous avez un nouvel email avec un lien comme celui-ci
|
||||
``http://wallabag/register/confirm/Ba19wokGovN-DdBQNfg4YgRkUQWRP4-k2g0Bk-hBTX4``.
|
||||
Cliquez dessus pour activer votre compte.
|
||||
|
||||
Votre compte est maintenant actif.
|
||||
|
||||
.. image:: ../../img/user/activated_account.png
|
||||
:alt: Bienvenue à bord !
|
||||
:align: center
|
||||
|
||||
Foire aux questions
|
||||
-------------------
|
||||
|
||||
Je ne peux pas valider le formulaire de création de compte
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Soyez sur d'avoir bien renseigné tous les champs :
|
||||
|
||||
* une adresse email valide
|
||||
* le même mot de passe dans les deux champs
|
||||
|
||||
Je n'ai pas reçu mon email d'activation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Êtes-vous sur d'avoir renseigné votre bonne adresse ? Avez-vous vérifié le dossier de spams ?
|
||||
|
||||
Quand je clique sur le lien d'activation, j'ai ce message : ``The user with confirmation token "DtrOPfbQeVkWf6N" does not exist``.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Vous avez déjà activé votre compte ou l'URL d'activation n'est pas correcte.
|
||||
17
docs/fr/user/download_articles.rst
Normal file
17
docs/fr/user/download_articles.rst
Normal file
@ -0,0 +1,17 @@
|
||||
Télécharger des articles
|
||||
========================
|
||||
|
||||
Vous pouvez télécharger chaque article dans plusieurs formats : ePUB, MOBI, PDF, XML, JSON, CSV.
|
||||
|
||||
Lorsque vous lisez un article, cliquez sur cette icône dans la barre latérale :
|
||||
|
||||
.. image:: ../../img/user/download_article.png
|
||||
:alt: Télécharger l'article
|
||||
:align: center
|
||||
|
||||
Vous pouvez aussi télécharger une catégorie (non lus, favoris, lus) dans ces formats.
|
||||
Par exemple, dans la vue **Non lus**, cliquez sur cette icône dans la barre supérieure :
|
||||
|
||||
.. image:: ../../img/user/download_articles.png
|
||||
:alt: Télécharger l'article
|
||||
:align: center
|
||||
27
docs/fr/user/errors_during_fetching.rst
Normal file
27
docs/fr/user/errors_during_fetching.rst
Normal file
@ -0,0 +1,27 @@
|
||||
Erreur durant la récupération des articles
|
||||
==========================================
|
||||
|
||||
Pourquoi la récupération des articles échoue ?
|
||||
----------------------------------------------
|
||||
|
||||
Il peut y avoir plusieurs raisons :
|
||||
|
||||
- problème de connexion internet
|
||||
- wallabag ne peut pas récupérer le contenu à cause de la structure du site web
|
||||
|
||||
Comment puis-je aider pour réparer ça ?
|
||||
---------------------------------------
|
||||
|
||||
- `en nous envoyant un email avec l'URL de l'article <mailto:hello@wallabag.org>`_
|
||||
- en essayant de réparer cet article par vous-même :) en créant un fichier pour l'article.
|
||||
Vous pouvez utiliser cet outil http://siteconfig.fivefilters.org/.
|
||||
|
||||
Comment puis-je réessayer de récupérer le contenu ?
|
||||
---------------------------------------------------
|
||||
|
||||
Si wallabag échoue en récupérant l'article, vous pouvez cliquer sur le bouton suivant
|
||||
(le troisième sur l'image ci-dessous).
|
||||
|
||||
.. image:: ../../img/user/refetch.png
|
||||
:alt: Réessayer de récupérer le contenu
|
||||
:align: center
|
||||
50
docs/fr/user/filters.rst
Normal file
50
docs/fr/user/filters.rst
Normal file
@ -0,0 +1,50 @@
|
||||
Filtres
|
||||
=======
|
||||
|
||||
Pour retrouver plus facilement vos articles, vous pouvez utiliser les filtres.
|
||||
Cliquez sur la troisième icône de la barre supérieure.
|
||||
|
||||
.. image:: ../../img/user/topbar.png
|
||||
:alt: Barre supérieure
|
||||
:align: center
|
||||
|
||||
Tous ces filtres peuvent être combinés.
|
||||
|
||||
.. image:: ../../img/user/filters.png
|
||||
:alt: Combine all filters
|
||||
:align: center
|
||||
|
||||
Statut
|
||||
------
|
||||
|
||||
Utilisez ces cases à cocher pour retrouver les articles lus ou mis en favori.
|
||||
|
||||
Image de prévisualisation
|
||||
-------------------------
|
||||
|
||||
Cochez ce filtre si vous voulez retrouver les articles avec une image de prévisualisation.
|
||||
|
||||
Langage
|
||||
-------
|
||||
|
||||
wallabag (via graby) peut détecter la langue dans laquelle l'article est écrit.
|
||||
C'est ainsi facile pour vous de retrouver des articles écrits dans une langue spécifique.
|
||||
|
||||
Temps de lecture
|
||||
----------------
|
||||
|
||||
wallabag estime combien de temps vous avez besoin pour lire un article.
|
||||
Avec ce filtre, vous pouvez par exemple retrouver les articles qui ont une estimation
|
||||
entre 2 et 5 minutes.
|
||||
|
||||
Nom de domaine
|
||||
--------------
|
||||
|
||||
Grâce à ce filtre, vous pouvez retrouver les articles venant d'un même nom de domaine.
|
||||
Par exemple, dans ce champ, saisissez ``lemonde.fr`` pour retrouver les articles de ce site.
|
||||
|
||||
Date de création
|
||||
----------------
|
||||
|
||||
Quand vous ajoutez un article, wallabag stocke la date courante.
|
||||
C'est très pratique pour retrouver les articles ajoutés entre le 1er et le 31 janvier par exemple.
|
||||
68
docs/fr/user/first_article.rst
Normal file
68
docs/fr/user/first_article.rst
Normal file
@ -0,0 +1,68 @@
|
||||
Sauvegardez votre premier article
|
||||
=================================
|
||||
|
||||
La fonctionnalité principale de wallabag est de sauvegarder des articles.
|
||||
Vous avez plusieurs manières de le faire.
|
||||
|
||||
.. note::
|
||||
|
||||
Un guide de démarrage s'affichera dans l'application jusqu'à ce que vous
|
||||
enregistriez votre premier article.
|
||||
|
||||
En utilisant le bookmarklet
|
||||
---------------------------
|
||||
|
||||
Sur la page ``Aide``, vous avez un onglet ``Bookmarklet``. Glissez/déposez le lien ``bag it!``
|
||||
dans votre barre de favoris de votre navigateur.
|
||||
|
||||
Maintennat, à chaque fois que vous lisez un article et que vous souhaitez le sauvegarder,
|
||||
cliquez sur le lien ``bag it!`` dans votre barre de favoris. L'article est enregistré.
|
||||
|
||||
En utilisant le formulaire classique
|
||||
------------------------------------
|
||||
|
||||
Dans la barre haut de wallabag, vous avez trois icônes. Avec la première icône,
|
||||
un signe plus, vous pouvez facilement ajouter un nouvel article.
|
||||
|
||||
.. image:: ../../img/user/topbar.png
|
||||
:alt: Barre supérieure
|
||||
:align: center
|
||||
|
||||
Cliquez dessus pour afficher un nouveau champ, collez-y l'URL de l'article et appuyez
|
||||
sur la touche ``Entrée``. L'article est enregistré.
|
||||
|
||||
En utilisant l'extension de votre navigateur
|
||||
--------------------------------------------
|
||||
|
||||
Firefox
|
||||
~~~~~~~
|
||||
|
||||
*Cette extension n'est pas encore disponible pour wallabag v2*.
|
||||
|
||||
Chrome
|
||||
~~~~~~
|
||||
|
||||
*Cette extension n'est pas encore disponible pour wallabag v2*.
|
||||
|
||||
En utilisant l'application de votre smartphone
|
||||
----------------------------------------------
|
||||
|
||||
Android
|
||||
~~~~~~~
|
||||
|
||||
*Cette application n'est pas encore disponible pour wallabag v2*.
|
||||
|
||||
Firefox OS
|
||||
~~~~~~~~~~
|
||||
|
||||
*Cette application n'est pas encore disponible pour wallabag v2*.
|
||||
|
||||
Windows Phone
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
*Cette application n'est pas encore disponible pour wallabag v2*.
|
||||
|
||||
iOS
|
||||
~~~
|
||||
|
||||
*Cette application n'est pas encore disponible pour wallabag v2*.
|
||||
83
docs/fr/user/import.rst
Normal file
83
docs/fr/user/import.rst
Normal file
@ -0,0 +1,83 @@
|
||||
Migrer à wallabag
|
||||
=================
|
||||
|
||||
Depuis wallabag
|
||||
---------------
|
||||
|
||||
Exportez vos données de wallabag 1.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Sur la page de configuration, cliquez sur ``Export JSON`` dans la section ``Exportez vos données wallabag``.
|
||||
|
||||
.. image:: ../../img/user/export_wllbg_1.png
|
||||
:alt: Export depuis wallabag 1.x
|
||||
:align: center
|
||||
|
||||
Vous obtiendrez un fichier ``wallabag-export-1-1970-01-01.json``.
|
||||
|
||||
Exportez vos données de wallabag 2.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Dans la barre latérale de téléchargement, cliquez sur ``JSON``.
|
||||
|
||||
.. image:: ../../img/user/export_wllbg_2.png
|
||||
:alt: Export depuis wallabag 2.x
|
||||
:align: center
|
||||
|
||||
Vous obtiendrez un fichier ``Unread articles.json``.
|
||||
|
||||
Importez vos données wallabag 2.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Cliquez sur le lien ``Importer`` dans le menu, choisissez la version de wallabag correspondante,
|
||||
sélectionnez votre fichier d'export sur votre ordinateur et importez-le.
|
||||
|
||||
.. image:: ../../img/user/import_wllbg.png
|
||||
:alt: Import depuis wallabag 1.x
|
||||
:align: center
|
||||
|
||||
Tous vos articles wallabag seront importés.
|
||||
|
||||
Depuis Pocket
|
||||
-------------
|
||||
|
||||
Créer une nouvelle application dans Pocket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Pour importer vos données depuis Pocket, nous utilisons l'API de Pocket.
|
||||
Vous devez créer une nouvelle application sur leur site dédié aux développeurs pour continuer.
|
||||
|
||||
* Créez une nouvelle application `sur leur site Développeurs <https://getpocket.com/developer/apps/new>`_
|
||||
* Remplissez les champs requis : nom de l'application, description de l'application,
|
||||
permissions (seulement **retrieve**), la plateforme (**web**), acceptez les
|
||||
termes d'utilisation du service et soumettez votre application
|
||||
|
||||
Pocket vous fournira une **Consumer Key** (par exemple, `49961-985e4b92fe21fe4c78d682c1`).
|
||||
Vous devez configurer la ``pocket_consumer_key`` dans le fichier ``app/config/parameters.yml``.
|
||||
|
||||
Maintenant, tout est bien configuré pour migrer depuis Pocket.
|
||||
|
||||
Importez vos données dans wallabag 2.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Cliquez sur le lien ``Importer`` dans le menu, sur ``Importer les contenus`` dans
|
||||
la section Pocket puis sur ``Se connecter à Pocket et importer les données``.
|
||||
|
||||
Vous devez autoriser wallabag à se connecter à votre compte Pocket.
|
||||
Vos données vont être importées. L'import de données est une action qui peut être couteuse
|
||||
pour votre serveur (nous devons encore travailler pour améliorer cet import).
|
||||
|
||||
Depuis Instapaper
|
||||
-----------------
|
||||
|
||||
*Fonctionnalité pas encore implémentée dans wallabag v2.*
|
||||
|
||||
Depuis Readability
|
||||
------------------
|
||||
|
||||
*Fonctionnalité pas encore implémentée dans wallabag v2.*
|
||||
|
||||
Depuis un fichier HTML ou JSON
|
||||
------------------------------
|
||||
|
||||
*Fonctionnalité pas encore implémentée dans wallabag v2.*
|
||||
146
docs/fr/user/installation.rst
Normal file
146
docs/fr/user/installation.rst
Normal file
@ -0,0 +1,146 @@
|
||||
Installer wallabag
|
||||
==================
|
||||
|
||||
Pré-requis
|
||||
------------
|
||||
|
||||
wallabag est compatible avec php >= 5.5, php 7 inclus.
|
||||
|
||||
Vous aurez besoin des extensions suivantes pour que wallabag fonctionne. Il est possible que certaines de ces extensions soient déjà activées dans votre version de php, donc vous n'avez pas forcément besoin d'installer tous les paquets correspondants.
|
||||
|
||||
- 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 utilise PDO afin de se connecter à une base de données, donc vous aurez besoin d'une extension et d'un système de bases de données parmi :
|
||||
|
||||
- php-pdo_mysql
|
||||
- php-pdo_sqlite
|
||||
- php-pdo_pgsql
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
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.
|
||||
|
||||
Installation de Composer :
|
||||
|
||||
::
|
||||
|
||||
curl -s http://getcomposer.org/installer | php
|
||||
|
||||
Vous pouvez trouver des instructions spécifiques ici (en anglais) : __ https://getcomposer.org/doc/00-intro.md
|
||||
|
||||
Pour installer wallabag, vous devez exécuter ces deux commandes :
|
||||
|
||||
::
|
||||
|
||||
git clone https://github.com/wallabag/wallabag.git
|
||||
cd wallabag
|
||||
git checkout 2.0.0-beta.2
|
||||
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
||||
php bin/console wallabag:install --env=prod
|
||||
|
||||
Pour démarrer le serveur interne à php et vérifier que tout s'est installé correctement, vous pouvez exécuter :
|
||||
|
||||
::
|
||||
|
||||
php bin/console server:run --env=prod
|
||||
|
||||
Et accéder wallabag à l'adresse http://lipdevotreserveur:8000
|
||||
|
||||
Installation avec Apache
|
||||
------------------------
|
||||
|
||||
En imaginant que vous vouliez installer wallabag dans le dossier /var/www/wallabag et que vous utilisiez php comme un module Apache, voici un vhost pour wallabag :
|
||||
|
||||
::
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName domain.tld
|
||||
ServerAlias www.domain.tld
|
||||
|
||||
DocumentRoot /var/www/wallabag/web
|
||||
<Directory /var/www/wallabag/web>
|
||||
AllowOverride None
|
||||
Order Allow,Deny
|
||||
Allow from All
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
Options -MultiViews
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^(.*)$ app.php [QSA,L]
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
# uncomment the following lines if you install assets as symlinks
|
||||
# or run into problems when compiling LESS/Sass/CoffeScript assets
|
||||
# <Directory /var/www/wallabag>
|
||||
# Options FollowSymlinks
|
||||
# </Directory>
|
||||
|
||||
# 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
|
||||
<Directory /var/www/wallabag/web/bundles>
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine Off
|
||||
</IfModule>
|
||||
</Directory>
|
||||
ErrorLog /var/log/apache2/wallabag_error.log
|
||||
CustomLog /var/log/apache2/wallabag_access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
Après que vous ayez rechargé/redémarré Apache, vous devriez pouvoir avoir accès à wallabag à l'adresse http://domain.tld.
|
||||
|
||||
Installation avec Nginx
|
||||
-----------------------
|
||||
|
||||
En imaginant que vous vouliez installer wallabag dans le dossier /var/www/wallabag, voici un fichier de configuration Nginx pour 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;
|
||||
}
|
||||
|
||||
Après que vous ayez rechargé/redémarré Nginx, vous devriez pouvoir avoir accès à wallabag à l'adresse http://domain.tld.
|
||||
23
docs/fr/user/login.rst
Normal file
23
docs/fr/user/login.rst
Normal file
@ -0,0 +1,23 @@
|
||||
Se connecter
|
||||
============
|
||||
|
||||
Votre compte est maintenant actif, félicitations !
|
||||
|
||||
Pour vous connecter à wallabag, remplissez le formulaire de connexion.
|
||||
|
||||
Si vous êtes sur un ordinateur de confiance et que vous souhaitez rester connecté
|
||||
vous pouvez cocher la case ``Restez connecté`` : wallabag se souviendra de vous pour un an.
|
||||
|
||||
.. image:: ../../img/user/login_form.png
|
||||
:alt: Formulaire de connexion
|
||||
:align: center
|
||||
|
||||
Foire aux questions
|
||||
-------------------
|
||||
|
||||
J'ai oublié mon mot de passe
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Vous pouvez réinitialiser votre mot de passe en cliquant sur ``Mot de passe oublié ?``,
|
||||
sur la page de connexion. Ensuite, renseignez votre adresse email ou votre nom d'utilisateur,
|
||||
un email vous sera envoyé.
|
||||
2
docs/fr/user/tags.rst
Normal file
2
docs/fr/user/tags.rst
Normal file
@ -0,0 +1,2 @@
|
||||
Tags
|
||||
====
|
||||
BIN
docs/img/user/annotations_1.png
Normal file
BIN
docs/img/user/annotations_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
docs/img/user/annotations_2.png
Normal file
BIN
docs/img/user/annotations_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
docs/img/user/annotations_3.png
Normal file
BIN
docs/img/user/annotations_3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
BIN
docs/img/user/export_wllbg_2.png
Normal file
BIN
docs/img/user/export_wllbg_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
BIN
docs/img/user/filters.png
Normal file
BIN
docs/img/user/filters.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
docs/img/user/refetch.png
Normal file
BIN
docs/img/user/refetch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@ -0,0 +1,146 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\AnnotationBundle\Controller;
|
||||
|
||||
use FOS\RestBundle\Controller\FOSRestController;
|
||||
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
class WallabagAnnotationController extends FOSRestController
|
||||
{
|
||||
/**
|
||||
* Retrieve annotations for an entry.
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function getAnnotationsAction(Entry $entry)
|
||||
{
|
||||
$annotationRows = $this
|
||||
->getDoctrine()
|
||||
->getRepository('WallabagAnnotationBundle:Annotation')
|
||||
->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId());
|
||||
$total = count($annotationRows);
|
||||
$annotations = array('total' => $total, 'rows' => $annotationRows);
|
||||
|
||||
$json = $this->get('serializer')->serialize($annotations, 'json');
|
||||
|
||||
return $this->renderJsonResponse($json);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new annotation.
|
||||
*
|
||||
* @param Entry $entry
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="ranges", "dataType"="array", "requirement"="\w+", "description"="The range array for the annotation"},
|
||||
* {"name"="quote", "dataType"="string", "required"=false, "description"="Optional, quote for the annotation"},
|
||||
* {"name"="text", "dataType"="string", "required"=true, "description"=""},
|
||||
* }
|
||||
* )
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function postAnnotationAction(Request $request, Entry $entry)
|
||||
{
|
||||
$data = json_decode($request->getContent(), true);
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$annotation = new Annotation($this->getUser());
|
||||
|
||||
$annotation->setText($data['text']);
|
||||
if (array_key_exists('quote', $data)) {
|
||||
$annotation->setQuote($data['quote']);
|
||||
}
|
||||
if (array_key_exists('ranges', $data)) {
|
||||
$annotation->setRanges($data['ranges']);
|
||||
}
|
||||
|
||||
$annotation->setEntry($entry);
|
||||
|
||||
$em->persist($annotation);
|
||||
$em->flush();
|
||||
|
||||
$json = $this->get('serializer')->serialize($annotation, 'json');
|
||||
|
||||
return $this->renderJsonResponse($json);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an annotation.
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="annotation", "dataType"="string", "requirement"="\w+", "description"="The annotation ID"}
|
||||
* }
|
||||
* )
|
||||
*
|
||||
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function putAnnotationAction(Annotation $annotation, Request $request)
|
||||
{
|
||||
$data = json_decode($request->getContent(), true);
|
||||
|
||||
if (!is_null($data['text'])) {
|
||||
$annotation->setText($data['text']);
|
||||
}
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->flush();
|
||||
|
||||
$json = $this->get('serializer')->serialize($annotation, 'json');
|
||||
|
||||
return $this->renderJsonResponse($json);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes an annotation.
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="annotation", "dataType"="string", "requirement"="\w+", "description"="The annotation ID"}
|
||||
* }
|
||||
* )
|
||||
*
|
||||
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function deleteAnnotationAction(Annotation $annotation)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->remove($annotation);
|
||||
$em->flush();
|
||||
|
||||
$json = $this->get('serializer')->serialize($annotation, 'json');
|
||||
|
||||
return $this->renderJsonResponse($json);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a JSON Response.
|
||||
* We don't use the Symfony JsonRespone, because it takes an array as parameter instead of a JSON string.
|
||||
*
|
||||
* @param string $json
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function renderJsonResponse($json, $code = 200)
|
||||
{
|
||||
return new Response($json, $code, array('application/json'));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\AnnotationBundle\DataFixtures\ORM;
|
||||
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
|
||||
class LoadAnnotationData extends AbstractFixture implements OrderedFixtureInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$annotation1 = new Annotation($this->getReference('admin-user'));
|
||||
$annotation1->setEntry($this->getReference('entry1'));
|
||||
$annotation1->setText('This is my annotation /o/');
|
||||
$annotation1->setQuote('content');
|
||||
|
||||
$manager->persist($annotation1);
|
||||
|
||||
$this->addReference('annotation1', $annotation1);
|
||||
|
||||
$annotation2 = new Annotation($this->getReference('admin-user'));
|
||||
$annotation2->setEntry($this->getReference('entry2'));
|
||||
$annotation2->setText('This is my 2nd annotation /o/');
|
||||
$annotation2->setQuote('content');
|
||||
|
||||
$manager->persist($annotation2);
|
||||
|
||||
$this->addReference('annotation2', $annotation2);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getOrder()
|
||||
{
|
||||
return 35;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\AnnotationBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
class Configuration implements ConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('wallabag_annotation');
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\AnnotationBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
class WallabagAnnotationExtension extends Extension
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
}
|
||||
}
|
||||
270
src/Wallabag/AnnotationBundle/Entity/Annotation.php
Normal file
270
src/Wallabag/AnnotationBundle/Entity/Annotation.php
Normal file
@ -0,0 +1,270 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\AnnotationBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JMS\Serializer\Annotation\ExclusionPolicy;
|
||||
use JMS\Serializer\Annotation\Exclude;
|
||||
use JMS\Serializer\Annotation\VirtualProperty;
|
||||
use JMS\Serializer\Annotation\SerializedName;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
/**
|
||||
* Annotation.
|
||||
*
|
||||
* @ORM\Table(name="annotation")
|
||||
* @ORM\Entity(repositoryClass="Wallabag\AnnotationBundle\Repository\AnnotationRepository")
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
* @ExclusionPolicy("none")
|
||||
*/
|
||||
class Annotation
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="text", type="text")
|
||||
*/
|
||||
private $text;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="created_at", type="datetime")
|
||||
*/
|
||||
private $createdAt;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="updated_at", type="datetime")
|
||||
*/
|
||||
private $updatedAt;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="quote", type="string")
|
||||
*/
|
||||
private $quote;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*
|
||||
* @ORM\Column(name="ranges", type="array")
|
||||
*/
|
||||
private $ranges;
|
||||
|
||||
/**
|
||||
* @Exclude
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
|
||||
*/
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @Exclude
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Entry", inversedBy="annotations")
|
||||
* @ORM\JoinColumn(name="entry_id", referencedColumnName="id")
|
||||
*/
|
||||
private $entry;
|
||||
|
||||
/*
|
||||
* @param User $user
|
||||
*/
|
||||
public function __construct(\Wallabag\UserBundle\Entity\User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set text.
|
||||
*
|
||||
* @param string $text
|
||||
*
|
||||
* @return Annotation
|
||||
*/
|
||||
public function setText($text)
|
||||
{
|
||||
$this->text = $text;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get text.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getText()
|
||||
{
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PrePersist
|
||||
* @ORM\PreUpdate
|
||||
*/
|
||||
public function timestamps()
|
||||
{
|
||||
if (is_null($this->createdAt)) {
|
||||
$this->createdAt = new \DateTime();
|
||||
}
|
||||
$this->updatedAt = new \DateTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get created.
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getCreatedAt()
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated.
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getUpdatedAt()
|
||||
{
|
||||
return $this->updatedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get quote.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getQuote()
|
||||
{
|
||||
return $this->quote;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set quote.
|
||||
*
|
||||
* @param string $quote
|
||||
*
|
||||
* @return Annotation
|
||||
*/
|
||||
public function setQuote($quote)
|
||||
{
|
||||
$this->quote = $quote;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ranges.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getRanges()
|
||||
{
|
||||
return $this->ranges;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set ranges.
|
||||
*
|
||||
* @param array $ranges
|
||||
*
|
||||
* @return Annotation
|
||||
*/
|
||||
public function setRanges($ranges)
|
||||
{
|
||||
$this->ranges = $ranges;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set user.
|
||||
*
|
||||
* @param string $user
|
||||
*
|
||||
* @return Annotation
|
||||
*/
|
||||
public function setUser($user)
|
||||
{
|
||||
$this->user = $user;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @VirtualProperty
|
||||
* @SerializedName("user")
|
||||
*/
|
||||
public function getUserName()
|
||||
{
|
||||
return $this->user->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set entry.
|
||||
*
|
||||
* @param Entry $entry
|
||||
*
|
||||
* @return Annotation
|
||||
*/
|
||||
public function setEntry($entry)
|
||||
{
|
||||
$this->entry = $entry;
|
||||
$entry->setAnnotation($this);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get entry.
|
||||
*
|
||||
* @return Entry
|
||||
*/
|
||||
public function getEntry()
|
||||
{
|
||||
return $this->entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @VirtualProperty
|
||||
* @SerializedName("annotator_schema_version")
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return 'v1.0';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\AnnotationBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* AnnotationRepository.
|
||||
*/
|
||||
class AnnotationRepository extends EntityRepository
|
||||
{
|
||||
/**
|
||||
* Return a query builder to used by other getBuilderFor* method.
|
||||
*
|
||||
* @param int $userId
|
||||
*
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
private function getBuilderByUser($userId)
|
||||
{
|
||||
return $this->createQueryBuilder('a')
|
||||
->leftJoin('a.user', 'u')
|
||||
->andWhere('u.id = :userId')->setParameter('userId', $userId)
|
||||
->orderBy('a.id', 'desc')
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves all annotations for a user.
|
||||
*
|
||||
* @param int $userId
|
||||
*
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
public function getBuilderForAllByUser($userId)
|
||||
{
|
||||
return $this
|
||||
->getBuilderByUser($userId)
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get annotation for this id.
|
||||
*
|
||||
* @param int $annotationId
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function findAnnotationById($annotationId)
|
||||
{
|
||||
return $this->createQueryBuilder('a')
|
||||
->andWhere('a.id = :annotationId')->setParameter('annotationId', $annotationId)
|
||||
->getQuery()->getSingleResult()
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find annotations for entry id.
|
||||
*
|
||||
* @param int $entryId
|
||||
* @param int $userId
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function findAnnotationsByPageId($entryId, $userId)
|
||||
{
|
||||
return $this->createQueryBuilder('a')
|
||||
->where('a.entry = :entryId')->setParameter('entryId', $entryId)
|
||||
->andwhere('a.user = :userId')->setParameter('userId', $userId)
|
||||
->getQuery()->getResult()
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find last annotation for a given entry id. Used only for tests.
|
||||
*
|
||||
* @param int $entryId
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function findLastAnnotationByPageId($entryId, $userId)
|
||||
{
|
||||
return $this->createQueryBuilder('a')
|
||||
->where('a.entry = :entryId')->setParameter('entryId', $entryId)
|
||||
->andwhere('a.user = :userId')->setParameter('userId', $userId)
|
||||
->orderBy('a.id', 'DESC')
|
||||
->setMaxResults(1)
|
||||
->getQuery()
|
||||
->getOneOrNullResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used only in test case to get the right annotation associated to the right user.
|
||||
*
|
||||
* @param string $username
|
||||
*
|
||||
* @return Annotation
|
||||
*/
|
||||
public function findOneByUsername($username)
|
||||
{
|
||||
return $this->createQueryBuilder('a')
|
||||
->leftJoin('a.user', 'u')
|
||||
->where('u.username = :username')->setParameter('username', $username)
|
||||
->orderBy('a.id', 'DESC')
|
||||
->setMaxResults(1)
|
||||
->getQuery()
|
||||
->getSingleResult();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
annotations:
|
||||
type: rest
|
||||
resource: "WallabagAnnotationBundle:WallabagAnnotation"
|
||||
name_prefix: annotations_
|
||||
@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\AnnotationBundle\Tests\Controller;
|
||||
|
||||
use Wallabag\AnnotationBundle\Tests\WallabagAnnotationTestCase;
|
||||
|
||||
class AnnotationControllerTest extends WallabagAnnotationTestCase
|
||||
{
|
||||
public function testGetAnnotations()
|
||||
{
|
||||
$annotation = $this->client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagAnnotationBundle:Annotation')
|
||||
->findOneByUsername('admin');
|
||||
|
||||
if (!$annotation) {
|
||||
$this->markTestSkipped('No content found in db.');
|
||||
}
|
||||
|
||||
$this->logInAs('admin');
|
||||
$crawler = $this->client->request('GET', 'annotations/'.$annotation->getEntry()->getId().'.json');
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
$this->assertEquals(1, $content['total']);
|
||||
$this->assertEquals($annotation->getText(), $content['rows'][0]['text']);
|
||||
}
|
||||
|
||||
public function testSetAnnotation()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
|
||||
$entry = $this->client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->findOneByUsernameAndNotArchived('admin');
|
||||
|
||||
$headers = array('CONTENT_TYPE' => 'application/json');
|
||||
$content = json_encode(array(
|
||||
'text' => 'my annotation',
|
||||
'quote' => 'my quote',
|
||||
'ranges' => array('start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31),
|
||||
));
|
||||
$crawler = $this->client->request('POST', 'annotations/'.$entry->getId().'.json', array(), array(), $headers, $content);
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
|
||||
$this->assertEquals('Big boss', $content['user']);
|
||||
$this->assertEquals('v1.0', $content['annotator_schema_version']);
|
||||
$this->assertEquals('my annotation', $content['text']);
|
||||
$this->assertEquals('my quote', $content['quote']);
|
||||
|
||||
$annotation = $this->client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagAnnotationBundle:Annotation')
|
||||
->findLastAnnotationByPageId($entry->getId(), 1);
|
||||
|
||||
$this->assertEquals('my annotation', $annotation->getText());
|
||||
}
|
||||
|
||||
public function testEditAnnotation()
|
||||
{
|
||||
$annotation = $this->client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagAnnotationBundle:Annotation')
|
||||
->findOneByUsername('admin');
|
||||
|
||||
$this->logInAs('admin');
|
||||
|
||||
$headers = array('CONTENT_TYPE' => 'application/json');
|
||||
$content = json_encode(array(
|
||||
'text' => 'a modified annotation',
|
||||
));
|
||||
$crawler = $this->client->request('PUT', 'annotations/'.$annotation->getId().'.json', array(), array(), $headers, $content);
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
|
||||
$this->assertEquals('Big boss', $content['user']);
|
||||
$this->assertEquals('v1.0', $content['annotator_schema_version']);
|
||||
$this->assertEquals('a modified annotation', $content['text']);
|
||||
$this->assertEquals('my quote', $content['quote']);
|
||||
|
||||
$annotationUpdated = $this->client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagAnnotationBundle:Annotation')
|
||||
->findOneById($annotation->getId());
|
||||
$this->assertEquals('a modified annotation', $annotationUpdated->getText());
|
||||
}
|
||||
|
||||
public function testDeleteAnnotation()
|
||||
{
|
||||
$annotation = $this->client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagAnnotationBundle:Annotation')
|
||||
->findOneByUsername('admin');
|
||||
|
||||
$this->logInAs('admin');
|
||||
|
||||
$headers = array('CONTENT_TYPE' => 'application/json');
|
||||
$content = json_encode(array(
|
||||
'text' => 'a modified annotation',
|
||||
));
|
||||
$crawler = $this->client->request('DELETE', 'annotations/'.$annotation->getId().'.json', array(), array(), $headers, $content);
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
|
||||
$this->assertEquals('a modified annotation', $content['text']);
|
||||
|
||||
$annotationDeleted = $this->client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagAnnotationBundle:Annotation')
|
||||
->findOneById($annotation->getId());
|
||||
|
||||
$this->assertNull($annotationDeleted);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\AnnotationBundle\Tests;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
use Symfony\Component\BrowserKit\Cookie;
|
||||
|
||||
abstract class WallabagAnnotationTestCase extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
protected $client = null;
|
||||
|
||||
/**
|
||||
* @var \FOS\UserBundle\Model\UserInterface
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->client = $this->createAuthorizedClient();
|
||||
}
|
||||
|
||||
public function logInAs($username)
|
||||
{
|
||||
$crawler = $this->client->request('GET', '/login');
|
||||
$form = $crawler->filter('button[type=submit]')->form();
|
||||
$data = array(
|
||||
'_username' => $username,
|
||||
'_password' => 'mypassword',
|
||||
);
|
||||
|
||||
$this->client->submit($form, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Client
|
||||
*/
|
||||
protected function createAuthorizedClient()
|
||||
{
|
||||
$client = static::createClient();
|
||||
$container = $client->getContainer();
|
||||
|
||||
/** @var $userManager \FOS\UserBundle\Doctrine\UserManager */
|
||||
$userManager = $container->get('fos_user.user_manager');
|
||||
/** @var $loginManager \FOS\UserBundle\Security\LoginManager */
|
||||
$loginManager = $container->get('fos_user.security.login_manager');
|
||||
$firewallName = $container->getParameter('fos_user.firewall_name');
|
||||
|
||||
$this->user = $userManager->findUserBy(array('username' => 'admin'));
|
||||
$loginManager->loginUser($firewallName, $this->user);
|
||||
|
||||
// save the login token into the session and put it in a cookie
|
||||
$container->get('session')->set('_security_'.$firewallName, serialize($container->get('security.token_storage')->getToken()));
|
||||
$container->get('session')->save();
|
||||
|
||||
$session = $container->get('session');
|
||||
$client->getCookieJar()->set(new Cookie($session->getName(), $session->getId()));
|
||||
|
||||
return $client;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\AnnotationBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class WallabagAnnotationBundle extends Bundle
|
||||
{
|
||||
}
|
||||
@ -9,36 +9,12 @@ use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
|
||||
class WallabagRestController extends FOSRestController
|
||||
{
|
||||
/**
|
||||
* @param Entry $entry
|
||||
* @param string $tags
|
||||
*/
|
||||
private function assignTagsToEntry(Entry $entry, $tags)
|
||||
{
|
||||
foreach (explode(',', $tags) as $label) {
|
||||
$label = trim($label);
|
||||
$tagEntity = $this
|
||||
->getDoctrine()
|
||||
->getRepository('WallabagCoreBundle:Tag')
|
||||
->findOneByLabel($label);
|
||||
|
||||
if (is_null($tagEntity)) {
|
||||
$tagEntity = new Tag();
|
||||
$tagEntity->setLabel($label);
|
||||
}
|
||||
|
||||
// only add the tag on the entry if the relation doesn't exist
|
||||
if (!$entry->getTags()->contains($tagEntity)) {
|
||||
$entry->addTag($tagEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function validateAuthentication()
|
||||
{
|
||||
if (false === $this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) {
|
||||
@ -73,7 +49,6 @@ class WallabagRestController extends FOSRestController
|
||||
$order = $request->query->get('order', 'desc');
|
||||
$page = (int) $request->query->get('page', 1);
|
||||
$perPage = (int) $request->query->get('perPage', 30);
|
||||
$tags = $request->query->get('tags', []);
|
||||
|
||||
$pager = $this->getDoctrine()
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
@ -122,6 +97,8 @@ class WallabagRestController extends FOSRestController
|
||||
* {"name"="url", "dataType"="string", "required"=true, "format"="http://www.test.com/article.html", "description"="Url for the entry."},
|
||||
* {"name"="title", "dataType"="string", "required"=false, "description"="Optional, we'll get the title from the page."},
|
||||
* {"name"="tags", "dataType"="string", "required"=false, "format"="tag1,tag2,tag3", "description"="a comma-separated list of tags."},
|
||||
* {"name"="starred", "dataType"="boolean", "required"=false, "format"="true or false", "description"="entry already starred"},
|
||||
* {"name"="archive", "dataType"="boolean", "required"=false, "format"="true or false", "description"="entry already archived"},
|
||||
* }
|
||||
* )
|
||||
*
|
||||
@ -132,6 +109,8 @@ class WallabagRestController extends FOSRestController
|
||||
$this->validateAuthentication();
|
||||
|
||||
$url = $request->request->get('url');
|
||||
$isArchived = $request->request->get('archive');
|
||||
$isStarred = $request->request->get('starred');
|
||||
|
||||
$entry = $this->get('wallabag_core.content_proxy')->updateEntry(
|
||||
new Entry($this->getUser()),
|
||||
@ -140,11 +119,20 @@ class WallabagRestController extends FOSRestController
|
||||
|
||||
$tags = $request->request->get('tags', '');
|
||||
if (!empty($tags)) {
|
||||
$this->assignTagsToEntry($entry, $tags);
|
||||
$this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags);
|
||||
}
|
||||
|
||||
if (true === (bool) $isStarred) {
|
||||
$entry->setStarred(true);
|
||||
}
|
||||
|
||||
if (true === (bool) $isArchived) {
|
||||
$entry->setArchived(true);
|
||||
}
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($entry);
|
||||
|
||||
$em->flush();
|
||||
|
||||
$json = $this->get('serializer')->serialize($entry, 'json');
|
||||
@ -192,7 +180,7 @@ class WallabagRestController extends FOSRestController
|
||||
|
||||
$tags = $request->request->get('tags', '');
|
||||
if (!empty($tags)) {
|
||||
$this->assignTagsToEntry($entry, $tags);
|
||||
$this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags);
|
||||
}
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
@ -270,7 +258,7 @@ class WallabagRestController extends FOSRestController
|
||||
|
||||
$tags = $request->request->get('tags', '');
|
||||
if (!empty($tags)) {
|
||||
$this->assignTagsToEntry($entry, $tags);
|
||||
$this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags);
|
||||
}
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
@ -352,6 +340,21 @@ class WallabagRestController extends FOSRestController
|
||||
|
||||
return $this->renderJsonResponse($json);
|
||||
}
|
||||
/**
|
||||
* Retrieve version number.
|
||||
*
|
||||
* @ApiDoc()
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function getVersionAction()
|
||||
{
|
||||
$version = $this->container->getParameter('wallabag_core.version');
|
||||
|
||||
$json = $this->get('serializer')->serialize($version, 'json');
|
||||
|
||||
return $this->renderJsonResponse($json);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate that the first id is equal to the second one.
|
||||
|
||||
@ -20,10 +20,6 @@ class Configuration implements ConfigurationInterface
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('wallabag_api');
|
||||
|
||||
// Here you should define the parameters that are allowed to
|
||||
// configure your bundle. See the documentation linked above for
|
||||
// more information on that topic.
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,6 +162,24 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
$this->assertCount(1, $content['tags']);
|
||||
}
|
||||
|
||||
public function testPostArchivedAndStarredEntry()
|
||||
{
|
||||
$this->client->request('POST', '/api/entries.json', array(
|
||||
'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html',
|
||||
'archive' => true,
|
||||
'starred' => true,
|
||||
));
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
|
||||
$this->assertGreaterThan(0, $content['id']);
|
||||
$this->assertEquals('http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html', $content['url']);
|
||||
$this->assertEquals(true, $content['is_archived']);
|
||||
$this->assertEquals(true, $content['is_starred']);
|
||||
}
|
||||
|
||||
public function testPatchEntry()
|
||||
{
|
||||
$entry = $this->client->getContainer()
|
||||
@ -318,4 +336,15 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
|
||||
$this->assertCount(0, $entries);
|
||||
}
|
||||
|
||||
public function testGetVersion()
|
||||
{
|
||||
$this->client->request('GET', '/api/version');
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
|
||||
$this->assertEquals($this->client->getContainer()->getParameter('wallabag_core.version'), $content);
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
||||
use Symfony\Component\Console\Question\Question;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
use Craue\ConfigBundle\Entity\Setting;
|
||||
|
||||
class InstallCommand extends ContainerAwareCommand
|
||||
{
|
||||
@ -25,6 +26,14 @@ class InstallCommand extends ContainerAwareCommand
|
||||
*/
|
||||
protected $defaultOutput;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $functionExists = [
|
||||
'curl_exec',
|
||||
'curl_multi_init',
|
||||
];
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
@ -55,7 +64,7 @@ class InstallCommand extends ContainerAwareCommand
|
||||
;
|
||||
|
||||
$output->writeln('<info>Wallabag has been successfully installed.</info>');
|
||||
$output->writeln('<comment>Just execute `php bin/console server:run` for using wallabag: http://localhost:8000</comment>');
|
||||
$output->writeln('<comment>Just execute `php bin/console server:run --env=prod` for using wallabag: http://localhost:8000</comment>');
|
||||
}
|
||||
|
||||
protected function checkRequirements()
|
||||
@ -64,28 +73,32 @@ class InstallCommand extends ContainerAwareCommand
|
||||
|
||||
$fulfilled = true;
|
||||
|
||||
// @TODO: find a better way to check requirements
|
||||
$label = '<comment>PCRE</comment>';
|
||||
if (extension_loaded('pcre')) {
|
||||
$label = '<comment>PDO Drivers</comment>';
|
||||
if (extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql')) {
|
||||
$status = '<info>OK!</info>';
|
||||
$help = '';
|
||||
} else {
|
||||
$fulfilled = false;
|
||||
$status = '<error>ERROR!</error>';
|
||||
$help = 'You should enabled PCRE extension';
|
||||
$help = 'Needs one of sqlite, mysql or pgsql PDO drivers';
|
||||
}
|
||||
|
||||
$rows[] = array($label, $status, $help);
|
||||
|
||||
$label = '<comment>DOM</comment>';
|
||||
if (extension_loaded('DOM')) {
|
||||
foreach ($this->functionExists as $functionRequired) {
|
||||
$label = '<comment>'.$functionRequired.'</comment>';
|
||||
|
||||
if (function_exists($functionRequired)) {
|
||||
$status = '<info>OK!</info>';
|
||||
$help = '';
|
||||
} else {
|
||||
$fulfilled = false;
|
||||
$status = '<error>ERROR!</error>';
|
||||
$help = 'You should enabled DOM extension';
|
||||
$help = 'You need the '.$functionRequired.' function activated';
|
||||
}
|
||||
|
||||
$rows[] = array($label, $status, $help);
|
||||
}
|
||||
|
||||
$table = new Table($this->defaultOutput);
|
||||
$table
|
||||
@ -180,7 +193,7 @@ class InstallCommand extends ContainerAwareCommand
|
||||
$this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>');
|
||||
|
||||
$questionHelper = $this->getHelperSet()->get('question');
|
||||
$question = new ConfirmationQuestion('Would you like to create a new user ? (y/N)', false);
|
||||
$question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true);
|
||||
|
||||
if (!$questionHelper->ask($this->defaultInput, $this->defaultOutput, $question)) {
|
||||
return $this;
|
||||
@ -201,17 +214,152 @@ class InstallCommand extends ContainerAwareCommand
|
||||
$user->setEmail($questionHelper->ask($this->defaultInput, $this->defaultOutput, $question));
|
||||
|
||||
$user->setEnabled(true);
|
||||
$user->addRole('ROLE_SUPER_ADMIN');
|
||||
|
||||
$em->persist($user);
|
||||
|
||||
$config = new Config($user);
|
||||
$config->setTheme($this->getContainer()->getParameter('theme'));
|
||||
$config->setItemsPerPage($this->getContainer()->getParameter('items_on_page'));
|
||||
$config->setRssLimit($this->getContainer()->getParameter('rss_limit'));
|
||||
$config->setLanguage($this->getContainer()->getParameter('language'));
|
||||
$config->setTheme($this->getContainer()->getParameter('wallabag_core.theme'));
|
||||
$config->setItemsPerPage($this->getContainer()->getParameter('wallabag_core.items_on_page'));
|
||||
$config->setRssLimit($this->getContainer()->getParameter('wallabag_core.rss_limit'));
|
||||
$config->setLanguage($this->getContainer()->getParameter('wallabag_core.language'));
|
||||
|
||||
$em->persist($config);
|
||||
|
||||
// cleanup before insert new stuff
|
||||
$em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute();
|
||||
|
||||
$settings = [
|
||||
[
|
||||
'name' => 'download_pictures',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'carrot',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'share_diaspora',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'diaspora_url',
|
||||
'value' => 'http://diasporapod.com',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'share_shaarli',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'shaarli_url',
|
||||
'value' => 'http://myshaarli.com',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'share_mail',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'share_twitter',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'export_epub',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_mobi',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_pdf',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_csv',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_json',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_txt',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_xml',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'pocket_consumer_key',
|
||||
'value' => null,
|
||||
'section' => 'import',
|
||||
],
|
||||
[
|
||||
'name' => 'show_printlink',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'wallabag_support_url',
|
||||
'value' => 'https://www.wallabag.org/pages/support.html',
|
||||
'section' => 'misc',
|
||||
],
|
||||
[
|
||||
'name' => 'wallabag_url',
|
||||
'value' => 'http://v2.wallabag.org',
|
||||
'section' => 'misc',
|
||||
],
|
||||
[
|
||||
'name' => 'piwik_enabled',
|
||||
'value' => '0',
|
||||
'section' => 'analytics',
|
||||
],
|
||||
[
|
||||
'name' => 'piwik_host',
|
||||
'value' => 'http://v2.wallabag.org',
|
||||
'section' => 'analytics',
|
||||
],
|
||||
[
|
||||
'name' => 'piwik_site_id',
|
||||
'value' => '1',
|
||||
'section' => 'analytics',
|
||||
],
|
||||
[
|
||||
'name' => 'demo_mode_enabled',
|
||||
'value' => '0',
|
||||
'section' => 'misc',
|
||||
],
|
||||
[
|
||||
'name' => 'demo_mode_username',
|
||||
'value' => 'wallabag',
|
||||
'section' => 'misc',
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($settings as $setting) {
|
||||
$newSetting = new Setting();
|
||||
$newSetting->setName($setting['name']);
|
||||
$newSetting->setValue($setting['value']);
|
||||
$newSetting->setSection($setting['section']);
|
||||
$em->persist($newSetting);
|
||||
}
|
||||
|
||||
$em->flush();
|
||||
|
||||
$this->defaultOutput->writeln('');
|
||||
|
||||
@ -5,6 +5,7 @@ namespace Wallabag\CoreBundle\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
use Wallabag\CoreBundle\Entity\TaggingRule;
|
||||
@ -15,7 +16,6 @@ use Wallabag\CoreBundle\Form\Type\RssType;
|
||||
use Wallabag\CoreBundle\Form\Type\TaggingRuleType;
|
||||
use Wallabag\CoreBundle\Form\Type\UserInformationType;
|
||||
use Wallabag\CoreBundle\Tools\Utils;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class ConfigController extends Controller
|
||||
{
|
||||
@ -56,15 +56,18 @@ class ConfigController extends Controller
|
||||
$pwdForm->handleRequest($request);
|
||||
|
||||
if ($pwdForm->isValid()) {
|
||||
if ($this->get('craue_config')->get('demo_mode_enabled') && $this->get('craue_config')->get('demo_mode_username') === $user->getUsername()) {
|
||||
$message = 'In demonstration mode, you can\'t change password for this user.';
|
||||
} else {
|
||||
$message = 'Password updated';
|
||||
|
||||
$user->setPlainPassword($pwdForm->get('new_password')->getData());
|
||||
$userManager->updateUser($user, true);
|
||||
}
|
||||
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
'notice',
|
||||
'Password updated'
|
||||
);
|
||||
$this->get('session')->getFlashBag()->add('notice', $message);
|
||||
|
||||
return $this->redirect($this->generateUrl('config'));
|
||||
return $this->redirect($this->generateUrl('config').'#set4');
|
||||
}
|
||||
|
||||
// handle changing user information
|
||||
@ -82,7 +85,7 @@ class ConfigController extends Controller
|
||||
'Information updated'
|
||||
);
|
||||
|
||||
return $this->redirect($this->generateUrl('config'));
|
||||
return $this->redirect($this->generateUrl('config').'#set3');
|
||||
}
|
||||
|
||||
// handle rss information
|
||||
@ -98,7 +101,7 @@ class ConfigController extends Controller
|
||||
'RSS information updated'
|
||||
);
|
||||
|
||||
return $this->redirect($this->generateUrl('config'));
|
||||
return $this->redirect($this->generateUrl('config').'#set2');
|
||||
}
|
||||
|
||||
// handle tagging rule
|
||||
@ -116,7 +119,7 @@ class ConfigController extends Controller
|
||||
'Tagging rules updated'
|
||||
);
|
||||
|
||||
return $this->redirect($this->generateUrl('config'));
|
||||
return $this->redirect($this->generateUrl('config').'#set5');
|
||||
}
|
||||
|
||||
// handle adding new user
|
||||
@ -133,10 +136,10 @@ class ConfigController extends Controller
|
||||
$userManager->updateUser($newUser, true);
|
||||
|
||||
$config = new Config($newUser);
|
||||
$config->setTheme($this->container->getParameter('theme'));
|
||||
$config->setItemsPerPage($this->container->getParameter('items_on_page'));
|
||||
$config->setRssLimit($this->container->getParameter('rss_limit'));
|
||||
$config->setLanguage($this->container->getParameter('language'));
|
||||
$config->setTheme($this->getParameter('wallabag_core.theme'));
|
||||
$config->setItemsPerPage($this->getParameter('wallabag_core.items_on_page'));
|
||||
$config->setRssLimit($this->getParameter('wallabag_core.rss_limit'));
|
||||
$config->setLanguage($this->getParameter('wallabag_core.language'));
|
||||
|
||||
$em->persist($config);
|
||||
|
||||
@ -144,10 +147,10 @@ class ConfigController extends Controller
|
||||
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
'notice',
|
||||
sprintf('User "%s" added', $newUser->getUsername())
|
||||
$this->get('translator')->trans('User "%username%" added', array('%username%' => $newUser->getUsername()))
|
||||
);
|
||||
|
||||
return $this->redirect($this->generateUrl('config'));
|
||||
return $this->redirect($this->generateUrl('config').'#set6');
|
||||
}
|
||||
|
||||
return $this->render('WallabagCoreBundle:Config:index.html.twig', array(
|
||||
@ -163,6 +166,7 @@ class ConfigController extends Controller
|
||||
'username' => $user->getUsername(),
|
||||
'token' => $config->getRssToken(),
|
||||
),
|
||||
'twofactor_auth' => $this->getParameter('twofactor_auth'),
|
||||
));
|
||||
}
|
||||
|
||||
@ -171,7 +175,7 @@ class ConfigController extends Controller
|
||||
*
|
||||
* @Route("/generate-token", name="generate_token")
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @return RedirectResponse|JsonResponse
|
||||
*/
|
||||
public function generateTokenAction(Request $request)
|
||||
{
|
||||
@ -186,7 +190,12 @@ class ConfigController extends Controller
|
||||
return new JsonResponse(array('token' => $config->getRssToken()));
|
||||
}
|
||||
|
||||
return $request->headers->get('referer') ? $this->redirect($request->headers->get('referer')) : $this->redirectToRoute('config');
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
'notice',
|
||||
'RSS token updated'
|
||||
);
|
||||
|
||||
return $this->redirect($this->generateUrl('config').'#set2');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -196,9 +205,9 @@ class ConfigController extends Controller
|
||||
*
|
||||
* @Route("/tagging-rule/delete/{id}", requirements={"id" = "\d+"}, name="delete_tagging_rule")
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function deleteTaggingRule(TaggingRule $rule)
|
||||
public function deleteTaggingRuleAction(TaggingRule $rule)
|
||||
{
|
||||
if ($this->getUser()->getId() != $rule->getConfig()->getUser()->getId()) {
|
||||
throw $this->createAccessDeniedException('You can not access this tagging ryle.');
|
||||
@ -213,7 +222,7 @@ class ConfigController extends Controller
|
||||
'Tagging rule deleted'
|
||||
);
|
||||
|
||||
return $this->redirect($this->generateUrl('config'));
|
||||
return $this->redirect($this->generateUrl('config').'#set5');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
100
src/Wallabag/CoreBundle/Controller/DeveloperController.php
Normal file
100
src/Wallabag/CoreBundle/Controller/DeveloperController.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
use Wallabag\CoreBundle\Form\Type\ClientType;
|
||||
|
||||
class DeveloperController extends Controller
|
||||
{
|
||||
/**
|
||||
* List all clients and link to create a new one.
|
||||
*
|
||||
* @Route("/developer", name="developer")
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findAll();
|
||||
|
||||
return $this->render('WallabagCoreBundle:Developer:index.html.twig', array(
|
||||
'clients' => $clients,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a client (an app).
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @Route("/developer/client/create", name="developer_create_client")
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function createClientAction(Request $request)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$client = new Client();
|
||||
$clientForm = $this->createForm(ClientType::class, $client);
|
||||
$clientForm->handleRequest($request);
|
||||
|
||||
if ($clientForm->isValid()) {
|
||||
$client->setAllowedGrantTypes(array('token', 'authorization_code', 'password'));
|
||||
$em->persist($client);
|
||||
$em->flush();
|
||||
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
'notice',
|
||||
'New client created.'
|
||||
);
|
||||
|
||||
return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', array(
|
||||
'client_id' => $client->getPublicId(),
|
||||
'client_secret' => $client->getSecret(),
|
||||
));
|
||||
}
|
||||
|
||||
return $this->render('WallabagCoreBundle:Developer:client.html.twig', array(
|
||||
'form' => $clientForm->createView(),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a client.
|
||||
*
|
||||
* @param Client $client
|
||||
*
|
||||
* @Route("/developer/client/delete/{id}", requirements={"id" = "\d+"}, name="developer_delete_client")
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
*/
|
||||
public function deleteClientAction(Client $client)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->remove($client);
|
||||
$em->flush();
|
||||
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
'notice',
|
||||
'Client deleted'
|
||||
);
|
||||
|
||||
return $this->redirect($this->generateUrl('developer'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display developer how to use an existing app.
|
||||
*
|
||||
* @Route("/developer/howto/first-app", name="developer_howto_firstapp")
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function howtoFirstAppAction()
|
||||
{
|
||||
return $this->render('WallabagCoreBundle:Developer:howto_app.html.twig');
|
||||
}
|
||||
}
|
||||
@ -3,13 +3,14 @@
|
||||
namespace Wallabag\CoreBundle\Controller;
|
||||
|
||||
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||
use Pagerfanta\Exception\OutOfRangeCurrentPageException;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Filter\EntryFilterType;
|
||||
use Wallabag\CoreBundle\Form\Type\EntryFilterType;
|
||||
use Wallabag\CoreBundle\Form\Type\EditEntryType;
|
||||
use Wallabag\CoreBundle\Form\Type\NewEntryType;
|
||||
|
||||
@ -81,7 +82,7 @@ class EntryController extends Controller
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function addEntryViaBookmarklet(Request $request)
|
||||
public function addEntryViaBookmarkletAction(Request $request)
|
||||
{
|
||||
$entry = new Entry($this->getUser());
|
||||
$entry->setUrl($request->get('url'));
|
||||
@ -252,7 +253,13 @@ class EntryController extends Controller
|
||||
$entries = new Pagerfanta($pagerAdapter);
|
||||
|
||||
$entries->setMaxPerPage($this->getUser()->getConfig()->getItemsPerPage());
|
||||
try {
|
||||
$entries->setCurrentPage($page);
|
||||
} catch (OutOfRangeCurrentPageException $e) {
|
||||
if ($page > 1) {
|
||||
return $this->redirect($this->generateUrl($type, array('page' => $entries->getNbPages())), 302);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Entry:entries.html.twig',
|
||||
|
||||
@ -84,7 +84,7 @@ class RssController extends Controller
|
||||
$pagerAdapter = new DoctrineORMAdapter($qb->getQuery());
|
||||
$entries = new Pagerfanta($pagerAdapter);
|
||||
|
||||
$perPage = $user->getConfig()->getRssLimit() ?: $this->container->getParameter('rss_limit');
|
||||
$perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit');
|
||||
$entries->setMaxPerPage($perPage);
|
||||
|
||||
return $this->render('WallabagCoreBundle:Entry:entries.xml.twig', array(
|
||||
|
||||
@ -25,7 +25,10 @@ class StaticController extends Controller
|
||||
{
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Static:about.html.twig',
|
||||
array()
|
||||
array(
|
||||
'version' => $this->getParameter('wallabag_core.version'),
|
||||
'paypal_url' => $this->getParameter('wallabag_core.paypal_url'),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -55,6 +55,26 @@ class TagController extends Controller
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes tag from entry.
|
||||
*
|
||||
* @Route("/remove-tag/{entry}/{tag}", requirements={"entry" = "\d+", "tag" = "\d+"}, name="remove_tag")
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function removeTagFromEntry(Request $request, Entry $entry, Tag $tag)
|
||||
{
|
||||
$entry->removeTag($tag);
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->flush();
|
||||
if (count($tag->getEntries()) == 0) {
|
||||
$em->remove($tag);
|
||||
}
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($request->headers->get('referer'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows tags for current user.
|
||||
*
|
||||
|
||||
158
src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
Normal file
158
src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
Normal file
@ -0,0 +1,158 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\DataFixtures\ORM;
|
||||
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Craue\ConfigBundle\Entity\Setting;
|
||||
|
||||
class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$settings = [
|
||||
[
|
||||
'name' => 'download_pictures',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'carrot',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'share_diaspora',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'diaspora_url',
|
||||
'value' => 'http://diasporapod.com',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'share_shaarli',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'shaarli_url',
|
||||
'value' => 'http://myshaarli.com',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'share_mail',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'share_twitter',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'export_epub',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_mobi',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_pdf',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_csv',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_json',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_txt',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'export_xml',
|
||||
'value' => '1',
|
||||
'section' => 'export',
|
||||
],
|
||||
[
|
||||
'name' => 'pocket_consumer_key',
|
||||
'value' => null,
|
||||
'section' => 'import',
|
||||
],
|
||||
[
|
||||
'name' => 'show_printlink',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'wallabag_support_url',
|
||||
'value' => 'https://www.wallabag.org/pages/support.html',
|
||||
'section' => 'misc',
|
||||
],
|
||||
[
|
||||
'name' => 'wallabag_url',
|
||||
'value' => 'http://v2.wallabag.org',
|
||||
'section' => 'misc',
|
||||
],
|
||||
[
|
||||
'name' => 'piwik_enabled',
|
||||
'value' => '0',
|
||||
'section' => 'analytics',
|
||||
],
|
||||
[
|
||||
'name' => 'piwik_host',
|
||||
'value' => 'http://v2.wallabag.org',
|
||||
'section' => 'analytics',
|
||||
],
|
||||
[
|
||||
'name' => 'piwik_site_id',
|
||||
'value' => '1',
|
||||
'section' => 'analytics',
|
||||
],
|
||||
[
|
||||
'name' => 'demo_mode_enabled',
|
||||
'value' => '0',
|
||||
'section' => 'misc',
|
||||
],
|
||||
[
|
||||
'name' => 'demo_mode_username',
|
||||
'value' => 'wallabag',
|
||||
'section' => 'misc',
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($settings as $setting) {
|
||||
$newSetting = new Setting();
|
||||
$newSetting->setName($setting['name']);
|
||||
$newSetting->setValue($setting['value']);
|
||||
$newSetting->setSection($setting['section']);
|
||||
$manager->persist($newSetting);
|
||||
}
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getOrder()
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
}
|
||||
@ -17,6 +17,22 @@ class Configuration implements ConfigurationInterface
|
||||
->arrayNode('languages')
|
||||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->integerNode('items_on_page')
|
||||
->defaultValue(12)
|
||||
->end()
|
||||
->scalarNode('theme')
|
||||
->defaultValue('material')
|
||||
->end()
|
||||
->scalarNode('language')
|
||||
->defaultValue('en')
|
||||
->end()
|
||||
->integerNode('rss_limit')
|
||||
->defaultValue(50)
|
||||
->end()
|
||||
->scalarNode('version')
|
||||
->end()
|
||||
->scalarNode('paypal_url')
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
|
||||
@ -13,7 +13,14 @@ class WallabagCoreExtension extends Extension
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
|
||||
$container->setParameter('wallabag_core.languages', $config['languages']);
|
||||
$container->setParameter('wallabag_core.items_on_page', $config['items_on_page']);
|
||||
$container->setParameter('wallabag_core.theme', $config['theme']);
|
||||
$container->setParameter('wallabag_core.language', $config['language']);
|
||||
$container->setParameter('wallabag_core.rss_limit', $config['rss_limit']);
|
||||
$container->setParameter('wallabag_core.version', $config['version']);
|
||||
$container->setParameter('wallabag_core.paypal_url', $config['paypal_url']);
|
||||
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
|
||||
@ -9,6 +9,7 @@ use JMS\Serializer\Annotation\Groups;
|
||||
use JMS\Serializer\Annotation\XmlRoot;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
|
||||
/**
|
||||
* Entry.
|
||||
@ -98,13 +99,12 @@ class Entry
|
||||
private $updatedAt;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"})
|
||||
* @ORM\JoinTable
|
||||
*
|
||||
* @ORM\Column(name="comments", type="text", nullable=true)
|
||||
*
|
||||
* @Groups({"export_all"})
|
||||
* @Groups({"entries_for_user", "export_all"})
|
||||
*/
|
||||
private $comments;
|
||||
private $annotations;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@ -366,19 +366,19 @@ class Entry
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @return ArrayCollection<Annotation>
|
||||
*/
|
||||
public function getComments()
|
||||
public function getAnnotations()
|
||||
{
|
||||
return $this->comments;
|
||||
return $this->annotations;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $comments
|
||||
* @param Annotation $annotation
|
||||
*/
|
||||
public function setComments($comments)
|
||||
public function setAnnotation(Annotation $annotation)
|
||||
{
|
||||
$this->comments = $comments;
|
||||
$this->annotations[] = $annotation;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -107,4 +107,14 @@ class Tag
|
||||
{
|
||||
return $this->entries->contains($entry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get entries for this tag.
|
||||
*
|
||||
* @return ArrayCollection<Entry>
|
||||
*/
|
||||
public function getEntries()
|
||||
{
|
||||
return $this->entries;
|
||||
}
|
||||
}
|
||||
|
||||
44
src/Wallabag/CoreBundle/Form/Type/ClientType.php
Normal file
44
src/Wallabag/CoreBundle/Form/Type/ClientType.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Form\Type;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\CallbackTransformer;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\UrlType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class ClientType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('redirect_uris', UrlType::class, array('required' => true, 'label' => 'Redirect URIs'))
|
||||
->add('save', SubmitType::class, array('label' => 'Create a new client'))
|
||||
;
|
||||
|
||||
$builder->get('redirect_uris')
|
||||
->addModelTransformer(new CallbackTransformer(
|
||||
function ($originalUri) {
|
||||
return $originalUri;
|
||||
},
|
||||
function ($submittedUri) {
|
||||
return array($submittedUri);
|
||||
}
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
'data_class' => 'Wallabag\ApiBundle\Entity\Client',
|
||||
));
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'client';
|
||||
}
|
||||
}
|
||||
@ -16,11 +16,6 @@ class EditEntryType extends AbstractType
|
||||
$builder
|
||||
->add('title', TextType::class, array('required' => true))
|
||||
->add('is_public', CheckboxType::class, array('required' => false))
|
||||
// @todo: add autocomplete
|
||||
// ->add('tags', 'entity', array(
|
||||
// 'class' => 'Wallabag\CoreBundle\Entity\Tag',
|
||||
// 'choice_translation_domain' => true,
|
||||
// ))
|
||||
->add('save', SubmitType::class)
|
||||
;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Filter;
|
||||
namespace Wallabag\CoreBundle\Form\Type;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user