Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6f11044
Showing
12 changed files
with
1,846 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
repo_token: REPO_TOKEN | ||
coverage_clover: build/logs/clover.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
vendor | ||
composer.phar | ||
clover.xml | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
sudo: true | ||
language: php | ||
php: | ||
- 7.0 | ||
- 5.6 | ||
- 5.5 | ||
before_script: | ||
- wget http://getcomposer.org/composer.phar | ||
- php composer.phar install --dev --no-interaction | ||
script: | ||
- php vendor/bin/phpunit -c phpunit.xml.dist | ||
- php coverage-checker.php build/logs/clover.xml 100 | ||
after_script: | ||
- php vendor/bin/coveralls -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Copyright (c) 2016 YUZURU SUZUKI | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
Contact GitHub API Training Shop Blog About |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
This PHP library can easily parse xml files, especially RSS1.0, RSS2.0 and ATOM. | ||
============================= | ||
|
||
[![Coverage Status](https://coveralls.io/repos/github/YuzuruS/parse-rss/badge.svg?branch=master)](https://coveralls.io/github/YuzuruS/parse-rss?branch=master) | ||
[![Build Status](https://travis-ci.org/YuzuruS/parse-rss.png?branch=master)](https://travis-ci.org/YuzuruS/parse-rss) | ||
[![Stable Version](https://poser.pugx.org/yuzuru-s/parse-rss/v/stable)](https://packagist.org/packages/yuzuru-s/parse-rss) | ||
[![Download Count](https://poser.pugx.org/yuzuru-s/parse-rss/downloads.png)](https://packagist.org/packages/yuzuru-s/parse-rss) | ||
[![License](https://poser.pugx.org/yuzuru-s/parse-rss/license)](https://packagist.org/packages/yuzuru-s/parse-rss) | ||
|
||
Requirements | ||
----------------------------- | ||
- PHP | ||
- >=5.5 >=5.6, >=7.0 | ||
- ext-xml | ||
- Composer | ||
|
||
|
||
|
||
Installation | ||
---------------------------- | ||
|
||
* Using composer | ||
|
||
``` | ||
{ | ||
"require": { | ||
"yuzuru-s/parse-rss": "1.0.*" | ||
} | ||
} | ||
``` | ||
|
||
``` | ||
$ php composer.phar update yuzuru-s/parse-rss --dev | ||
``` | ||
|
||
How to use | ||
---------------------------- | ||
Please check [sample code](https://github.com/YuzuruS/parse-rss/blob/master/sample/usecase.php) | ||
|
||
```php | ||
<?php | ||
require __DIR__ . '/../vendor/autoload.php'; | ||
use YuzuruS\Rss\Feed; | ||
|
||
// endpoint → example.com | ||
$wp = new Post(getenv(WP_USERNAME), getenv(WP_PASSWD), getenv(WP_ENDPOINT)); | ||
|
||
$res = $wp->makeCategories([ | ||
['name' => 'かて1', 'slug' => 'cate1'], | ||
['name' => 'かて2', 'slug' => 'cate2'], | ||
]); | ||
|
||
$wp | ||
->setTitle('たいとる') | ||
->setDescription('本文') | ||
->setKeywords(['key1','key2']) | ||
->setCategories(['かて1','かて2']) | ||
->setDate('2016-11-11') | ||
->setWpSlug('entry') | ||
->setThumbnail('https://www.pakutaso.com/shared/img/thumb/SAYA160312500I9A3721_TP_V.jpg') | ||
->post(); | ||
|
||
``` | ||
|
||
|
||
How to run unit test | ||
---------------------------- | ||
|
||
Run with default setting. | ||
``` | ||
% vendor/bin/phpunit -c phpunit.xml.dist | ||
``` | ||
|
||
Currently tested with PHP 7.0.0 | ||
|
||
|
||
History | ||
---------------------------- | ||
|
||
|
||
|
||
|
||
License | ||
---------------------------- | ||
Copyright (c) 2016 YUZURU SUZUKI. See MIT-LICENSE for further details. | ||
|
||
Copyright | ||
----------------------------- | ||
- Yuzuru Suzuki | ||
- http://yuzurus.hatenablog.jp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "yuzuru-s/parse-rss", | ||
"description": "This PHP library can easily parse xml files, especially RSS1.0, RSS2.0 and ATOM.", | ||
"keywords": ["rss", "atom", "parser"], | ||
"homepage": "https://github.com/YuzuruS/parse-rss", | ||
"type": "library", | ||
"license": "MIT", | ||
"require" : { | ||
"php": ">=5.5.0", | ||
"ext-xml": "*", | ||
"embed/embed": "*" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Yuzuru Suzuki", | ||
"email": "navitima@gmail.com", | ||
"homepage": "http://yuzurus.hatenablog.jp/" | ||
} | ||
], | ||
"require-dev": { | ||
"phpunit/phpunit": "3.7.*@stable", | ||
"satooshi/php-coveralls": "dev-master", | ||
"friendsofphp/php-cs-fixer": "0.3.*@dev" | ||
}, | ||
"autoload": { | ||
"psr-0": {"YuzuruS": "src/"} | ||
} | ||
} |
Oops, something went wrong.