From 252ebd60719d32ec954d0519c9edf2b52b03310c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 30 Dec 2015 12:23:51 +0100 Subject: Rewrote Pocket Import For the moment, we won't do a queue system, just a plain synchronous import. We also use ContentProxy to grab content for each article from Pocket. Error from Pocket are now logged using the logger. The ImportInterface need to be simple and not related to oAuth (not all import will use that method). --- .../ImportBundle/Resources/config/services.yml | 21 ++++++++-------- .../Resources/views/Import/index.html.twig | 28 +--------------------- .../Resources/views/Pocket/index.html.twig | 2 +- 3 files changed, 13 insertions(+), 38 deletions(-) (limited to 'src/Wallabag/ImportBundle/Resources') diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml index ab516ca5..f421821c 100644 --- a/src/Wallabag/ImportBundle/Resources/config/services.yml +++ b/src/Wallabag/ImportBundle/Resources/config/services.yml @@ -1,14 +1,4 @@ services: - wallabag_import.pocket.import: - class: Wallabag\ImportBundle\Import\PocketImport - arguments: - - "@security.token_storage" - - "@session" - - "@doctrine.orm.entity_manager" - - %pocket_consumer_key% - calls: - - [ setClient, [ "@wallabag_import.pocket.client" ] ] - wallabag_import.pocket.client: class: GuzzleHttp\Client arguments: @@ -17,3 +7,14 @@ services: headers: content-type: "application/json" X-Accept: "application/json" + + wallabag_import.pocket.import: + class: Wallabag\ImportBundle\Import\PocketImport + arguments: + - "@security.token_storage" + - "@doctrine.orm.entity_manager" + - "@wallabag_core.content_proxy" + - %pocket_consumer_key% + calls: + - [ setClient, [ "@wallabag_import.pocket.client" ] ] + - [ setLogger, [ "@logger" ]] diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig index ee759a52..b068283a 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig @@ -8,35 +8,9 @@
{% trans %}Welcome on wallabag importer. Please select your previous service that you want to migrate.{% endtrans %}
- - -
-
-
-
-
-
- {{ form_errors(form.import) }} -
-
-

{% trans %}Please select your wallabag export and click on the below button to upload and import it.{% endtrans %}

- {{ form_errors(form.import.file) }} - {{ form_widget(form.import.file) }} -
-
- - -
-
-
-
-
-
{% endblock %} diff --git a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig index df64e472..940fe4cc 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig @@ -7,7 +7,7 @@
{% trans %}You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.{% endtrans %} -
+
-- cgit v1.2.3