diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-11-08 14:19:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-08 14:19:40 +0100 |
commit | 41c2178685a93999a48842ab79b08091c0345c59 (patch) | |
tree | ac502376a00f25d46c86cd27a9a18f61ea30146d /src/Wallabag/ImportBundle/Resources | |
parent | 01ad4d6a89f52bdbf21ab2b14e3fe9291f2a9290 (diff) | |
parent | 82f9a5207888e0f1abbb5dda0e5f01c3589769b6 (diff) | |
download | wallabag-41c2178685a93999a48842ab79b08091c0345c59.tar.gz wallabag-41c2178685a93999a48842ab79b08091c0345c59.tar.zst wallabag-41c2178685a93999a48842ab79b08091c0345c59.zip |
Merge pull request #2548 from wallabag/pinboard
Add Pinboard import
Diffstat (limited to 'src/Wallabag/ImportBundle/Resources')
4 files changed, 85 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml index a5af5282..e9ecb846 100644 --- a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml +++ b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml | |||
@@ -24,6 +24,14 @@ services: | |||
24 | - "@wallabag_import.instapaper.import" | 24 | - "@wallabag_import.instapaper.import" |
25 | - "@event_dispatcher" | 25 | - "@event_dispatcher" |
26 | - "@logger" | 26 | - "@logger" |
27 | wallabag_import.consumer.amqp.pinboard: | ||
28 | class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer | ||
29 | arguments: | ||
30 | - "@doctrine.orm.entity_manager" | ||
31 | - "@wallabag_user.user_repository" | ||
32 | - "@wallabag_import.pinboard.import" | ||
33 | - "@event_dispatcher" | ||
34 | - "@logger" | ||
27 | wallabag_import.consumer.amqp.wallabag_v1: | 35 | wallabag_import.consumer.amqp.wallabag_v1: |
28 | class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer | 36 | class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer |
29 | arguments: | 37 | arguments: |
diff --git a/src/Wallabag/ImportBundle/Resources/config/redis.yml b/src/Wallabag/ImportBundle/Resources/config/redis.yml index 5ced4c83..091cdba0 100644 --- a/src/Wallabag/ImportBundle/Resources/config/redis.yml +++ b/src/Wallabag/ImportBundle/Resources/config/redis.yml | |||
@@ -42,6 +42,27 @@ services: | |||
42 | - "@event_dispatcher" | 42 | - "@event_dispatcher" |
43 | - "@logger" | 43 | - "@logger" |
44 | 44 | ||
45 | # pinboard | ||
46 | wallabag_import.queue.redis.pinboard: | ||
47 | class: Simpleue\Queue\RedisQueue | ||
48 | arguments: | ||
49 | - "@wallabag_core.redis.client" | ||
50 | - "wallabag.import.pinboard" | ||
51 | |||
52 | wallabag_import.producer.redis.pinboard: | ||
53 | class: Wallabag\ImportBundle\Redis\Producer | ||
54 | arguments: | ||
55 | - "@wallabag_import.queue.redis.pinboard" | ||
56 | |||
57 | wallabag_import.consumer.redis.pinboard: | ||
58 | class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer | ||
59 | arguments: | ||
60 | - "@doctrine.orm.entity_manager" | ||
61 | - "@wallabag_user.user_repository" | ||
62 | - "@wallabag_import.pinboard.import" | ||
63 | - "@event_dispatcher" | ||
64 | - "@logger" | ||
65 | |||
45 | 66 | ||
46 | wallabag_import.queue.redis.pocket: | 67 | wallabag_import.queue.redis.pocket: |
47 | class: Simpleue\Queue\RedisQueue | 68 | class: Simpleue\Queue\RedisQueue |
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml index 64822963..c4fe3f92 100644 --- a/src/Wallabag/ImportBundle/Resources/config/services.yml +++ b/src/Wallabag/ImportBundle/Resources/config/services.yml | |||
@@ -71,6 +71,17 @@ services: | |||
71 | tags: | 71 | tags: |
72 | - { name: wallabag_import.import, alias: instapaper } | 72 | - { name: wallabag_import.import, alias: instapaper } |
73 | 73 | ||
74 | wallabag_import.pinboard.import: | ||
75 | class: Wallabag\ImportBundle\Import\PinboardImport | ||
76 | arguments: | ||
77 | - "@doctrine.orm.entity_manager" | ||
78 | - "@wallabag_core.content_proxy" | ||
79 | - "@event_dispatcher" | ||
80 | calls: | ||
81 | - [ setLogger, [ "@logger" ]] | ||
82 | tags: | ||
83 | - { name: wallabag_import.import, alias: pinboard } | ||
84 | |||
74 | wallabag_import.firefox.import: | 85 | wallabag_import.firefox.import: |
75 | class: Wallabag\ImportBundle\Import\FirefoxImport | 86 | class: Wallabag\ImportBundle\Import\FirefoxImport |
76 | arguments: | 87 | arguments: |
diff --git a/src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig new file mode 100644 index 00000000..43f196ad --- /dev/null +++ b/src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig | |||
@@ -0,0 +1,45 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'import.pinboard.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:_information.html.twig' %} | ||
10 | |||
11 | <div class="row"> | ||
12 | <blockquote>{{ import.description|trans }}</blockquote> | ||
13 | <p>{{ 'import.pinboard.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 %} | ||