Commit graph

213 commits

Author SHA1 Message Date
Jeremy Benoist
a91a3150fb
CS 2019-05-28 11:42:27 +02:00
Jeremy Benoist
448d99f84e
CS 2019-05-28 11:42:27 +02:00
adev
5f08426201
Fix because of some breaking changes of Graby 2.0 2019-05-28 11:42:27 +02:00
adev
bf9ace0643
Use httplug 2019-05-28 11:40:41 +02:00
Jeremy Benoist
9ca670c801
Fix Instapaper import date 2019-05-24 14:37:54 +02:00
Jeremy Benoist
8c0ba95307
Adding more tests 2019-02-27 15:01:03 +01:00
Jeremy Benoist
ea925bb112
CS 2019-02-27 14:33:26 +01:00
Thomas Citharel
3784688a88
Replace continue; with break; to avoid PHP 7.3 warnings
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-02-27 14:29:14 +01:00
Jeremy Benoist
18460b2d79
Merge remote-tracking branch 'origin/master' into 2.4 2019-02-07 18:01:15 +01:00
Jeremy Benoist
8d082488e9
Improve checks & add tests 2019-01-28 06:03:16 +01:00
Tristan Hill
a2e60dd393
status and favourite are actually strings in the import so use == 2019-01-27 18:39:26 +01:00
Jeremy Benoist
2491c50b6b
Fix status from Instapaper
That status was used as `http_status` in ContentProxy->stockEntry
2019-01-19 22:24:52 +01:00
Jeremy Benoist
3afc87426d
CS 2019-01-15 09:49:22 +01:00
Jeremy Benoist
5419a8368e
Merge remote-tracking branch 'origin/master' into 2.4 2019-01-15 09:41:18 +01:00
Jeremy Benoist
9f8f188d92
Validate imported entry to avoid error on import
We got some imports with a missing `url` field generating some errors while trying to retrieve an existing entry with that url.
Introducing the `validateEntry` allow us to dismiss a message when it doesn't have an url (or other missing stuff in the future)
2019-01-03 09:42:06 +01:00
Jeremy Benoist
115de64e5b
Jump to Symfony 3.4
Thanks to the BC compatibility, almost nothing have to be changed.
All changes are related to new bundle version of:
- SensioFrameworkExtraBundle
- DoctrineFixturesBundle
2018-10-04 14:11:57 +02:00
Sébastien Viande
7975395d10
Entry: add archived_at property and updateArchived method 2018-09-21 10:33:33 +02:00
Kevin Decherf
2a1ceb67b4 php-cs-fixer
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2018-09-05 14:25:32 +02:00
Jeremy Benoist
c8ac32cf17
Jump to Simpleue 2.0
The 1.3.0 tag is introducing BC so we jump to the 2.0
2017-11-18 16:28:54 +01:00
Jeremy Benoist
3ef055ced3
CS 2017-10-09 16:47:15 +02:00
Jérémy Benoist
4fc7eba349 Merge pull request #3298 from nclsHart/fix-namespace-phpdoc
Fix some namespaces and phpdoc
2017-07-30 08:27:39 +02:00
Nicolas Hart
fe312015d2 Add missing abstract method prepareEntry in BrowserImport 2017-07-29 22:59:11 +02:00
Nicolas Hart
52b84c11a5 Fix some namespaces and phpdoc 2017-07-29 22:51:50 +02:00
Jeremy Benoist
459374022f
CS 2017-07-24 11:52:43 +02:00
Jeremy Benoist
f808b01692
Add a real configuration for CS-Fixer 2017-07-01 09:52:38 +02:00
Jeremy Benoist
f5924e9547
Fix option attributes 2017-06-01 15:44:36 +02:00
Jeremy Benoist
701d3066fb
We don't need that getter 2017-06-01 12:46:07 +02:00
Jeremy Benoist
6acadf8e98
Rewrote code & fix tests 2017-06-01 11:31:45 +02:00
Jeremy Benoist
d5c2cc54b5
Fix tests 2017-06-01 09:49:15 +02:00
Jeremy Benoist
432a24f502
CS 2017-06-01 09:48:14 +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
Jerome Charaoui
7aba665e48
Avoid returning objects passed by reference.
Objects are always passed by reference, so it doesn't make sense to
return an object which is passed by reference as it will always be the
same object. This change makes the code a bit more readable.
2017-06-01 09:43:01 +02:00
Jeremy Benoist
7a8ed3cee1
Add support for tag in Instapaper import 2017-05-31 10:38:00 +02:00
Nicolas Lœuillet
7aa5607f29 Merge pull request #3143 from wallabag/fix-wllbg2-import
Fixed is_starred for wallabag v2 import
2017-05-31 09:08:34 +02:00
Jeremy Benoist
047fdc767a
Add tests 2017-05-30 20:27:44 +02:00
Thomas Citharel
5d3deafd3e CS
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-05-28 01:16:01 +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
Nicolas Lœuillet
4c707d087b Fixed is_starred for wallabag v2 import 2017-05-24 15:36:41 +02:00
Thomas Citharel
d1e5059ea0 Use username to import
Signed-off-by: Thomas Citharel <tcit@tcit.fr>

add docs

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

use username as default

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

rename user to username

typo

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-05-04 14:41:42 +02:00
Nicolas Lœuillet
b45b6b6707
Import: we now skip messages when user is null 2017-02-20 09:16:02 +01:00
Nicolas Lœuillet
24becc9717 Merge pull request #2667 from wallabag/upgrade-symfony-32
Upgrade to Symfony 3.2
2016-12-15 22:18:45 +01:00
Jeremy Benoist
21e7ccef3d
Fix tests & deprecation notice 2016-12-15 21:38:16 +01:00
Nicolas Lœuillet
be2c55de4c
Moved total messages from import 2016-12-08 16:46:17 +01:00
Nicolas Lœuillet
bb98fede2b
Fixed imports with is_starred and is_archived 2016-12-07 16:01:50 +01:00
Nicolas Lœuillet
7dc48ef820
Casted maxIterations for Redis import
Simpleue\Worker wants an integer, we gave it a string
2016-12-06 11:44:40 +01:00
Jerome Charaoui
3cd6da0b74 Allow fetching content on all import types
For better consistency, allow all types of imported entries to update,
which was already the case for Firefox and Chrome.
2016-12-03 00:12:20 -05:00
Jerome Charaoui
36e6ef52a1 Imported entries which fail to fetch get standard error body 2016-12-02 22:42:36 -05:00
Jeremy Benoist
9ab024b4f5
Add Pinboard import 2016-11-04 22:44:31 +01:00
Jeremy Benoist
001cc7168a
Cleanup 2016-11-03 18:01:25 +01:00
Jeremy Benoist
5a619812ca
Merge remote-tracking branch 'origin/master' into 2.2 2016-11-03 16:41:29 +01:00
Jeremy Benoist
ca08d02f2f
Add warning message for import + download images
When import isn't async and downloading images is enabled, we warn the user that import can fail.
Also, added missing translations
2016-11-03 15:59:20 +01:00
Jeremy Benoist
e46fdf3096
CS 2016-11-02 07:26:14 +01:00
Jeremy Benoist
1f66d79e6b
Add more importer to wallabag:import command
All importer available expect Pocket which require an oAuth login.
2016-11-02 07:10:57 +01:00
Jeremy Benoist
7816eb622d
Add entry.saved event to import & rest 2016-11-02 07:10:23 +01:00
Laurent
995d909d0f Add Instapaper to CLI import 2016-11-01 18:33:32 +08:00
Jeremy Benoist
4b3c983ab8
Inject parameter instead of service
We are injecting CraueConfig service when we only need to retrieve one or two values from it.
Instead I discovered we can directly inject a value from a service in the service definition!
2016-10-30 20:27:41 +01:00
Jeremy Benoist
45fd7e09d7
Cleanup 2016-10-30 09:58:53 +01:00
Jeremy Benoist
5453500458
Requeue depending on producer
Browser import can requeue message from `parseEntry` but we should take care of the way import are handled (depending on the producer)
2016-10-20 21:17:45 +02:00
Jeremy Benoist
1e3d74a9cf
Avoid RabbitMQ consumer to loop
When the `parseEntry` returns null it means the entry already exists in the database. Sending `false` as return, will requeue the message which will then loop forever.
2016-10-20 21:17:03 +02:00
Jeremy Benoist
c7ea9b41f3 Add controller test for Instapaper 2016-09-27 20:27:08 +02: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
990adfb34c
Move prepareEntry to dedicated place
Yeah first try was ugly, now each part are in the dedicated place.
Also, the date is hardly truncated to 10 chars because Firefox date are 16 chars long and Chrome are 17 chars long. So instead of divised them by a huge number, I prefer to truncate them.
2016-09-26 07:30: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
Jeremy Benoist
27acc6ddb8
Fix bad date format in Browser import 2016-09-25 15:32:02 +02:00
Nicolas Lœuillet
bd206a84d8
Fixed tests by removing clear() 2016-09-25 12:29:19 +02:00
Thomas Citharel
64b1229b2d
fix tests 2016-09-25 12:29:19 +02:00
Thomas Citharel
2c61db30b7
cs & fixes 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
Nicolas Lœuillet
efe659ab84
Add Chrome path for Mac OS 2016-09-25 12:28:55 +02:00
Thomas Citharel
ae669126e7
Import Firefox & Chrome bookmarks into wallabag 2016-09-25 12:28:54 +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
13a522dfbd
Display a message when async import won’t work
Mostly if Redis or RabbitMQ isn’t installed / launched.
I guess it’ll avoid some issues.
2016-09-24 19:56:15 +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
fbb319f064
Missing some migrations
and CS
2016-09-16 22:58:33 +02:00
Jeremy Benoist
ebe0787e09
Moved Pocket token to user config 2016-09-16 22:22:25 +02:00
Jeremy Benoist
4fc998245c
Only display message in queue for admin
Instead of for EVERYONE
2016-09-16 20:08:07 +02:00
Jeremy Benoist
ac87e0db2a
AMPQ -> AMQP 2016-09-14 10:18:02 +02:00
Jeremy Benoist
c80cc01afa
Change flash message for queued articles 2016-09-13 21:09:05 +02:00
Jeremy Benoist
e01a3c98d6
Display how many messages are queue
- update the docker-composer to add Redis
- add migrations
2016-09-13 20:32:52 +02:00
Jeremy Benoist
ebf5e5087d
Add tests on ImportCommand 2016-09-11 22:15:31 +02:00
Jeremy Benoist
015c7a8359
Add more tests
And ability to define how many messages can be hanle by the redis worker before stopping (usefull for tests)
2016-09-11 22:15:31 +02:00
Jeremy Benoist
7d862f83b9
Re-facto EntryConsumer
Using an abstract method allow to share code but also can be used it we add a new broker in the future
2016-09-11 22:15:31 +02:00
Jeremy Benoist
dc69e25f97
Display a message when async is enabled 2016-09-11 22:15:28 +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
8664069e1a
Fix DateTime & clear() 2016-09-11 21:58:55 +02:00
Jeremy Benoist
6d65c0a8b0
Add ability to define created_at for all import
At the moment only Readability & wallabag v2 import allow created_at import.
Pocket removed `time_added` field from their API v2 to v3...
And wallabag v1 doesn't export that value.
2016-09-11 21:58:55 +02:00
Jeremy Benoist
3aca0a9f00
CS 2016-09-11 21:58:55 +02:00
Jeremy Benoist
3849a9f323
Some cleanup & refactor 2016-09-11 21:58:55 +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
c98db1b653
Convert other imports to Rabbit 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
88e88016b9
Clearing entities in the loop fail on Postgres
It looks like when you clear entities on Postgres some references are lost and tags are not saved :-/
2016-09-11 16:30:01 +02:00
Jeremy Benoist
58fadbc9df
Fix error on EntityManager clear
Introduced in the recent 2.5.5 release.
Also updated deps.
2016-09-11 15:53:16 +02:00
Jeremy Benoist
a1a1077059
Add tests on ReadabilityImport 2016-09-01 13:39:41 +02:00