1#!/usr/bin/env php
2<?php
3// downloading and parsing all Zotero entries could take quite some time
4set_time_limit(600);
5
6require_once('IniZoteroConfig.php');
7require_once('ImportZoteroFeedReader.php');
8require_once('FeedZoteroRepository.php');
9require_once('TextZoteroRepository.php');
10
11
12$config = new IniConfig();
13
14$cachePage = $config->getCachePage();
15$textRepo = new TextZoteroRepository($cachePage, $config);
16
17$feedReader = new ImportZoteroFeedReader($config);
18$webRepo = new FeedZoteroRepository($feedReader, $config);
19$entries = $webRepo->getAllEntries();
20
21$textRepo->saveEntries($entries);
22
23echo count($textRepo->getAllEntries()) . " entries imported into file " . $cachePage . ".\n";
24?>
25