diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-05 11:30:27 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-05 11:30:38 +0100 |
commit | 95530f62513a82c385d9378b4a59da57d74092d9 (patch) | |
tree | a4d17994548999b42e99371f381da8c256ee39bf /3rdparty | |
parent | 57163ad25a7dc63abd8aff8663c185ddad398466 (diff) |
update picofeed, add max size setting, fix #642
Diffstat (limited to '3rdparty')
80 files changed, 3232 insertions, 1325 deletions
diff --git a/3rdparty/autoload.php b/3rdparty/autoload.php index 120b16acc..3cd25b0d2 100644 --- a/3rdparty/autoload.php +++ b/3rdparty/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit7bb1478f65d3f193519a3262170cb8bf::getLoader(); +return ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f::getLoader(); diff --git a/3rdparty/composer/autoload_real.php b/3rdparty/composer/autoload_real.php index 1a9ed9123..16fe7ad69 100644 --- a/3rdparty/composer/autoload_real.php +++ b/3rdparty/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit7bb1478f65d3f193519a3262170cb8bf +class ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInit7bb1478f65d3f193519a3262170cb8bf return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit7bb1478f65d3f193519a3262170cb8bf', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit7bb1478f65d3f193519a3262170cb8bf', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; array_push($includePaths, get_include_path()); @@ -46,14 +46,14 @@ class ComposerAutoloaderInit7bb1478f65d3f193519a3262170cb8bf $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $file) { - composerRequire7bb1478f65d3f193519a3262170cb8bf($file); + composerRequire4750e3a2a6327c742e19653287d1e34f($file); } return $loader; } } -function composerRequire7bb1478f65d3f193519a3262170cb8bf($file) +function composerRequire4750e3a2a6327c742e19653287d1e34f($file) { require $file; } diff --git a/3rdparty/composer/installed.json b/3rdparty/composer/installed.json index cc63486b6..f7a314210 100644 --- a/3rdparty/composer/installed.json +++ b/3rdparty/composer/installed.json @@ -114,23 +114,23 @@ }, { "name": "fguillot/picofeed", - "version": "dev-master", - "version_normalized": "9999999-dev", + "version": "dev-0.1.0-dev", + "version_normalized": "dev-0.1.0-dev", "source": { "type": "git", "url": "https://github.com/fguillot/picoFeed.git", - "reference": "dd5c122aea0a95ec2c932ee487a8fb4fd307cc6f" + "reference": "e7e32522b487256c3164eeece30203313b09456a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/dd5c122aea0a95ec2c932ee487a8fb4fd307cc6f", - "reference": "dd5c122aea0a95ec2c932ee487a8fb4fd307cc6f", + "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/e7e32522b487256c3164eeece30203313b09456a", + "reference": "e7e32522b487256c3164eeece30203313b09456a", "shasum": "" }, "require": { "php": ">=5.3.0" }, - "time": "2014-10-19 18:18:06", + "time": "2014-11-05 01:21:29", "type": "library", "installation-source": "dist", "autoload": { diff --git a/3rdparty/fguillot/picofeed/.gitignore b/3rdparty/fguillot/picofeed/.gitignore index 496ee2ca6..b0ef0680a 100644 --- a/3rdparty/fguillot/picofeed/.gitignore +++ b/3rdparty/fguillot/picofeed/.gitignore @@ -1 +1,2 @@ -.DS_Store
\ No newline at end of file +.DS_Store +vendor/
\ No newline at end of file diff --git a/3rdparty/fguillot/picofeed/.travis.yml b/3rdparty/fguillot/picofeed/.travis.yml index 83334e8c4..0c3d0fe55 100644 --- a/3rdparty/fguillot/picofeed/.travis.yml +++ b/3rdparty/fguillot/picofeed/.travis.yml @@ -7,4 +7,6 @@ php: - "5.3" before_script: wget https://phar.phpunit.de/phpunit.phar -script: php phpunit.phar +script: + - composer dump-autoload + - php phpunit.phar diff --git a/3rdparty/fguillot/picofeed/README.markdown b/3rdparty/fguillot/picofeed/README.markdown index 99ef68237..8f01b4e8e 100644 --- a/3rdparty/fguillot/picofeed/README.markdown +++ b/3rdparty/fguillot/picofeed/README.markdown @@ -38,17 +38,20 @@ Authors ------- - Original author: [Frédéric Guillot](http://fredericguillot.com/) -- Contributors: See pull-requests, issues tracker and commit history +- Major Contributors: + - [Bernhard Posselt](https://github.com/Raydiation) + - [David Pennington](https://github.com/Xeoncross) Documentation ------------- - [Installation](docs/installation.markdown) -- [OPML file importation](docs/opml-import.markdown) -- [OPML file exportation](docs/opml-export.markdown) +- [Running unit tests](docs/tests.markdown) - [Feed parsing](docs/feed-parsing.markdown) - [Feed creation](docs/feed-creation.markdown) - [Favicon fetcher](docs/favicon.markdown) +- [OPML file importation](docs/opml-import.markdown) +- [OPML file exportation](docs/opml-export.markdown) - [Web scraping](docs/grabber.markdown) - [Debugging](docs/debugging.markdown) - [Configuration](docs/config.markdown) diff --git a/3rdparty/fguillot/picofeed/docs/feed-parsing.markdown b/3rdparty/fguillot/picofeed/docs/feed-parsing.markdown index 10f20d31a..22f84339b 100644 --- a/3rdparty/fguillot/picofeed/docs/feed-parsing.markdown +++ b/3rdparty/fguillot/picofeed/docs/feed-parsing.markdown @@ -1,205 +1,164 @@ Feed parsing ============ -Download and parse a feed -------------------------- - -Try this example from a command line script: +Parsing a subscription +---------------------- ```php -<?php - -require 'path/to/PicoFeed.php'; - -use PicoFeed\Reader; +use PicoFeed\Reader\Reader; +use PicoFeed\PicoFeedException; -$reader = new Reader; +try { -// Try to discover the XML feed automatically -$reader->download('http://bbc.co.uk/news'); + $reader = new Reader; -$parser = $reader->getParser(); + // Return a resource + $resource = $reader->download('https://linuxfr.org/news.atom'); -if ($parser !== false) { + // Return the right parser instance according to the feed format + $parser = $reader->getParser( + $resource->getUrl(), + $resource->getContent(), + $resource->getEncoding() + ); + // Return a Feed object $feed = $parser->execute(); - if ($feed !== false) { - echo $feed; - } + // Print the feed properties with the magic method __toString() + echo $feed; +} +catch (PicoFeedException $e) { + // Do Something... } ``` -- The method `getParser()` return `false` when there is something wrong during the download or the feed detection -- The call `$parser->execute()` return `false` when there is a parsing error - -In your terminal you will got an output like that: - -``` -Feed::id = http://www.bbc.co.uk/news/#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa -Feed::title = BBC News - Home -Feed::url = http://www.bbc.co.uk/news/#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa -Feed::date = 1399934742 -Feed::language = en-gb -Feed::items = 84 items +- The Reader class is the entry point for feed reading +- The method `download()` fetch the remote content and return a resource, an instance of `PicoFeed\Client\Client` +- The method `getParser()` returns a Parser instance according to the feed format Atom, Rss 2.0... +- The parser itself returns a `Feed` object that contains feed and item properties + +Output: + +```bash +Feed::id = tag:linuxfr.org,2005:/news +Feed::title = LinuxFr.org : les dépêches +Feed::url = http://linuxfr.org/news +Feed::date = 1415138079 +Feed::language = en-US +Feed::description = +Feed::logo = +Feed::items = 15 items ---- -Item::id = e411a646 -Item::title = Nigeria rejects captive girls 'swap' -Item::url = http://www.bbc.co.uk/news/world-africa-27386285#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa -Item::date = 1399933404 -Item::language = en-gb -Item::author = +Item::id = 38d8f48284fb03940cbb3aff9101089b81e44efb1281641bdd7c3e7e4bf3b0cd +Item::title = openSUSE 13.2 : nouvelle version du caméléon disponible ! +Item::url = http://linuxfr.org/news/opensuse-13-2-nouvelle-version-du-cameleon-disponible +Item::date = 1415122640 +Item::language = en-US +Item::author = Syvolc Item::enclosure_url = Item::enclosure_type = -Item::content = <p& |