Commit graph

30 commits

Author SHA1 Message Date
Jeremy Benoist
bd91bd5c32
Use namespaced PHPUnit classes 2017-12-18 13:29:33 +01:00
Jeremy Benoist
f808b01692
Add a real configuration for CS-Fixer 2017-07-01 09:52:38 +02:00
Jeremy Benoist
6acadf8e98
Rewrote code & fix tests 2017-06-01 11:31:45 +02:00
Jerome Charaoui
704803e182
Replace Wallabag v1 error strings with v2 strings 2017-06-01 09:48:14 +02:00
Jerome Charaoui
d0e9b3d640
Add disableContentUpdate import option
This commit also decouples the "import" and "update" functions inside
ContentProxy. If a content array is available, it must be passed to the
new importEntry method.
2017-06-01 09:48:14 +02:00
Jeremy Benoist
cf05a1ae34
Reduce imported entries
Down from 2.2 minutes to 1.39 minutes
2017-05-31 14:00:15 +02:00
Jeremy Benoist
e668a8124c
Allow other fields to be send using API
Entry API can now have these new fields:
- content
- language
- preview_picture
- published_at

Re-use the ContentProxy to be able to do the same using the web UI (in the future).
htmLawed is used to clean stuff from content, I hope it’ll be enough to avoid security breach.

Lower content validation when we want to update an entry with content already defined. Before, language & content_type were required. If there weren’t provided, we re-fetched the content using graby. I think these fields aren’t required for an entry to be created. So I removed them.
Which means some import from the v1 export won’t be re-fetched since they provide content, url & title.

Also, remove liberation link from Readability import to avoid overlaping import (from wallabag v1, which had the same link)
2017-05-31 13:59:45 +02:00
Jeremy Benoist
7a8ed3cee1
Add support for tag in Instapaper import 2017-05-31 10:38:00 +02:00
Thomas Citharel
6bc6fb1f60 Move Tags assigner to a separate file
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-05-27 22:08:14 +02:00
Jeremy Benoist
7816eb622d
Add entry.saved event to import & rest 2016-11-02 07:10:23 +01:00
Jeremy Benoist
ff1a5362f7 Add Instapaper import
Also update ImportController with latest import (chrome, firefox & instapaper).
2016-09-27 20:27:08 +02:00
Jeremy Benoist
d6de23a100 Merge pull request #2192 from wallabag/import-browser-bookmarks
Import Firefox & Chrome bookmarks into wallabag
2016-09-26 14:47:02 +02:00
Jeremy Benoist
12d93e6896
Update Firefox file
With real data, the previous looks more than a Chrome converted file.
Also, fix date conversion (hope so).
2016-09-25 22:24:07 +02:00
Thomas Citharel
64b1229b2d
fix tests 2016-09-25 12:29:19 +02:00
Thomas Citharel
59201088b4
bring chrome and firefox as separate imports 2016-09-25 12:29:18 +02:00
Jeremy Benoist
401135852c
Use scheduled entity insertions to avoid tag duplicate
Using `getScheduledEntityInsertions()` we can retrieve not yet flushed but already persisted entities and then avoid tags duplication on import.
2016-09-25 12:03:49 +02:00
Jeremy Benoist
59b97fae99
Avoid losing entry when fetching fail
Instead of just say “Failed to save entry” we’ll save the entry at all cost and try to fetch content. If fetching content failed, the entry will still be saved at least, but without content.
2016-09-17 07:40:56 +02:00
Jeremy Benoist
ebe0787e09
Moved Pocket token to user config 2016-09-16 22:22:25 +02:00
Jeremy Benoist
c80cc01afa
Change flash message for queued articles 2016-09-13 21:09:05 +02:00
Jeremy Benoist
7230e4c39f
Enable Redis on Travis
Add generated files from `composer up`
Add more articles for Readability tests
2016-09-11 21:58:57 +02:00
Jeremy Benoist
b3437d58ae
Enable Redis async import
- using javibravo/simpleue
- internal config value are now `import_with_redis` & `import_with_rabbit` which are more clear
- if both option are enable rabbit will be choosen
- services imports related to async are now splitted into 2 files: `redis.yml` & `rabbit.yml`
-
2016-09-11 21:58:56 +02:00
Jeremy Benoist
7f7531171f
Retrieve created date from Pocket 2016-09-11 21:58:56 +02:00
Jeremy Benoist
13470c3596
Add test for RabbitMQ
Also update Symfony deps
2016-09-11 21:58:56 +02:00
Jeremy Benoist
02f6489572
Retrieve all items from Pocket
5000 by 5000.
Also, retrieve newest item first.
2016-09-11 21:58:31 +02:00
Jeremy Benoist
ef75e1220e
Send every imported item to the queue
Instead of queing real Entry to process, we queue all the item to import from Pocket in a raw format.
Then, the worker retrieve that information, find / create the entry and save it.
2016-09-11 21:57:46 +02:00
Nicolas Lœuillet
40d2a29443
Replace RabbitMQ injection with CraueConfiguration 2016-09-11 21:57:09 +02:00
Nicolas Lœuillet
56c778b415
1st draft for rabbitMQ 2016-09-11 21:57:09 +02:00
Jeremy Benoist
a1a1077059
Add tests on ReadabilityImport 2016-09-01 13:39:41 +02:00
Jeremy Benoist
19d9efab32
Avoid breaking import when fetching fail
graby will throw an Exception in some case (like a bad url, a restricted url or a secured pdf).

Import doesn't handle that case and break the whole import.
With that commit the import isn't stopped but the entry is just skipped.

Also, as a  bonus, I've added extra test on WallabagImportV2 when the json is empty.
2016-08-20 01:17:26 +02:00
Jeremy Benoist
23634d5d84 Jump to Symfony 3.1 2016-06-22 17:59:35 +02:00