For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : Pour Firefox, ouvrez le panneau des marques-pages (Ctrl+Maj+O), puis dans « Importation et sauvegarde », choisissez « Sauvegarde... ». Vous allez récupérer un fichier .json.
Pour Google Chrome, la situation du fichier dépend de votre système d'exploitation : Pour Firefox, ouvrez le panneau des marques-pages (Ctrl+Maj+O), puis dans « Importation et sauvegarde », choisissez « Sauvegarde... ». Vous allez récupérer un fichier .json.
Pour Google Chrome, la situation du fichier dépend de votre système d'exploitation : For Firefox, go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system :
Date: Fri, 2 Sep 2016 15:21:07 +0200
Subject: Indentation and renamed fixtures file
---
src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | 6 +++---
src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | 6 +++---
src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | 6 +++---
src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | 6 +++---
src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | 6 +++---
src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | 6 +++---
src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | 6 +++---
src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | 6 +++---
src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | 6 +++---
9 files changed, 27 insertions(+), 27 deletions(-)
(limited to 'src')
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index f9f4a958..e1170b75 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -350,9 +350,9 @@ import:
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
# browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at ...
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # page_title: 'Import > Browser'
+ # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
# page_title: 'Developer'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index c1196be5..b066cd88 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -350,9 +350,9 @@ import:
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
# browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at ...
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # page_title: 'Import > Browser'
+ # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
page_title: 'Entwickler'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index 5ffeab07..429e5fed 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -350,9 +350,9 @@ import:
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
# browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at ...
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # page_title: 'Import > Browser'
+ # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
page_title: 'Promotor'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index fa2c3ca9..8ee6c135 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -350,9 +350,9 @@ import:
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
# browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at ...
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # page_title: 'Import > Browser'
+ # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
# page_title: 'Developer'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index 13731b51..dbf4517c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -349,9 +349,9 @@ import:
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
# browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched"
+ # page_title: 'Import > Browser'
+ # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched"
developer:
page_title: 'Sviluppatori'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index 596c764f..fa72dff4 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -350,9 +350,9 @@ import:
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
# browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at ...
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # page_title: 'Import > Browser'
+ # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
page_title: 'Desvolopador'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index bf0da022..a477ec67 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -350,9 +350,9 @@ import:
worker:
enabled: "Import jest wykonywany asynchronicznie. Od momentu rozpoczęcia importu, zewnętrzna usługa może zajmować się na raz tylko jednym zadaniem. Bieżącą usługą jest:"
# browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at ...
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # page_title: 'Import > Browser'
+ # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
page_title: 'Deweloper'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index 928589cb..5d848c2e 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -350,9 +350,9 @@ import:
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
# browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at ...
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # page_title: 'Import > Browser'
+ # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
# page_title: 'Developer'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 723b1edb..41d169d1 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -350,9 +350,9 @@ import:
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
# browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at ...
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # page_title: 'Import > Browser'
+ # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
# page_title: 'Developer'
--
cgit v1.2.3
From 59201088b4fc13fd361238396f630dabd9bd1990 Mon Sep 17 00:00:00 2001
From: Thomas Citharel
Date: Wed, 21 Sep 2016 17:47:47 +0200
Subject: bring chrome and firefox as separate imports
---
.../Resources/translations/messages.da.yml | 12 +-
.../Resources/translations/messages.de.yml | 12 +-
.../Resources/translations/messages.en.yml | 10 +-
.../Resources/translations/messages.es.yml | 12 +-
.../Resources/translations/messages.fa.yml | 12 +-
.../Resources/translations/messages.fr.yml | 10 +-
.../Resources/translations/messages.it.yml | 12 +-
.../Resources/translations/messages.oc.yml | 12 +-
.../Resources/translations/messages.pl.yml | 12 +-
.../Resources/translations/messages.ro.yml | 12 +-
.../Resources/translations/messages.tr.yml | 12 +-
.../ImportBundle/Command/ImportCommand.php | 9 +-
.../ImportBundle/Controller/BrowserController.php | 23 +-
.../ImportBundle/Controller/ChromeController.php | 41 ++++
.../ImportBundle/Controller/FirefoxController.php | 41 ++++
src/Wallabag/ImportBundle/Import/BrowserImport.php | 247 ++++++++++-----------
src/Wallabag/ImportBundle/Import/ChromeImport.php | 71 ++++++
src/Wallabag/ImportBundle/Import/FirefoxImport.php | 71 ++++++
.../ImportBundle/Resources/config/rabbit.yml | 14 ++
.../ImportBundle/Resources/config/redis.yml | 40 ++++
.../ImportBundle/Resources/config/services.yml | 15 +-
.../Resources/views/Browser/index.html.twig | 43 ----
.../Resources/views/Chrome/index.html.twig | 43 ++++
.../Resources/views/Firefox/index.html.twig | 43 ++++
24 files changed, 599 insertions(+), 230 deletions(-)
create mode 100644 src/Wallabag/ImportBundle/Controller/ChromeController.php
create mode 100644 src/Wallabag/ImportBundle/Controller/FirefoxController.php
create mode 100644 src/Wallabag/ImportBundle/Import/ChromeImport.php
create mode 100644 src/Wallabag/ImportBundle/Import/FirefoxImport.php
delete mode 100644 src/Wallabag/ImportBundle/Resources/views/Browser/index.html.twig
create mode 100644 src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig
create mode 100644 src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig
(limited to 'src')
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index e1170b75..9eeb210b 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -349,10 +349,14 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
- # browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # firefox:
+ # page_title: 'Import > Firefox'
+ # description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ #chrome:
+ # page_title: 'Import > Chrome'
+ # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
# page_title: 'Developer'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index b066cd88..a9ec2519 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -349,10 +349,14 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
- # browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # firefox:
+ # page_title: 'Import > Firefox'
+ # description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # chrome:
+ # page_title: 'Import > Chrome'
+ # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
page_title: 'Entwickler'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index afc28776..c0d8656d 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -349,9 +349,13 @@ import:
how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
- browser:
- page_title: 'Import > Browser'
- description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ firefox:
+ page_title: 'Import > Firefox'
+ description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ chrome:
+ page_title: 'Import > Chrome'
+ description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index 429e5fed..1d6993db 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -349,10 +349,14 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
- # browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # firefox:
+ # page_title: 'Import > Firefox'
+ # description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # chrome:
+ # page_title: 'Import > Chrome'
+ # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
page_title: 'Promotor'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index 8ee6c135..68272f99 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -349,10 +349,14 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
- # browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # firefox:
+ # page_title: 'Import > Firefox'
+ # description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # chrome:
+ # page_title: 'Import > Chrome'
+ # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
# page_title: 'Developer'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 5af03e61..b28068b6 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -349,9 +349,13 @@ import:
how_to: "Choisissez le fichier de votre export Readability et cliquez sur le bouton ci-dessous pour l'importer."
worker:
enabled: "Les imports sont asynchrones. Une fois l'import commencé un worker externe traitera les messages un par un. Le service activé est :"
- browser:
- page_title: 'Import > Navigateur'
- description: "Cet outil va vous permettre d'importer tous vos marques-pages de Firefox ou de Google Chrome/Chromium. Pour Firefox, ouvrez le panneau des marques-pages (Ctrl+Maj+O), puis dans « Importation et sauvegarde », choisissez « Sauvegarde... ». Vous allez récupérer un fichier .json.
Pour Google Chrome, la situation du fichier dépend de votre système d'exploitation : - Sur GNU/Linux, allez dans le répertoire
~/.config/google-chrome/Default/
- Sous Windows, il devrait se trouver à
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- Sur OS X, il devrait se trouver dans le fichier
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Une fois que vous y êtes, copiez le fichier Bookmarks à un endroit où vous le retrouverez.
Notez que si vous utilisez Chromium à la place de Chrome, vous devez corriger les chemins en conséquence."
+ firefox:
+ page_title: 'Import > Firefox'
+ description: "Cet outil va vous permettre d'importer tous vos marques-pages de Firefox. Pour Firefox, ouvrez le panneau des marques-pages (Ctrl+Maj+O), puis dans « Importation et sauvegarde », choisissez « Sauvegarde... ». Vous allez récupérer un fichier .json.
"
+ how_to: "Choisissez le fichier de sauvegarde de vos marques-page et cliquez sur le bouton pour l'importer. Soyez avertis que le processus peut prendre un temps assez long car tous les articles doivent être récupérés en ligne."
+ chrome:
+ page_title: 'Import > Chrome'
+ description: "Cet outil va vous permettre d'importer tous vos marques-pages de Google Chrome/Chromium. Pour Google Chrome, la situation du fichier dépend de votre système d'exploitation : - Sur GNU/Linux, allez dans le répertoire
~/.config/google-chrome/Default/
- Sous Windows, il devrait se trouver à
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- Sur OS X, il devrait se trouver dans le fichier
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Une fois que vous y êtes, copiez le fichier Bookmarks à un endroit où vous le retrouverez.
Notez que si vous utilisez Chromium à la place de Chrome, vous devez corriger les chemins en conséquence."
how_to: "Choisissez le fichier de sauvegarde de vos marques-page et cliquez sur le bouton pour l'importer. Soyez avertis que le processus peut prendre un temps assez long car tous les articles doivent être récupérés en ligne."
developer:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index dbf4517c..bd98c8c0 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -348,10 +348,14 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
- # browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched"
+ # firefox:
+ # page_title: 'Import > Firefox'
+ # description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # chrome:
+ # page_title: 'Import > Chrome'
+ # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
page_title: 'Sviluppatori'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index fa72dff4..6da9ff18 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -349,10 +349,14 @@ import:
how_to: "Mercés de seleccionar vòstre Readability fichièr e de clicar sul boton dejós per lo telecargar e l'importar."
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
- # browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # firefox:
+ # page_title: 'Import > Firefox'
+ # description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # chrome:
+ # page_title: 'Import > Chrome'
+ # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
page_title: 'Desvolopador'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index a477ec67..daa34bc0 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -349,10 +349,14 @@ import:
how_to: 'Wybierz swój plik eksportu z Readability i kliknij poniższy przycisk, aby go załadować.'
worker:
enabled: "Import jest wykonywany asynchronicznie. Od momentu rozpoczęcia importu, zewnętrzna usługa może zajmować się na raz tylko jednym zadaniem. Bieżącą usługą jest:"
- # browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # firefox:
+ # page_title: 'Import > Firefox'
+ # description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # chrome:
+ # page_title: 'Import > Chrome'
+ # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
page_title: 'Deweloper'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index 5d848c2e..067f7878 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -349,10 +349,14 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
- # browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # firefox:
+ # page_title: 'Import > Firefox'
+ # description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # chrome:
+ # page_title: 'Import > Chrome'
+ # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
# page_title: 'Developer'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 41d169d1..62c69510 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -349,10 +349,14 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
- # browser:
- # page_title: 'Import > Browser'
- # description: "This importer will import all your Firefox or Chrome bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file.
For Chrome, the location of the file depends on your operating system : - On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
- # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # firefox:
+ # page_title: 'Import > Firefox'
+ # description: "This importer will import all your Firefox bookmarks. For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
+ # chrome:
+ # page_title: 'Import > Chrome'
+ # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system :
- On Linux, go into the
~/.config/chromium/Default/
directory - On Windows, it should be at
%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default
- On OS X, it should be at
~/Library/Application Support/Google/Chrome/Default/Bookmarks
Once you got there, copy the Bookmarks file someplace you'll find.
Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly."
+ # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
developer:
# page_title: 'Developer'
diff --git a/src/Wallabag/ImportBundle/Command/ImportCommand.php b/src/Wallabag/ImportBundle/Command/ImportCommand.php
index ac3d1d92..1df38295 100644
--- a/src/Wallabag/ImportBundle/Command/ImportCommand.php
+++ b/src/Wallabag/ImportBundle/Command/ImportCommand.php
@@ -17,7 +17,7 @@ class ImportCommand extends ContainerAwareCommand
->setDescription('Import entries from a JSON export from a wallabag v1 instance')
->addArgument('userId', InputArgument::REQUIRED, 'User ID to populate')
->addArgument('filepath', InputArgument::REQUIRED, 'Path to the JSON file')
- ->addOption('importer', null, InputArgument::OPTIONAL, 'The importer to use: wallabag v1, v2 or browser', 'v1')
+ ->addOption('importer', null, InputArgument::OPTIONAL, 'The importer to use: wallabag v1, v2, firefox or chrome', 'v1')
->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read', false)
;
}
@@ -44,8 +44,11 @@ class ImportCommand extends ContainerAwareCommand
case 'v2':
$wallabag = $this->getContainer()->get('wallabag_import.wallabag_v2.import');
break;
- case 'browser':
- $wallabag = $this->getContainer()->get('wallabag_import.browser.import');
+ case 'firefox':
+ $wallabag = $this->getContainer()->get('wallabag_import.firefox.import');
+ break;
+ case 'chrome':
+ $wallabag = $this->getContainer()->get('wallabag_import.chrome.import');
break;
case 'v1':
default:
diff --git a/src/Wallabag/ImportBundle/Controller/BrowserController.php b/src/Wallabag/ImportBundle/Controller/BrowserController.php
index 3b54a72e..144a4880 100644
--- a/src/Wallabag/ImportBundle/Controller/BrowserController.php
+++ b/src/Wallabag/ImportBundle/Controller/BrowserController.php
@@ -8,27 +8,21 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Wallabag\ImportBundle\Form\Type\UploadImportType;
-class BrowserController extends Controller
+abstract class BrowserController extends Controller
{
/**
* Return the service to handle the import.
*
* @return \Wallabag\ImportBundle\Import\ImportInterface
*/
- protected function getImportService()
- {
- return $this->get('wallabag_import.browser.import');
- }
+ abstract protected function getImportService();
/**
* Return the template used for the form.
*
* @return string
*/
- protected function getImportTemplate()
- {
- return 'WallabagImportBundle:Browser:index.html.twig';
- }
+ abstract protected function getImportTemplate();
/**
* @Route("/browser", name="import_browser")
@@ -43,15 +37,15 @@ class BrowserController extends Controller
$form->handleRequest($request);
$wallabag = $this->getImportService();
+ $wallabag->setUser($this->getUser());
if ($form->isValid()) {
$file = $form->get('file')->getData();
$markAsRead = $form->get('mark_as_read')->getData();
$name = $this->getUser()->getId().'.json';
- if (in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes')) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) {
+ if (null !== $file && in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes')) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) {
$res = $wallabag
- ->setUser($this->getUser())
->setFilepath($this->getParameter('wallabag_import.resource_dir').'/'.$name)
->setMarkAsRead($markAsRead)
->import();
@@ -60,12 +54,17 @@ class BrowserController extends Controller
if (true === $res) {
$summary = $wallabag->getSummary();
- // TODO : Pluralize these messages
$message = $this->get('translator')->trans('flashes.import.notice.summary', [
'%imported%' => $summary['imported'],
'%skipped%' => $summary['skipped'],
]);
+ if (0 < $summary['queued']) {
+ $message = $this->get('translator')->trans('flashes.import.notice.summary_with_queue', [
+ '%queued%' => $summary['queued'],
+ ]);
+ }
+
unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name);
}
diff --git a/src/Wallabag/ImportBundle/Controller/ChromeController.php b/src/Wallabag/ImportBundle/Controller/ChromeController.php
new file mode 100644
index 00000000..e4cc322a
--- /dev/null
+++ b/src/Wallabag/ImportBundle/Controller/ChromeController.php
@@ -0,0 +1,41 @@
+get('wallabag_import.chrome.import');
+
+ if ($this->get('craue_config')->get('import_with_rabbitmq')) {
+ $service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer'));
+ } elseif ($this->get('craue_config')->get('import_with_redis')) {
+ $service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v1'));
+ }
+
+ return $service;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getImportTemplate()
+ {
+ return 'WallabagImportBundle:Chrome:index.html.twig';
+ }
+
+ /**
+ * @Route("/chrome", name="import_chrome")
+ */
+ public function indexAction(Request $request)
+ {
+ return parent::indexAction($request);
+ }
+}
diff --git a/src/Wallabag/ImportBundle/Controller/FirefoxController.php b/src/Wallabag/ImportBundle/Controller/FirefoxController.php
new file mode 100644
index 00000000..e0dd8214
--- /dev/null
+++ b/src/Wallabag/ImportBundle/Controller/FirefoxController.php
@@ -0,0 +1,41 @@
+get('wallabag_import.firefox.import');
+
+ if ($this->get('craue_config')->get('import_with_rabbitmq')) {
+ $service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer'));
+ } elseif ($this->get('craue_config')->get('import_with_redis')) {
+ $service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v1'));
+ }
+
+ return $service;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getImportTemplate()
+ {
+ return 'WallabagImportBundle:Firefox:index.html.twig';
+ }
+
+ /**
+ * @Route("/firefox", name="import_firefox")
+ */
+ public function indexAction(Request $request)
+ {
+ return parent::indexAction($request);
+ }
+}
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index e3457196..ef7d6d95 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -9,69 +9,24 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
-class BrowserImport implements ImportInterface
+abstract class BrowserImport extends AbstractImport
{
- protected $user;
- protected $em;
- protected $logger;
- protected $contentProxy;
- protected $skippedEntries = 0;
- protected $importedEntries = 0;
- protected $totalEntries = 0;
protected $filepath;
- protected $markAsRead;
- private $nbEntries;
-
- public function __construct(EntityManager $em, ContentProxy $contentProxy)
- {
- $this->em = $em;
- $this->logger = new NullLogger();
- $this->contentProxy = $contentProxy;
- }
-
- public function setLogger(LoggerInterface $logger)
- {
- $this->logger = $logger;
- }
-
- /**
- * We define the user in a custom call because on the import command there is no logged in user.
- * So we can't retrieve user from the `security.token_storage` service.
- *
- * @param User $user
- *
- * @return $this
- */
- public function setUser(User $user)
- {
- $this->user = $user;
-
- return $this;
- }
/**
* {@inheritdoc}
*/
- public function getName()
- {
- return 'Firefox & Google Chrome';
- }
+ abstract public function getName();
/**
* {@inheritdoc}
*/
- public function getUrl()
- {
- return 'import_browser';
- }
+ abstract public function getUrl();
/**
* {@inheritdoc}
*/
- public function getDescription()
- {
- return 'import.browser.description';
- }
+ abstract public function getDescription();
/**
* {@inheritdoc}
@@ -96,124 +51,162 @@ class BrowserImport implements ImportInterface
return false;
}
- $this->nbEntries = 1;
+ if ($this->producer) {
+ $this->parseEntriesForProducer($data);
+
+ return true;
+ }
+
$this->parseEntries($data);
- $this->em->flush();
return true;
}
- private function parseEntries($data)
+ /**
+ * Set file path to the json file.
+ *
+ * @param string $filepath
+ */
+ public function setFilepath($filepath)
+ {
+ $this->filepath = $filepath;
+
+ return $this;
+ }
+
+ /**
+ * Parse and insert all given entries.
+ *
+ * @param $entries
+ */
+ protected function parseEntries($entries)
{
- foreach ($data as $importedEntry) {
- $this->parseEntry($importedEntry);
+ $i = 1;
+
+ foreach ($entries as $importedEntry) {
+ if ((array) $importedEntry !== $importedEntry) {
+ continue;
+ }
+
+ $entry = $this->parseEntry($importedEntry);
+
+ if (null === $entry) {
+ continue;
+ }
+
+ // flush every 20 entries
+ if (($i % 20) === 0) {
+ $this->em->flush();
+
+ // clear only affected entities
+ $this->em->clear(Entry::class);
+ $this->em->clear(Tag::class);
+ }
+ ++$i;
}
- $this->totalEntries += count($data);
+
+ $this->em->flush();
}
- private function parseEntry($importedEntry)
+ /**
+ * Parse entries and send them to the queue.
+ * It should just be a simple loop on all item, no call to the database should be done
+ * to speedup queuing.
+ *
+ * Faster parse entries for Producer.
+ * We don't care to make check at this time. They'll be done by the consumer.
+ *
+ * @param array $entries
+ */
+ protected function parseEntriesForProducer(array $entries)
{
- if (!is_array($importedEntry)) {
- return;
+ foreach ($entries as $importedEntry) {
+
+ if ((array) $importedEntry !== $importedEntry) {
+ continue;
+ }
+
+ // set userId for the producer (it won't know which user is connected)
+ $importedEntry['userId'] = $this->user->getId();
+
+ if ($this->markAsRead) {
+ $importedEntry = $this->setEntryAsRead($importedEntry);
+ }
+
+ ++$this->queuedEntries;
+
+ $this->producer->publish(json_encode($importedEntry));
}
+ }
- /* Firefox uses guid while Chrome uses id */
+ /**
+ * {@inheritdoc}
+ */
+ public function parseEntry(array $importedEntry)
+ {
if ((!key_exists('guid', $importedEntry) || (!key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) {
$this->parseEntries($importedEntry);
-
return;
}
+
if (key_exists('children', $importedEntry)) {
$this->parseEntries($importedEntry['children']);
-
return;
}
- if (key_exists('uri', $importedEntry) || key_exists('url', $importedEntry)) {
-
- /* Firefox uses uri while Chrome uses url */
- $firefox = key_exists('uri', $importedEntry);
-
- $existingEntry = $this->em
- ->getRepository('WallabagCoreBundle:Entry')
- ->findByUrlAndUserId(($firefox) ? $importedEntry['uri'] : $importedEntry['url'], $this->user->getId());
-
- if (false !== $existingEntry) {
- ++$this->skippedEntries;
+ if (!key_exists('uri', $importedEntry) && !key_exists('url', $importedEntry)) {
+ return;
+ }
- return;
- }
+ $firefox = key_exists('uri', $importedEntry);
- if (false === parse_url(($firefox) ? $importedEntry['uri'] : $importedEntry['url']) || false === filter_var(($firefox) ? $importedEntry['uri'] : $importedEntry['url'], FILTER_VALIDATE_URL)) {
- $this->logger->warning('Imported URL '.($firefox) ? $importedEntry['uri'] : $importedEntry['url'].' is not valid');
- ++$this->skippedEntries;
+ $existingEntry = $this->em
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findByUrlAndUserId(($firefox) ? $importedEntry['uri'] : $importedEntry['url'], $this->user->getId());
- return;
- }
+ if (false !== $existingEntry) {
+ ++$this->skippedEntries;
- try {
- $entry = $this->contentProxy->updateEntry(
- new Entry($this->user),
- ($firefox) ? $importedEntry['uri'] : $importedEntry['url']
- );
- } catch (\Exception $e) {
- $this->logger->warning('Error while saving '.($firefox) ? $importedEntry['uri'] : $importedEntry['url']);
- ++$this->skippedEntries;
+ return;
+ }
- return;
- }
+ $data = $this->prepareEntry($importedEntry);
- $entry->setArchived($this->markAsRead);
+ $entry = new Entry($this->user);
+ $entry->setUrl($data['url']);
+ $entry->setTitle($data['title']);
- $this->em->persist($entry);
- ++$this->importedEntries;
+ // update entry with content (in case fetching failed, the given entry will be return)
+ $entry = $this->fetchContent($entry, $data['url'], $data);
- // flush every 20 entries
- if (($this->nbEntries % 20) === 0) {
- $this->em->flush();
- $this->em->clear($entry);
- }
- ++$this->nbEntries;
+ if (array_key_exists('tags', $data)) {
+ $this->contentProxy->assignTagsToEntry(
+ $entry,
+ $data['tags']
+ );
}
- }
- /**
- * Set whether articles must be all marked as read.
- *
- * @param bool $markAsRead
- *
- * @return $this
- */
- public function setMarkAsRead($markAsRead)
- {
- $this->markAsRead = $markAsRead;
+ $entry->setArchived($data['is_archived']);
- return $this;
- }
+ if (!empty($data['created_at'])) {
+ $dt = new \DateTime();
+ $entry->setCreatedAt($dt->setTimestamp($data['created_at']/1000));
+ }
- /**
- * Set file path to the json file.
- *
- * @param string $filepath
- *
- * @return $this
- */
- public function setFilepath($filepath)
- {
- $this->filepath = $filepath;
+ $this->em->persist($entry);
+ ++$this->importedEntries;
- return $this;
+ return $entry;
}
/**
* {@inheritdoc}
*/
- public function getSummary()
+ protected function setEntryAsRead(array $importedEntry)
{
- return [
- 'skipped' => $this->skippedEntries,
- 'imported' => $this->importedEntries,
- ];
+ $importedEntry['is_archived'] = 1;
+
+ return $importedEntry;
}
}
diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php
new file mode 100644
index 00000000..7936ee2f
--- /dev/null
+++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php
@@ -0,0 +1,71 @@
+ $entry['name'],
+ 'html' => '',
+ 'url' => $entry['url'],
+ 'is_archived' => $this->markAsRead,
+ 'tags' => '',
+ 'created_at' => $entry['date_added'],
+ ];
+
+ if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+ $data['tags'] = $entry['tags'];
+ }
+
+ return $data;
+ }
+
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function setEntryAsRead(array $importedEntry)
+ {
+ $importedEntry['is_archived'] = 1;
+
+ return $importedEntry;
+ }
+}
diff --git a/src/Wallabag/ImportBundle/Import/FirefoxImport.php b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
new file mode 100644
index 00000000..cbf10b87
--- /dev/null
+++ b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
@@ -0,0 +1,71 @@
+ $entry['name'],
+ 'html' => '',
+ 'url' => $entry['url'],
+ 'is_archived' => $this->markAsRead,
+ 'tags' => '',
+ 'created_at' => $entry['date_added'],
+ ];
+
+ if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+ $data['tags'] = $entry['tags'];
+ }
+
+ return $data;
+ }
+
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function setEntryAsRead(array $importedEntry)
+ {
+ $importedEntry['is_archived'] = 1;
+
+ return $importedEntry;
+ }
+}
diff --git a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml
index aa049749..6ada6302 100644
--- a/src/Wallabag/ImportBundle/Resources/config/rabbit.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/rabbit.yml
@@ -28,3 +28,17 @@ services:
- "@wallabag_user.user_repository"
- "@wallabag_import.wallabag_v2.import"
- "@logger"
+ wallabag_import.consumer.amqp.firefox:
+ class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
+ arguments:
+ - "@doctrine.orm.entity_manager"
+ - "@wallabag_user.user_repository"
+ - "@wallabag_import.firefox.import"
+ - "@logger"
+ wallabag_import.consumer.amqp.chrome:
+ class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
+ arguments:
+ - "@doctrine.orm.entity_manager"
+ - "@wallabag_user.user_repository"
+ - "@wallabag_import.chrome.import"
+ - "@logger"
diff --git a/src/Wallabag/ImportBundle/Resources/config/redis.yml b/src/Wallabag/ImportBundle/Resources/config/redis.yml
index 7d3248e5..c47778b8 100644
--- a/src/Wallabag/ImportBundle/Resources/config/redis.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/redis.yml
@@ -79,3 +79,43 @@ services:
- "@wallabag_user.user_repository"
- "@wallabag_import.wallabag_v2.import"
- "@logger"
+
+ # firefox
+ wallabag_import.queue.redis.firefox:
+ class: Simpleue\Queue\RedisQueue
+ arguments:
+ - "@wallabag_core.redis.client"
+ - "wallabag.import.firefox"
+
+ wallabag_import.producer.redis.firefox:
+ class: Wallabag\ImportBundle\Redis\Producer
+ arguments:
+ - "@wallabag_import.queue.redis.firefox"
+
+ wallabag_import.consumer.redis.firefox:
+ class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
+ arguments:
+ - "@doctrine.orm.entity_manager"
+ - "@wallabag_user.user_repository"
+ - "@wallabag_import.firefox.import"
+ - "@logger"
+
+ # chrome
+ wallabag_import.queue.redis.chrome:
+ class: Simpleue\Queue\RedisQueue
+ arguments:
+ - "@wallabag_core.redis.client"
+ - "wallabag.import.chrome"
+
+ wallabag_import.producer.redis.firefox:
+ class: Wallabag\ImportBundle\Redis\Producer
+ arguments:
+ - "@wallabag_import.queue.redis.chrome"
+
+ wallabag_import.consumer.redis.firefox:
+ class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
+ arguments:
+ - "@doctrine.orm.entity_manager"
+ - "@wallabag_user.user_repository"
+ - "@wallabag_import.chrome.import"
+ - "@logger"
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml
index d8be5c28..990f336d 100644
--- a/src/Wallabag/ImportBundle/Resources/config/services.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/services.yml
@@ -57,12 +57,21 @@ services:
tags:
- { name: wallabag_import.import, alias: readability }
- wallabag_import.browser.import:
- class: Wallabag\ImportBundle\Import\BrowserImport
+ wallabag_import.firefox.import:
+ class: Wallabag\ImportBundle\Import\FirefoxImport
arguments:
- "@doctrine.orm.entity_manager"
- "@wallabag_core.content_proxy"
calls:
- [ setLogger, [ "@logger" ]]
tags:
- - { name: wallabag_import.import, alias: browser }
+ - { name: wallabag_import.import, alias: firefox }
+ wallabag_import.chrome.import:
+ class: Wallabag\ImportBundle\Import\ChromeImport
+ arguments:
+ - "@doctrine.orm.entity_manager"
+ - "@wallabag_core.content_proxy"
+ calls:
+ - [ setLogger, [ "@logger" ]]
+ tags:
+ - { name: wallabag_import.import, alias: chrome }
diff --git a/src/Wallabag/ImportBundle/Resources/views/Browser/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Browser/index.html.twig
deleted file mode 100644
index bfc74e9d..00000000
--- a/src/Wallabag/ImportBundle/Resources/views/Browser/index.html.twig
+++ /dev/null
@@ -1,43 +0,0 @@
-{% extends "WallabagCoreBundle::layout.html.twig" %}
-
-{% block title %}{{ 'import.browser.page_title'|trans }}{% endblock %}
-
-{% block content %}
-
-
-
-
-
{{ import.description|trans|raw }}
-
{{ 'import.browser.how_to'|trans }}
-
-
- {{ form_start(form, {'method': 'POST'}) }}
- {{ form_errors(form) }}
-
-
-
-
{{ 'import.form.mark_as_read_title'|trans }}
- {{ form_widget(form.mark_as_read) }}
- {{ form_label(form.mark_as_read) }}
-
-
-
- {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }}
-
- {{ form_rest(form) }}
-
-
-
-
-
-
-{% endblock %}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig
new file mode 100644
index 00000000..ead828c6
--- /dev/null
+++ b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig
@@ -0,0 +1,43 @@
+{% extends "WallabagCoreBundle::layout.html.twig" %}
+
+{% block title %}{{ 'import.chrome.page_title'|trans }}{% endblock %}
+
+{% block content %}
+
+
+
+
+
{{ import.description|trans|raw }}
+
{{ 'import.chrome.how_to'|trans }}
+
+
+ {{ form_start(form, {'method': 'POST'}) }}
+ {{ form_errors(form) }}
+
+
+
+
{{ 'import.form.mark_as_read_title'|trans }}
+ {{ form_widget(form.mark_as_read) }}
+ {{ form_label(form.mark_as_read) }}
+
+
+
+ {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }}
+
+ {{ form_rest(form) }}
+
+
+
+
+
+
+{% endblock %}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig
new file mode 100644
index 00000000..f975da3f
--- /dev/null
+++ b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig
@@ -0,0 +1,43 @@
+{% extends "WallabagCoreBundle::layout.html.twig" %}
+
+{% block title %}{{ 'import.firefox.page_title'|trans }}{% endblock %}
+
+{% block content %}
+
+
+
+
+
{{ import.description|trans|raw }}
+
{{ 'import.firefox.how_to'|trans }}
+
+
+ {{ form_start(form, {'method': 'POST'}) }}
+ {{ form_errors(form) }}
+
+
+
+
{{ 'import.form.mark_as_read_title'|trans }}
+ {{ form_widget(form.mark_as_read) }}
+ {{ form_label(form.mark_as_read) }}
+
+
+
+ {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }}
+
+ {{ form_rest(form) }}
+
+
+
+
+
+
+{% endblock %}
--
cgit v1.2.3
From 2c61db30b737685ae9102ec10f2371778fb13f1a Mon Sep 17 00:00:00 2001
From: Thomas Citharel
Date: Wed, 21 Sep 2016 18:00:08 +0200
Subject: cs & fixes
---
.../ImportBundle/Controller/ChromeController.php | 4 ++--
.../ImportBundle/Controller/FirefoxController.php | 4 ++--
src/Wallabag/ImportBundle/Import/BrowserImport.php | 9 +++------
src/Wallabag/ImportBundle/Import/ChromeImport.php | 10 +---------
src/Wallabag/ImportBundle/Import/FirefoxImport.php | 20 ++++++--------------
5 files changed, 14 insertions(+), 33 deletions(-)
(limited to 'src')
diff --git a/src/Wallabag/ImportBundle/Controller/ChromeController.php b/src/Wallabag/ImportBundle/Controller/ChromeController.php
index e4cc322a..454f3347 100644
--- a/src/Wallabag/ImportBundle/Controller/ChromeController.php
+++ b/src/Wallabag/ImportBundle/Controller/ChromeController.php
@@ -15,9 +15,9 @@ class ChromeController extends BrowserController
$service = $this->get('wallabag_import.chrome.import');
if ($this->get('craue_config')->get('import_with_rabbitmq')) {
- $service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer'));
+ $service->setProducer($this->get('old_sound_rabbit_mq.import_chrome_producer'));
} elseif ($this->get('craue_config')->get('import_with_redis')) {
- $service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v1'));
+ $service->setProducer($this->get('wallabag_import.producer.redis.chrome'));
}
return $service;
diff --git a/src/Wallabag/ImportBundle/Controller/FirefoxController.php b/src/Wallabag/ImportBundle/Controller/FirefoxController.php
index e0dd8214..c329b9c4 100644
--- a/src/Wallabag/ImportBundle/Controller/FirefoxController.php
+++ b/src/Wallabag/ImportBundle/Controller/FirefoxController.php
@@ -15,9 +15,9 @@ class FirefoxController extends BrowserController
$service = $this->get('wallabag_import.firefox.import');
if ($this->get('craue_config')->get('import_with_rabbitmq')) {
- $service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer'));
+ $service->setProducer($this->get('old_sound_rabbit_mq.import_firefox_producer'));
} elseif ($this->get('craue_config')->get('import_with_redis')) {
- $service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v1'));
+ $service->setProducer($this->get('wallabag_import.producer.redis.firefox'));
}
return $service;
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index ef7d6d95..3e1cb12b 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -2,9 +2,6 @@
namespace Wallabag\ImportBundle\Import;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Doctrine\ORM\EntityManager;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
@@ -121,7 +118,6 @@ abstract class BrowserImport extends AbstractImport
protected function parseEntriesForProducer(array $entries)
{
foreach ($entries as $importedEntry) {
-
if ((array) $importedEntry !== $importedEntry) {
continue;
}
@@ -144,14 +140,15 @@ abstract class BrowserImport extends AbstractImport
*/
public function parseEntry(array $importedEntry)
{
-
if ((!key_exists('guid', $importedEntry) || (!key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) {
$this->parseEntries($importedEntry);
+
return;
}
if (key_exists('children', $importedEntry)) {
$this->parseEntries($importedEntry['children']);
+
return;
}
@@ -191,7 +188,7 @@ abstract class BrowserImport extends AbstractImport
if (!empty($data['created_at'])) {
$dt = new \DateTime();
- $entry->setCreatedAt($dt->setTimestamp($data['created_at']/1000));
+ $entry->setCreatedAt($dt->setTimestamp($data['created_at'] / 1000));
}
$this->em->persist($entry);
diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php
index 7936ee2f..941d68d3 100644
--- a/src/Wallabag/ImportBundle/Import/ChromeImport.php
+++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php
@@ -2,13 +2,6 @@
namespace Wallabag\ImportBundle\Import;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Doctrine\ORM\EntityManager;
-use Wallabag\CoreBundle\Entity\Entry;
-use Wallabag\UserBundle\Entity\User;
-use Wallabag\CoreBundle\Helper\ContentProxy;
-
class ChromeImport extends BrowserImport
{
protected $filepath;
@@ -37,7 +30,7 @@ class ChromeImport extends BrowserImport
return 'import.chrome.description';
}
- /**
+ /**
* {@inheritdoc}
*/
protected function prepareEntry($entry = [])
@@ -58,7 +51,6 @@ class ChromeImport extends BrowserImport
return $data;
}
-
/**
* {@inheritdoc}
*/
diff --git a/src/Wallabag/ImportBundle/Import/FirefoxImport.php b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
index cbf10b87..351cbef1 100644
--- a/src/Wallabag/ImportBundle/Import/FirefoxImport.php
+++ b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
@@ -2,13 +2,6 @@
namespace Wallabag\ImportBundle\Import;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Doctrine\ORM\EntityManager;
-use Wallabag\CoreBundle\Entity\Entry;
-use Wallabag\UserBundle\Entity\User;
-use Wallabag\CoreBundle\Helper\ContentProxy;
-
class FirefoxImport extends BrowserImport
{
protected $filepath;
@@ -42,7 +35,7 @@ class FirefoxImport extends BrowserImport
*/
protected function prepareEntry($entry = [])
{
- $data = [
+ $data = [
'title' => $entry['name'],
'html' => '',
'url' => $entry['url'],
@@ -51,13 +44,12 @@ class FirefoxImport extends BrowserImport
'created_at' => $entry['date_added'],
];
- if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
- $data['tags'] = $entry['tags'];
- }
-
- return $data;
- }
+ if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+ $data['tags'] = $entry['tags'];
+ }
+ return $data;
+ }
/**
* {@inheritdoc}
--
cgit v1.2.3
From 64b1229b2d711e6b2f0e60de482802d9e86b912f Mon Sep 17 00:00:00 2001
From: Thomas Citharel
Date: Wed, 21 Sep 2016 19:24:19 +0200
Subject: fix tests
---
src/Wallabag/ImportBundle/Import/BrowserImport.php | 4 +--
src/Wallabag/ImportBundle/Import/ChromeImport.php | 40 +++++++++++-----------
.../ImportBundle/Resources/config/redis.yml | 4 +--
3 files changed, 24 insertions(+), 24 deletions(-)
(limited to 'src')
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index 3e1cb12b..198e148e 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -31,13 +31,13 @@ abstract class BrowserImport extends AbstractImport
public function import()
{
if (!$this->user) {
- $this->logger->error('WallabagImport: user is not defined');
+ $this->logger->error('Wallabag Browser Import: user is not defined');
return false;
}
if (!file_exists($this->filepath) || !is_readable($this->filepath)) {
- $this->logger->error('WallabagImport: unable to read file', ['filepath' => $this->filepath]);
+ $this->logger->error('Wallabag Browser Import: unable to read file', ['filepath' => $this->filepath]);
return false;
}
diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php
index 941d68d3..1af7cc87 100644
--- a/src/Wallabag/ImportBundle/Import/ChromeImport.php
+++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php
@@ -30,26 +30,26 @@ class ChromeImport extends BrowserImport
return 'import.chrome.description';
}
- /**
- * {@inheritdoc}
- */
- protected function prepareEntry($entry = [])
- {
- $data = [
- 'title' => $entry['name'],
- 'html' => '',
- 'url' => $entry['url'],
- 'is_archived' => $this->markAsRead,
- 'tags' => '',
- 'created_at' => $entry['date_added'],
- ];
-
- if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
- $data['tags'] = $entry['tags'];
- }
-
- return $data;
- }
+ /**
+ * {@inheritdoc}
+ */
+ protected function prepareEntry($entry = [])
+ {
+ $data = [
+ 'title' => $entry['name'],
+ 'html' => '',
+ 'url' => $entry['url'],
+ 'is_archived' => $this->markAsRead,
+ 'tags' => '',
+ 'created_at' => $entry['date_added'],
+ ];
+
+ if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+ $data['tags'] = $entry['tags'];
+ }
+
+ return $data;
+ }
/**
* {@inheritdoc}
diff --git a/src/Wallabag/ImportBundle/Resources/config/redis.yml b/src/Wallabag/ImportBundle/Resources/config/redis.yml
index c47778b8..c9c2cf26 100644
--- a/src/Wallabag/ImportBundle/Resources/config/redis.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/redis.yml
@@ -107,12 +107,12 @@ services:
- "@wallabag_core.redis.client"
- "wallabag.import.chrome"
- wallabag_import.producer.redis.firefox:
+ wallabag_import.producer.redis.chrome:
class: Wallabag\ImportBundle\Redis\Producer
arguments:
- "@wallabag_import.queue.redis.chrome"
- wallabag_import.consumer.redis.firefox:
+ wallabag_import.consumer.redis.chrome:
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
arguments:
- "@doctrine.orm.entity_manager"
--
cgit v1.2.3
From bd206a84d8c333c1287f5cb81d2e29f3afe515c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20L=C5=93uillet?=
Date: Fri, 23 Sep 2016 10:56:08 +0200
Subject: Fixed tests by removing clear()
---
src/Wallabag/ImportBundle/Import/BrowserImport.php | 4 ----
1 file changed, 4 deletions(-)
(limited to 'src')
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index 198e148e..44315e8b 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -94,10 +94,6 @@ abstract class BrowserImport extends AbstractImport
// flush every 20 entries
if (($i % 20) === 0) {
$this->em->flush();
-
- // clear only affected entities
- $this->em->clear(Entry::class);
- $this->em->clear(Tag::class);
}
++$i;
}
--
cgit v1.2.3
From 27acc6ddb8b0a1549a3f015171621e3056ef65d2 Mon Sep 17 00:00:00 2001
From: Jeremy Benoist
Date: Sun, 25 Sep 2016 15:29:40 +0200
Subject: Fix bad date format in Browser import
---
src/Wallabag/ImportBundle/Import/BrowserImport.php | 23 ++++++++++++++++
src/Wallabag/ImportBundle/Import/ChromeImport.php | 31 ----------------------
src/Wallabag/ImportBundle/Import/FirefoxImport.php | 31 ----------------------
3 files changed, 23 insertions(+), 62 deletions(-)
(limited to 'src')
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index 44315e8b..da69df9b 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -193,6 +193,29 @@ abstract class BrowserImport extends AbstractImport
return $entry;
}
+ /**
+ * {@inheritdoc}
+ */
+ protected function prepareEntry($entry = [])
+ {
+ $data = [
+ 'title' => $entry['name'],
+ 'html' => '',
+ 'url' => $entry['url'],
+ 'is_archived' => $this->markAsRead,
+ 'tags' => '',
+ // date are in format like "13118829474385693"
+ // and it'll be devided by 1000 in AbstractImport
+ 'created_at' => (int) ceil($entry['date_added'] / 10000),
+ ];
+
+ if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+ $data['tags'] = $entry['tags'];
+ }
+
+ return $data;
+ }
+
/**
* {@inheritdoc}
*/
diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php
index 1af7cc87..60602a1b 100644
--- a/src/Wallabag/ImportBundle/Import/ChromeImport.php
+++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php
@@ -29,35 +29,4 @@ class ChromeImport extends BrowserImport
{
return 'import.chrome.description';
}
-
- /**
- * {@inheritdoc}
- */
- protected function prepareEntry($entry = [])
- {
- $data = [
- 'title' => $entry['name'],
- 'html' => '',
- 'url' => $entry['url'],
- 'is_archived' => $this->markAsRead,
- 'tags' => '',
- 'created_at' => $entry['date_added'],
- ];
-
- if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
- $data['tags'] = $entry['tags'];
- }
-
- return $data;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function setEntryAsRead(array $importedEntry)
- {
- $importedEntry['is_archived'] = 1;
-
- return $importedEntry;
- }
}
diff --git a/src/Wallabag/ImportBundle/Import/FirefoxImport.php b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
index 351cbef1..1a0b1154 100644
--- a/src/Wallabag/ImportBundle/Import/FirefoxImport.php
+++ b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
@@ -29,35 +29,4 @@ class FirefoxImport extends BrowserImport
{
return 'import.firefox.description';
}
-
- /**
- * {@inheritdoc}
- */
- protected function prepareEntry($entry = [])
- {
- $data = [
- 'title' => $entry['name'],
- 'html' => '',
- 'url' => $entry['url'],
- 'is_archived' => $this->markAsRead,
- 'tags' => '',
- 'created_at' => $entry['date_added'],
- ];
-
- if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
- $data['tags'] = $entry['tags'];
- }
-
- return $data;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function setEntryAsRead(array $importedEntry)
- {
- $importedEntry['is_archived'] = 1;
-
- return $importedEntry;
- }
}
--
cgit v1.2.3
From 12d93e6896f2d99b6329b7979ee7b6d11e457c3a Mon Sep 17 00:00:00 2001
From: Jeremy Benoist
Date: Sun, 25 Sep 2016 22:24:07 +0200
Subject: Update Firefox file
With real data, the previous looks more than a Chrome converted file.
Also, fix date conversion (hope so).
---
src/Wallabag/ImportBundle/Import/BrowserImport.php | 36 ++++++++++++++--------
1 file changed, 24 insertions(+), 12 deletions(-)
(limited to 'src')
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index da69df9b..68fa8bf8 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -136,27 +136,27 @@ abstract class BrowserImport extends AbstractImport
*/
public function parseEntry(array $importedEntry)
{
- if ((!key_exists('guid', $importedEntry) || (!key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) {
+ if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) {
$this->parseEntries($importedEntry);
return;
}
- if (key_exists('children', $importedEntry)) {
+ if (array_key_exists('children', $importedEntry)) {
$this->parseEntries($importedEntry['children']);
return;
}
- if (!key_exists('uri', $importedEntry) && !key_exists('url', $importedEntry)) {
+ if (!array_key_exists('uri', $importedEntry) && !array_key_exists('url', $importedEntry)) {
return;
}
- $firefox = key_exists('uri', $importedEntry);
+ $url = array_key_exists('uri', $importedEntry) ? $importedEntry['uri'] : $importedEntry['url'];
$existingEntry = $this->em
->getRepository('WallabagCoreBundle:Entry')
- ->findByUrlAndUserId(($firefox) ? $importedEntry['uri'] : $importedEntry['url'], $this->user->getId());
+ ->findByUrlAndUserId($url, $this->user->getId());
if (false !== $existingEntry) {
++$this->skippedEntries;
@@ -184,7 +184,7 @@ abstract class BrowserImport extends AbstractImport
if (!empty($data['created_at'])) {
$dt = new \DateTime();
- $entry->setCreatedAt($dt->setTimestamp($data['created_at'] / 1000));
+ $entry->setCreatedAt($dt->setTimestamp($data['created_at']));
}
$this->em->persist($entry);
@@ -196,17 +196,29 @@ abstract class BrowserImport extends AbstractImport
/**
* {@inheritdoc}
*/
- protected function prepareEntry($entry = [])
+ protected function prepareEntry(array $entry = [])
{
+ $url = array_key_exists('uri', $entry) ? $entry['uri'] : $entry['url'];
+ $date = array_key_exists('date_added', $entry) ? $entry['date_added'] : $entry['dateAdded'];
+ $title = array_key_exists('name', $entry) ? $entry['name'] : $entry['title'];
+
+ if (16 === strlen($date)) {
+ // firefox ...
+ $date = (int) ceil($date / 1000000);
+ } else if (17 === strlen($date)) {
+ // chrome ...
+ $date = (int) ceil($date / 10000000);
+ } else {
+ $date = '';
+ }
+
$data = [
- 'title' => $entry['name'],
+ 'title' => $title,
'html' => '',
- 'url' => $entry['url'],
+ 'url' => $url,
'is_archived' => $this->markAsRead,
'tags' => '',
- // date are in format like "13118829474385693"
- // and it'll be devided by 1000 in AbstractImport
- 'created_at' => (int) ceil($entry['date_added'] / 10000),
+ 'created_at' => $date,
];
if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
--
cgit v1.2.3
From 990adfb34c148e7cd28b9cb784cf2b7388caae8f Mon Sep 17 00:00:00 2001
From: Jeremy Benoist
Date: Mon, 26 Sep 2016 07:30:02 +0200
Subject: 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.
---
src/Wallabag/ImportBundle/Import/BrowserImport.php | 35 ----------------------
src/Wallabag/ImportBundle/Import/ChromeImport.php | 21 +++++++++++++
src/Wallabag/ImportBundle/Import/FirefoxImport.php | 21 +++++++++++++
3 files changed, 42 insertions(+), 35 deletions(-)
(limited to 'src')
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index 68fa8bf8..e15443c4 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -193,41 +193,6 @@ abstract class BrowserImport extends AbstractImport
return $entry;
}
- /**
- * {@inheritdoc}
- */
- protected function prepareEntry(array $entry = [])
- {
- $url = array_key_exists('uri', $entry) ? $entry['uri'] : $entry['url'];
- $date = array_key_exists('date_added', $entry) ? $entry['date_added'] : $entry['dateAdded'];
- $title = array_key_exists('name', $entry) ? $entry['name'] : $entry['title'];
-
- if (16 === strlen($date)) {
- // firefox ...
- $date = (int) ceil($date / 1000000);
- } else if (17 === strlen($date)) {
- // chrome ...
- $date = (int) ceil($date / 10000000);
- } else {
- $date = '';
- }
-
- $data = [
- 'title' => $title,
- 'html' => '',
- 'url' => $url,
- 'is_archived' => $this->markAsRead,
- 'tags' => '',
- 'created_at' => $date,
- ];
-
- if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
- $data['tags'] = $entry['tags'];
- }
-
- return $data;
- }
-
/**
* {@inheritdoc}
*/
diff --git a/src/Wallabag/ImportBundle/Import/ChromeImport.php b/src/Wallabag/ImportBundle/Import/ChromeImport.php
index 60602a1b..d7620bcb 100644
--- a/src/Wallabag/ImportBundle/Import/ChromeImport.php
+++ b/src/Wallabag/ImportBundle/Import/ChromeImport.php
@@ -29,4 +29,25 @@ class ChromeImport extends BrowserImport
{
return 'import.chrome.description';
}
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function prepareEntry(array $entry = [])
+ {
+ $data = [
+ 'title' => $entry['name'],
+ 'html' => '',
+ 'url' => $entry['url'],
+ 'is_archived' => $this->markAsRead,
+ 'tags' => '',
+ 'created_at' => substr($entry['date_added'], 0, 10),
+ ];
+
+ if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+ $data['tags'] = $entry['tags'];
+ }
+
+ return $data;
+ }
}
diff --git a/src/Wallabag/ImportBundle/Import/FirefoxImport.php b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
index 1a0b1154..e010f5a4 100644
--- a/src/Wallabag/ImportBundle/Import/FirefoxImport.php
+++ b/src/Wallabag/ImportBundle/Import/FirefoxImport.php
@@ -29,4 +29,25 @@ class FirefoxImport extends BrowserImport
{
return 'import.firefox.description';
}
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function prepareEntry(array $entry = [])
+ {
+ $data = [
+ 'title' => $entry['title'],
+ 'html' => '',
+ 'url' => $entry['uri'],
+ 'is_archived' => $this->markAsRead,
+ 'tags' => '',
+ 'created_at' => substr($entry['dateAdded'], 0, 10),
+ ];
+
+ if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+ $data['tags'] = $entry['tags'];
+ }
+
+ return $data;
+ }
}
--
cgit v1.2.3