diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Resources')
4 files changed, 82 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml index 6ada6302..70b8a0d4 100644 --- a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml +++ b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml | |||
@@ -14,6 +14,13 @@ services: | |||
14 | - "@wallabag_user.user_repository" | 14 | - "@wallabag_user.user_repository" |
15 | - "@wallabag_import.readability.import" | 15 | - "@wallabag_import.readability.import" |
16 | - "@logger" | 16 | - "@logger" |
17 | wallabag_import.consumer.amqp.instapaper: | ||
18 | class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer | ||
19 | arguments: | ||
20 | - "@doctrine.orm.entity_manager" | ||
21 | - "@wallabag_user.user_repository" | ||
22 | - "@wallabag_import.instapaper.import" | ||
23 | - "@logger" | ||
17 | wallabag_import.consumer.amqp.wallabag_v1: | 24 | wallabag_import.consumer.amqp.wallabag_v1: |
18 | class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer | 25 | class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer |
19 | arguments: | 26 | arguments: |
diff --git a/src/Wallabag/ImportBundle/Resources/config/redis.yml b/src/Wallabag/ImportBundle/Resources/config/redis.yml index c9c2cf26..0a81e1b5 100644 --- a/src/Wallabag/ImportBundle/Resources/config/redis.yml +++ b/src/Wallabag/ImportBundle/Resources/config/redis.yml | |||
@@ -20,6 +20,26 @@ services: | |||
20 | - "@wallabag_import.readability.import" | 20 | - "@wallabag_import.readability.import" |
21 | - "@logger" | 21 | - "@logger" |
22 | 22 | ||
23 | # instapaper | ||
24 | wallabag_import.queue.redis.instapaper: | ||
25 | class: Simpleue\Queue\RedisQueue | ||
26 | arguments: | ||
27 | - "@wallabag_core.redis.client" | ||
28 | - "wallabag.import.instapaper" | ||
29 | |||
30 | wallabag_import.producer.redis.instapaper: | ||
31 | class: Wallabag\ImportBundle\Redis\Producer | ||
32 | arguments: | ||
33 | - "@wallabag_import.queue.redis.instapaper" | ||
34 | |||
35 | wallabag_import.consumer.redis.instapaper: | ||
36 | class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer | ||
37 | arguments: | ||
38 | - "@doctrine.orm.entity_manager" | ||
39 | - "@wallabag_user.user_repository" | ||
40 | - "@wallabag_import.instapaper.import" | ||
41 | - "@logger" | ||
42 | |||
23 | 43 | ||
24 | wallabag_import.queue.redis.pocket: | 44 | wallabag_import.queue.redis.pocket: |
25 | class: Simpleue\Queue\RedisQueue | 45 | class: Simpleue\Queue\RedisQueue |
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml index 990f336d..89adc71b 100644 --- a/src/Wallabag/ImportBundle/Resources/config/services.yml +++ b/src/Wallabag/ImportBundle/Resources/config/services.yml | |||
@@ -57,6 +57,16 @@ services: | |||
57 | tags: | 57 | tags: |
58 | - { name: wallabag_import.import, alias: readability } | 58 | - { name: wallabag_import.import, alias: readability } |
59 | 59 | ||
60 | wallabag_import.instapaper.import: | ||
61 | class: Wallabag\ImportBundle\Import\InstapaperImport | ||
62 | arguments: | ||
63 | - "@doctrine.orm.entity_manager" | ||
64 | - "@wallabag_core.content_proxy" | ||
65 | calls: | ||
66 | - [ setLogger, [ "@logger" ]] | ||
67 | tags: | ||
68 | - { name: wallabag_import.import, alias: instapaper } | ||
69 | |||
60 | wallabag_import.firefox.import: | 70 | wallabag_import.firefox.import: |
61 | class: Wallabag\ImportBundle\Import\FirefoxImport | 71 | class: Wallabag\ImportBundle\Import\FirefoxImport |
62 | arguments: | 72 | arguments: |
diff --git a/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig new file mode 100644 index 00000000..5789361f --- /dev/null +++ b/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig | |||
@@ -0,0 +1,45 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'import.instapaper.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | <div class="row"> | ||
7 | <div class="col s12"> | ||
8 | <div class="card-panel settings"> | ||
9 | {% include 'WallabagImportBundle:Import:_workerEnabled.html.twig' %} | ||
10 | |||
11 | <div class="row"> | ||
12 | <blockquote>{{ import.description|trans }}</blockquote> | ||
13 | <p>{{ 'import.instapaper.how_to'|trans }}</p> | ||
14 | |||
15 | <div class="col s12"> | ||
16 | {{ form_start(form, {'method': 'POST'}) }} | ||
17 | {{ form_errors(form) }} | ||
18 | <div class="row"> | ||
19 | <div class="file-field input-field col s12"> | ||
20 | {{ form_errors(form.file) }} | ||
21 | <div class="btn"> | ||
22 | <span>{{ form.file.vars.label|trans }}</span> | ||
23 | {{ form_widget(form.file) }} | ||
24 | </div> | ||
25 | <div class="file-path-wrapper"> | ||
26 | <input class="file-path validate" type="text"> | ||
27 | </div> | ||
28 | </div> | ||
29 | <div class="input-field col s6 with-checkbox"> | ||
30 | <h6>{{ 'import.form.mark_as_read_title'|trans }}</h6> | ||
31 | {{ form_widget(form.mark_as_read) }} | ||
32 | {{ form_label(form.mark_as_read) }} | ||
33 | </div> | ||
34 | </div> | ||
35 | |||
36 | {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} | ||
37 | |||
38 | {{ form_rest(form) }} | ||
39 | </form> | ||
40 | </div> | ||
41 | </div> | ||
42 | </div> | ||
43 | </div> | ||
44 | </div> | ||
45 | {% endblock %} | ||