2017 © Pedro Peláez
 

library opml-parser

OPML Parser Class: Extract the properties of content from OPML files.

image

imelgrat/opml-parser

OPML Parser Class: Extract the properties of content from OPML files.

  • Monday, February 26, 2018
  • by imelgrat
  • Repository
  • 1 Watchers
  • 1 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 44 % Grown

The README.md

OPML Parser

GitHub license GitHub release Total Downloads GitHub issues GitHub stars, (*1)

OPML Parser Class: Extract the properties of content from OPML files., (*2)

A file with the OPML file extension is an Outline Processor Markup Language file. It's saved using the XML format, and is used to exchange information between applications regardless of the operating system., (*3)

The OPML file format is often seen used as the import/export format for RSS feed reader programs. Since a file of this format can hold a collection of RSS subscription information, it's the ideal format for backing up or sharing RSS feeds. The class retrieves local or remote OPML file and parses it to extract its content into a PHP iterator. Each of the iterator elements contains the URLs of the listed content as well all other the properties of each content entry such as: name, link target, description, RSS feed, creation date and content type (RSS, HTML, song, booklist, etc..)., (*4)

Developed by Ivan Melgrati, (*5)

Requirements

  • PHP >= 5.3.0

Installation

Composer

The recommended installation method is through Composer, a dependency manager for PHP. Just add imelgrat/opml-parser to your project's composer.json file:, (*6)

{
    "require": {
        "imelgrat/opml-parser": "*"
    }
}

[More details](http://packagist.org/packages/imelgrat/opml-parser) can
be found over at [Packagist](http://packagist.org).

### Manually

1.  Copy `src/opml-parser.php` to your codebase, perhaps to the `vendor`
    directory.
2.  Add the `OPML_Parser` class to your autoloader or `require` the file
    directly.

Then, in order to use the OPML class, you need to invoke the "use" operator to bring the class into skope.

```php
ParseLocation('http://www.bbc.co.uk/podcasts.opml', null);

// Walk through each item in the same way as we would if $parser were a string (thanks to the Iterator interface)
foreach ($parser as $key => $item)
{
    echo "

Item: " . $key . ', (*7)

    '; foreach ($item as $attribute => $value) { echo '
  • ' . '' . $attribute . ':' . $value . '
  • '; } echo '
'; echo '

 , (*8)

'; } ?>

Feedback

Please open an issue to request a feature or submit a bug report. Or even if you just want to provide some feedback, I'd love to hear. I'm also available on Twitter as @imelgrat., (*9)

Contributing

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Added some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new Pull Request.

The Versions

26/02 2018

dev-master

9999999-dev https://github.com/imelgrat/opml-parser

OPML Parser Class: Extract the properties of content from OPML files.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

parser xml html parser opml xml parser rss parser opml parser opml iterator php iterator parser html playlist parser

25/02 2018

2.1.0

2.1.0.0 https://github.com/imelgrat/opml-parser

OPML Parser Class: Extract the properties of content from OPML files.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

parser xml html parser opml xml parser rss parser opml parser opml iterator php iterator parser html playlist parser

13/09 2016

2.0.0

2.0.0.0 https://github.com/imelgrat/opml-parser

OPML Parser Class: Extract the properties of content from OPML files.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

parser xml html parser opml xml parser rss parser opml parser opml iterator php iterator parser html playlist parser