2017 © Pedro Peláez
 

library phergie-irc-plugin-react-feedticker

Phergie plugin for syndicating data from feed items to channels or users

image

phergie/phergie-irc-plugin-react-feedticker

Phergie plugin for syndicating data from feed items to channels or users

  • Tuesday, August 30, 2016
  • by elazar
  • Repository
  • 4 Watchers
  • 5 Stars
  • 45 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

This project is abandoned

This repo is being kept for posterity and will be archived in a readonly state. If you're interested it can be forked under a new Composer namespace/GitHub organization., (*1)

phergie/phergie-irc-plugin-react-feedticker

Phergie plugin for syndicating data from feed items to channels or users., (*2)

Build Status, (*3)

Install

The recommended method of installation is through composer., (*4)

{
    "require": {
        "phergie/phergie-irc-plugin-react-feedticker": "dev-master"
    }
}

See Phergie documentation for more information on installing and enabling plugins., (*5)

Configuration

return array(
    'plugins' => array(
        // dependencies
        new \WyriHaximus\Phergie\Plugin\Dns\Plugin,
        new \WyriHaximus\Phergie\Plugin\Http\Plugin,

        new \Phergie\Irc\Plugin\React\FeedTicker\Plugin(array(

            // required: list of feed URLs to poll for content
            'urls' => array(
                'http://feeds.mashable.com/Mashable',
                'http://readwrite.com/rss.xml',
                // ...
            ),

            // required: lists of channels or users to receive syndicated feed items
            //           keyed by associated connection mask
            'targets' => array(
                'nick1!user1@host1' => array(
                    '#channel1',
                    'user1',
                    // ...
                ),
                'nick2!user2@host2' => array(
                    '#channel2',
                    'user2',
                    // ...
                ),
                // ...
            ),

            // optional: time in seconds to wait between polls of feeds for new
            //           content, defaults to 300 (5 minutes)
            'interval' => 300,

            // optional: object implementing \Phergie\Irc\Plugin\React\FeedTicker\FormatterInterface
            //           used to format data from feed items prior to their syndication
            'formatter' => new DefaultFormatter(
                '%title% [ %link% ] by %authorname% at %datemodified%',
                'Y-m-d H:i:s'
            ),
        )),
    ),
);

Default Formatter

The default formatter, represented by the DefaultFormatter class, should be sufficient for most use cases. Its constructor accepts two parameters. The first is a string containing placeholders for various data from feed items. Below is a list of the supported placeholders:, (*6)

  • %authorname%
  • %authoremail%
  • %authoruri%
  • %content%
  • %datecreated%
  • %datemodified%
  • %description%
  • %id%
  • %link%
  • %links%
  • %permalink%
  • %title%
  • %commentcount%
  • %commentlink%
  • %commentfeedlink%

The second parameter is an optional string containing a date format to use when formatting the value of the %datecreated% and %datemodified% placeholders. It defaults to the ISO-8601 format., (*7)

Custom Formatters

In cases where DefaultFormatter does not meet your needs, you can create your own formatter. This is merely a class that implements FormatterInterface., (*8)

Tests

To run the unit test suite:, (*9)

curl -s https://getcomposer.org/installer | php
php composer.phar install
cd tests
../vendor/bin/phpunit

License

Released under the BSD License. See LICENSE., (*10)

The Versions

30/08 2016

dev-master

9999999-dev

Phergie plugin for syndicating data from feed items to channels or users

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

plugin bot irc phergie

27/12 2014

1.0.0

1.0.0.0

Phergie plugin for syndicating data from feed items to channels or users

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

plugin bot irc phergie