summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-11-09 11:44:09 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-11-09 11:44:09 +0100
commitb9e330109b58fac55c3728dd3c543552fcabd353 (patch)
tree93d386ca453b4b90f517018eb63a4b64df22e8ba
parente5d18a22c3c15acf61f97da4965a551b83df05cb (diff)
update picofeed to 0.1.0
-rw-r--r--composer.json2
-rw-r--r--composer.lock16
-rw-r--r--vendor/autoload.php2
-rw-r--r--vendor/composer/autoload_real.php10
-rw-r--r--vendor/composer/installed.json14
-rw-r--r--vendor/fguillot/picofeed/README.markdown8
-rw-r--r--vendor/fguillot/picofeed/docs/config.markdown10
-rw-r--r--vendor/fguillot/picofeed/docs/debugging.markdown54
-rw-r--r--vendor/fguillot/picofeed/docs/exceptions.markdown28
-rw-r--r--vendor/fguillot/picofeed/docs/favicon.markdown14
-rw-r--r--vendor/fguillot/picofeed/docs/feed-creation.markdown6
-rw-r--r--vendor/fguillot/picofeed/docs/feed-parsing.markdown82
-rw-r--r--vendor/fguillot/picofeed/docs/grabber.markdown35
-rw-r--r--vendor/fguillot/picofeed/docs/installation.markdown8
-rw-r--r--vendor/fguillot/picofeed/docs/opml-export.markdown4
-rw-r--r--vendor/fguillot/picofeed/docs/opml-import.markdown2
-rw-r--r--vendor/fguillot/picofeed/example.php45
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Client.php14
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Curl.php29
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Favicon.php4
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Grabber.php40
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Client/Stream.php8
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Filter/Html.php5
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Logging/Logger.php (renamed from vendor/fguillot/picofeed/lib/PicoFeed/Logging/Logging.php)2
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Atom.php1
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Parser.php14
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php1
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php10
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/degroupnews.com.php10
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/sitepoint.com.php9
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Rules/undeadly.org.php11
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Import.php8
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Rss20.php2
-rw-r--r--vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Writer.php9
-rwxr-xr-xvendor/fguillot/picofeed/picofeed55
-rw-r--r--vendor/fguillot/picofeed/tests/Client/GrabberTest.php3
-rw-r--r--vendor/fguillot/picofeed/tests/Client/UrlTest.php2
37 files changed, 400 insertions, 177 deletions
diff --git a/composer.json b/composer.json
index 6050bcff4..a35672b65 100644
--- a/composer.json
+++ b/composer.json
@@ -32,6 +32,6 @@
"require": {
"pear/net_url2": "~2.1",
"ezyang/htmlpurifier": "~4.6",
- "fguillot/picofeed": "0.1.0-dev-dev"
+ "fguillot/picofeed": "~0.1.0"
}
}
diff --git a/composer.lock b/composer.lock
index ce730f2ab..f8a96a493 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "a50b15fc49d316cb5b2db3e9e7ea78b3",
+ "hash": "3cbce8173a1c93656be80baf11715718",
"packages": [
{
"name": "ezyang/htmlpurifier",
@@ -53,16 +53,16 @@
},
{
"name": "fguillot/picofeed",
- "version": "dev-0.1.0-dev",
+ "version": "v0.1.0",
"source": {
"type": "git",
"url": "https://github.com/fguillot/picoFeed.git",
- "reference": "e7e32522b487256c3164eeece30203313b09456a"
+ "reference": "d36a878e912a04c15f49da97e8d627280ae6918c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/e7e32522b487256c3164eeece30203313b09456a",
- "reference": "e7e32522b487256c3164eeece30203313b09456a",
+ "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/d36a878e912a04c15f49da97e8d627280ae6918c",
+ "reference": "d36a878e912a04c15f49da97e8d627280ae6918c",
"shasum": ""
},
"require": {
@@ -86,7 +86,7 @@
],
"description": "Modern library to write or read feeds (RSS/Atom)",
"homepage": "http://fguillot.github.io/picoFeed",
- "time": "2014-11-05 01:21:29"
+ "time": "2014-11-08 14:43:27"
},
{
"name": "pear/net_url2",
@@ -156,9 +156,7 @@
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": {
- "fguillot/picofeed": 20
- },
+ "stability-flags": [],
"prefer-stable": false,
"platform": [],
"platform-dev": []
diff --git a/vendor/autoload.php b/vendor/autoload.php
index 3cd25b0d2..bf039c269 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
-return ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f::getLoader();
+return ComposerAutoloaderInit1a5ae2c0139f33f17ed4df8077538870::getLoader();
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 16fe7ad69..c601c9c64 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
-class ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f
+class ComposerAutoloaderInit1a5ae2c0139f33f17ed4df8077538870
{
private static $loader;
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f
return self::$loader;
}
- spl_autoload_register(array('ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f', 'loadClassLoader'), true, true);
+ spl_autoload_register(array('ComposerAutoloaderInit1a5ae2c0139f33f17ed4df8077538870', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
- spl_autoload_unregister(array('ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f', 'loadClassLoader'));
+ spl_autoload_unregister(array('ComposerAutoloaderInit1a5ae2c0139f33f17ed4df8077538870', 'loadClassLoader'));
$includePaths = require __DIR__ . '/include_paths.php';
array_push($includePaths, get_include_path());
@@ -46,14 +46,14 @@ class ComposerAutoloaderInit4750e3a2a6327c742e19653287d1e34f
$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
- composerRequire4750e3a2a6327c742e19653287d1e34f($file);
+ composerRequire1a5ae2c0139f33f17ed4df8077538870($file);
}
return $loader;
}
}
-function composerRequire4750e3a2a6327c742e19653287d1e34f($file)
+function composerRequire1a5ae2c0139f33f17ed4df8077538870($file)
{
require $file;
}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index f7a314210..f3aa9a500 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -114,25 +114,25 @@
},
{
"name": "fguillot/picofeed",
- "version": "dev-0.1.0-dev",
- "version_normalized": "dev-0.1.0-dev",
+ "version": "v0.1.0",
+ "version_normalized": "0.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/fguillot/picoFeed.git",
- "reference": "e7e32522b487256c3164eeece30203313b09456a"
+ "reference": "d36a878e912a04c15f49da97e8d627280ae6918c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/e7e32522b487256c3164eeece30203313b09456a",
- "reference": "e7e32522b487256c3164eeece30203313b09456a",
+ "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/d36a878e912a04c15f49da97e8d627280ae6918c",
+ "reference": "d36a878e912a04c15f49da97e8d627280ae6918c",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
- "time": "2014-11-05 01:21:29",
+ "time": "2014-11-08 14:43:27",
"type": "library",
- "installation-source": "dist",
+ "installation-source": "source",
"autoload": {
"psr-0": {
"PicoFeed": "lib/"
diff --git a/vendor/fguillot/picofeed/README.markdown b/vendor/fguillot/picofeed/README.markdown
index 8f01b4e8e..868d532e9 100644
--- a/vendor/fguillot/picofeed/README.markdown
+++ b/vendor/fguillot/picofeed/README.markdown
@@ -42,6 +42,13 @@ Authors
- [Bernhard Posselt](https://github.com/Raydiation)
- [David Pennington](https://github.com/Xeoncross)
+Real world usage
+----------------
+
+- [AnythingNew](http://anythingnew.co)
+- [Miniflux](http://miniflux.net)
+- [Owncloud News](https://github.com/owncloud/news)
+
Documentation
-------------
@@ -53,5 +60,6 @@ Documentation
- [OPML file importation](docs/opml-import.markdown)
- [OPML file exportation](docs/opml-export.markdown)
- [Web scraping](docs/grabber.markdown)
+- [Exceptions](docs/exceptions.markdown)
- [Debugging](docs/debugging.markdown)
- [Configuration](docs/config.markdown)
diff --git a/vendor/fguillot/picofeed/docs/config.markdown b/vendor/fguillot/picofeed/docs/config.markdown
index bf6fdee1f..5e0dfea53 100644
--- a/vendor/fguillot/picofeed/docs/config.markdown
+++ b/vendor/fguillot/picofeed/docs/config.markdown
@@ -8,8 +8,8 @@ To change the default parameters, you have to use the Config class.
Create a new instance and pass it to the Reader object like that:
```php
-use PicoFeed\Reader;
-use PicoFeed\Config;
+use PicoFeed\Reader\Reader;
+use PicoFeed\Config\Config;
$config = new Config;
$config->setClientUserAgent('My custom RSS Reader')
@@ -80,7 +80,7 @@ $config->setProxyHostname('proxy.example.org');
- Argument value: port number (integer)
```php
-$config->getProxyPort(8118);
+$config->setProxyPort(8118);
```
### Proxy username
@@ -132,7 +132,7 @@ Parser
### Hash algorithm used for item id generation
- Method name: `setParserHashAlgo()`
-- Default value: `crc32b`
+- Default value: `sha256`
- Argument value: any value returned by the function `hash_algos()` (string)
- See: http://php.net/hash_algos
@@ -147,7 +147,7 @@ $config->setParserHashAlgo('sha1');
- Argument value: boolean
```php
-$config->setContentFiltering();
+$config->setContentFiltering(false);
```
### Timezone
diff --git a/vendor/fguillot/picofeed/docs/debugging.markdown b/vendor/fguillot/picofeed/docs/debugging.markdown
index bbe1fd067..a9f8ab163 100644
--- a/vendor/fguillot/picofeed/docs/debugging.markdown
+++ b/vendor/fguillot/picofeed/docs/debugging.markdown
@@ -1,13 +1,18 @@
Debugging
=========
-Get log messages
-----------------
+Logging
+-------
PicoFeed log in memory the execution flow, if a feed doesn't work correctly it's easy to see what is wrong.
+### Reading messages
+
```php
-print_r(PicoFeed\Logging::getMessages());
+use PicoFeed\Logging\Logger;
+
+// All messages are stored inside an Array
+print_r(Logger::getMessages());
```
You will got an output like that:
@@ -36,11 +41,46 @@ Array
)
```
-Remove messages
----------------
+### Remove messages
-All messages are stored in memory, if you need to clear them just call the method `Logging::deleteMessages()`:
+All messages are stored in memory, if you need to clear them just call the method `Logger::deleteMessages()`:
```php
-PicoFeed\Logging::deleteMessages();
+Logger::deleteMessages();
+```
+
+Command line utility
+====================
+
+PicoFeed provides a basic command line tool to debug feeds quickly.
+The tool is located in the root directory project.
+
+### Usage
+
+```bash
+$ ./picofeed
+Usage:
+./picofeed feed <feed-url> # Parse a feed a dump the ouput on stdout
+./picofeed debug <feed-url> # Display all logging messages for a feed
+./picofeed item <feed-url> <item-id> # Fetch only one item
+./picofeed nofilter <feed-url> <item-id> # Fetch an item but with no content filtering
+```
+
+### Example
+
+```bash
+$ ./picofeed debug https://linuxfr.org/
+Exception thrown ===> "Invalid SSL certificate"
+Array
+(
+ [0] => [2014-11-08 14:04:14] PicoFeed\Client\Curl Fetch URL: https://linuxfr.org/
+ [1] => [2014-11-08 14:04:14] PicoFeed\Client\Curl Etag provided:
+ [2] => [2014-11-08 14:04:14] PicoFeed\Client\Curl Last-Modified provided:
+ [3] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL total time: 1.850634
+ [4] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL dns lookup time: 0.00093
+ [5] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL connect time: 0.115213
+ [6] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL speed download: 0
+ [7] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL effective url: https://linuxfr.org/
+ [8] => [2014-11-08 14:04:16] PicoFeed\Client\Curl cURL error: SSL certificate problem: Invalid certificate chain
+)
```
diff --git a/vendor/fguillot/picofeed/docs/exceptions.markdown b/vendor/fguillot/picofeed/docs/exceptions.markdown
new file mode 100644
index 000000000..399ba3ef6
--- /dev/null
+++ b/vendor/fguillot/picofeed/docs/exceptions.markdown
@@ -0,0 +1,28 @@
+Exceptions
+==========
+
+All exceptions inherits from the standard `Exception` class.
+
+### Library Exceptions
+
+- `PicoFeed\PicoFeedException`: Base class exception for the library
+
+### Client Exceptions
+
+- `PicoFeed\Client\ClientException`: Base exception class for the Client class
+- `PicoFeed\Client\InvalidCertificateException`: Invalid SSL certificate
+- `PicoFeed\Client\InvalidUrlException`: Malformed URL, page not found (404), unable to establish a connection
+- `PicoFeed\Client\MaxRedirectException`: Maximum of HTTP redirections reached
+- `PicoFeed\Client\MaxSizeException`: The response size exceeds to maximum allowed
+- `PicoFeed\Client\TimeoutException`: Connection timeout
+
+### Parser Exceptions
+
+- `PicoFeed\Parser\ParserException`: Base exception class for the Parser class
+- `PicoFeed\Parser\MalformedXmlException`: XML Parser error
+
+### Reader Exceptions
+
+- `PicoFeed\Reader\ReaderException`: Base exception class for the Reader
+- `PicoFeed\Reader\SubscriptionNotFoundException`: Unable to find a feed for the given website
+- `PicoFeed\Reader\UnsupportedFeedFormatException`: Unable to detect the feed format
diff --git a/vendor/fguillot/picofeed/docs/favicon.markdown b/vendor/fguillot/picofeed/docs/favicon.markdown
index 92ae11928..14e25955d 100644
--- a/vendor/fguillot/picofeed/docs/favicon.markdown
+++ b/vendor/fguillot/picofeed/docs/favicon.markdown
@@ -5,15 +5,13 @@ Find and download the favicon
-----------------------------
```php
-
-use PicoFeed\Favicon;
+use PicoFeed\Client\Favicon;
$favicon = new Favicon;
// The icon link is https://bits.wikimedia.org/favicon/wikipedia.ico
$icon_link = $favicon->find('https://en.wikipedia.org/');
$icon_content = $favicon->getContent();
-
```
PicoFeed will try first to find the favicon from the meta tags and fallback to the `favicon.ico` located in the website's root if nothing is found.
@@ -27,14 +25,12 @@ Check if a favicon link exists
------------------------------
```php
-
-use PicoFeed\Favicon;
+use PicoFeed\Client\Favicon;
$favicon = new Favicon;
// Return true if the file exists
var_dump($favicon->exists('http://php.net/favicon.ico'));
-
```
Use personalized HTTP settings
@@ -43,14 +39,12 @@ Use personalized HTTP settings
Like other classes, the Favicon class support the Config object as constructor argument:
```php
-
-use PicoFeed\Config;
-use PicoFeed\Favicon;
+use PicoFeed\Config\Config;
+use PicoFeed\Client\Favicon;
$config = new Config;
$config->setClientUserAgent('My RSS Reader');
$favicon = new Favicon($config);
$favicon->find('https://github.com');
-
``` \ No newline at end of file
diff --git a/vendor/fguillot/picofeed/docs/feed-creation.markdown b/vendor/fguillot/picofeed/docs/feed-creation.markdown
index 24329f82c..35a24a9d7 100644
--- a/vendor/fguillot/picofeed/docs/feed-creation.markdown
+++ b/vendor/fguillot/picofeed/docs/feed-creation.markdown
@@ -1,11 +1,13 @@
Feed creation
=============
+PicoFeed can also generate Atom and RSS feeds.
+
Generate RSS 2.0 feed
----------------------
```php
-use PicoFeed\Writers\Rss20;
+use PicoFeed\Syndication\Rss20;
$writer = new Rss20();
$writer->title = 'My site';
@@ -48,7 +50,7 @@ Generate Atom feed
------------------
```php
-use PicoFeed\Writers\Atom;
+use PicoFeed\Syndication\Atom;
$writer = new Atom();
$writer->title = 'My site';
diff --git a/vendor/fguillot/picofeed/docs/feed-parsing.markdown b/vendor/fguillot/picofeed/docs/feed-parsing.markdown
index 22f84339b..df881400e 100644
--- a/vendor/fguillot/picofeed/docs/feed-parsing.markdown
+++ b/vendor/fguillot/picofeed/docs/feed-parsing.markdown
@@ -13,7 +13,7 @@ try {
$reader = new Reader;
// Return a resource
- $resource = $reader->download('https://linuxfr.org/news.atom');
+ $resource = $reader->download('http://linuxfr.org/news.atom');
// Return the right parser instance according to the feed format
$parser = $reader->getParser(
@@ -59,16 +59,6 @@ Item::author = Syvolc
Item::enclosure_url =