prusmarcin / parser-rss-atom
Parser RSS/Atom
v0.1
2018-04-04 21:07 UTC
Requires
- php: >=7.1.0
Requires (Dev)
- phpunit/phpunit: ^7.0
This package is not auto-updated.
Last update: 2025-04-30 07:27:58 UTC
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.