prusmarcin/parser-rss-atom
Composer 安装命令:
composer require prusmarcin/parser-rss-atom
包简介
Parser RSS/Atom
关键字:
README 文档
README
Installation
Add the prusmarcin/parserRssAtom package to your composer.json file.
{
"require": {
"prusmarcin/parser-rss-atom": "0.*"
}
}
Or via the command line in the root of your application installation.
$ composer require "prusmarcin/parser-rss-atom:0.*"
Usage
use MarcinPrus\Parser\ParserClass as Parser; use MarcinPrus\Save\SaveFileClass as Save; if (isset($argc) && isset($argv)) { $parser = new Parser(); $parser->requestMethod = 'curl'; $parser->run(); $parser->parseCliParameters($argc, $argv); $save = new Save(); $save->fileType = $parser->fileType; $response = $save->toFile( $parser->path, $parser->saveOption, $parser->parseContent() ); } else {}
Commands
Use onlny by CLI: Windows CMD, Unix Shell
$ php src/console.php csv:simple http://feeds.nationalgeographic.com/ng/News/News_Main eksport_prosty.csv
OR
$ php src/console.php csv:extended http://feeds.nationalgeographic.com/ng/News/News_Main eksport_prosty.csv
Result array
Array ( [0] => Array ( [info] => 1 [message] => Success - The file export_prosty.csv was saved in the root directory of the application. ) )
Information
A csv file is written to the disk. The columns are separated by a Tab.
Testing
$ phpunit
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-04