aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/poche/Poche.class.php22
-rw-r--r--inc/poche/config.inc.php5
2 files changed, 25 insertions, 2 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 5c3eda80..0d37e3c2 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -212,6 +212,28 @@ class Poche
212 212
213 private function importFromInstapaper() 213 private function importFromInstapaper()
214 { 214 {
215 $html = new simple_html_dom();
216 $html->load_file('./instapaper-export.html');
217
218 $read = 0;
219 $errors = array();
220 foreach($html->find('ol') as $ul)
221 {
222 foreach($ul->find('li') as $li)
223 {
224 $a = $li->find('a');
225 $url = new Url(base64_encode($a[0]->href));
226 $this->action('add', $url);
227 if ($read == '1') {
228 $last_id = $this->store->getLastId();
229 $this->store->archiveById($last_id);
230 }
231 }
232 # Instapaper génère un fichier HTML avec deux <ol>
233 # Le premier concerne les éléments non lus
234 # Le second concerne les éléments archivés
235 $read = 1;
236 }
215 Tools::logm('import from instapaper completed'); 237 Tools::logm('import from instapaper completed');
216 Tools::redirect(); 238 Tools::redirect();
217 } 239 }
diff --git a/inc/poche/config.inc.php b/inc/poche/config.inc.php
index 67d0c887..a16098d1 100644
--- a/inc/poche/config.inc.php
+++ b/inc/poche/config.inc.php
@@ -8,12 +8,13 @@
8 * @license http://www.wtfpl.net/ see COPYING file 8 * @license http://www.wtfpl.net/ see COPYING file
9 */ 9 */
10 10
11define ('POCHE_VERSION', '0.4'); 11define ('POCHE_VERSION', '1.0-alpha');
12define ('MODE_DEMO', FALSE); 12define ('MODE_DEMO', TRUE);
13define ('DEBUG_POCHE', FALSE); 13define ('DEBUG_POCHE', FALSE);
14define ('CONVERT_LINKS_FOOTNOTES', FALSE); 14define ('CONVERT_LINKS_FOOTNOTES', FALSE);
15define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE); 15define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE);
16define ('DOWNLOAD_PICTURES', FALSE); 16define ('DOWNLOAD_PICTURES', FALSE);
17define ('SHARE_TWITTER', TRUE);
17define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX'); 18define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX');
18define ('ABS_PATH', 'assets/'); 19define ('ABS_PATH', 'assets/');
19define ('TPL', './tpl'); 20define ('TPL', './tpl');