PPF Home
Plugins
Developers
   Font size:      

Feed Reader (v1.0)

PDF
PDF

A plugin for PPF to display news from RSS/Atom feeds.

The plugin fetches RSS/Atom Feeds from the web and announces them in channels. Highly configurable.

Configuration

The configuration file for this plugin is system/FeedReader/FeedReaderConfig.xml

channel

One or more channels, to which new items are sent to.

Optional, if omitted news is not announced automatically.
Can be overridden by per-channel settings.


      <channel>#deaded</channel>
      <channel>#joe-dalton</channel>

    

feeds/feed

List of the monitored feeds.

Feed Attributes.

  • xmlUrl required, URL of the feed
  • shortcut optional, for !news command
  • updateFrequency optional, override default updateFrequency
  • channels optional, override default channel list, separators: space, tab, comma, semicolon
  • format optional, override default format, see below

      <feeds>
	    <feed shortcut="deaded" xmlUrl="http://www.deaded.com/backend/deaded.rdf"/>
	    <feed shortcut="jawe" xmlUrl="http://blog.jawe.net/blog/?flavor=rss2"
	            updateFrequency="7200"
	            channels="#joe-dalton"
	            format="-[ $feedTitle | $BOLD$title$BOLD | $DARK_GREEN$link$DARK_GREEN | $dateTime ]-"/>
	</feeds>

      

updateFrequency

Default update frequency in seconds.

Do not set this too low or you'll annoy the webmasters.
Optional, defaults to 3600 (1h) if omitted
Can be overridden by per-channel settings.


    <updateFrequency>3600</updateFrequency>

    

delay

Delay before fetching starts and between initial fetches in seconds.

Optional, defaults to 60 (1m)


    <delay>60</delay>

    

displayOnStartup

Number of items per feed to display on startup.

Optional, defaults to 0


    <displayOnStartup>0</displayOnStartup>

    

display

Maximum number of new items displayed per retrieval.

Optional, defaults to 5


    <display>5</display>

    

format

Format for displayed news entries.

May contain the following variables:
$feedTitle, $feedLink, $feedAuthor, $feedDate, $feedDateTime, $feedTime, $author, $title, $link, $date, $dateTime, $time, $shortcut $BLUE, $BOLD, $BROWN, $CYAN, $DARK_BLUE, $DARK_GRAY, $DARK_GREEN, $GREEN, $LIGHT_GRAY, $MAGENTA, $NORMAL, $OLIVE, $PURPLE, $RED, $REVERSE, $TEAL, $UNDERLINE, $WHITE, $YELLOW.

Note that a feed may omit some variables, if so the variable will be replaced with an empty string..
Optional, defaults to optional, defaults to: $feedTitle: $BOLD$title$BOLD -> $BLUE$UNDERLINE$link$BLUE


    <format>$feedTitle: $BOLD$title$BOLD -&gt; $BLUE$UNDERLINE$link</format>

    

commandNews

Public command to display latest news.

If called without parameters, it shows a usage message.
Optional, defaults to !news


    <commandNews>!news</commandNews>

    

displayNews

Number of items displayed when commandNews is issued.

Optional, defaults to 5


    <displayNews>5</displayNews>

    

displayNewsMax

Max. number of entries displayed when commandNews is issued with a count parameter

Optional, defaults to 10


    <displayNewsMax>10</displayNewsMax>

    

commandFeeds

Public command to list available feed shortcuts.

Optional, defaults to !feeds


    <commandFeeds>!feeds</commandFeeds>

    

authLevel

Min. auth level to edit subscriptions.

This affects the commands !subscribe and !unsubscribe.
Possible values (case insensitive): NONE, ANY, TRUSTED, MASTER, ADMIN.


    <authLevel>ADMIN</authLevel>

    

commandSubscribe

Command to add a feed. (authorized users only, see authLevel)

If called without parameters, it shows a usage message.
Optional, defaults to !subscribe


    <commandSubscribe>!subscribe</commandSubscribe>

    

commandUnsubscribe

Command to remove a feed (authorized users only, see authLevel)

If called without parameters, it shows a usage message.
Optional, defaults to !unsubscribe


    <commandUnsubscribe>!unsubscribe</commandUnsubscribe>

    

commandFeedinfo

Command to display information about a feed (authorized users only, see authLevel)

If called without parameters, it shows a usage message.
Optional, defaults to !feedinfo


    <commandFeedinfo>!feedinfo</commandFeedinfo>

    

Commands

Displaying new entries

Command: !news <shortcut> [count] [start]
Description: Displays entries from a feed.
Auth Level: none
Where to give command: channel or private message
Outputs to: notice to sender
Example(s):

  • !news
  • !news bbcworld

Displaying feed shortcuts

Command: !feeds
Description: Displays available feed shortcuts.
Auth Level: none
Where to give command: channel or private message
Outputs to: notice to sender
Example(s):

  • !feeds

Subscribing to or editing feeds

Command: !subscribe [-u URL] [-s shortcut] [-c channels] [-p updateFrequency] [-f format]
Description: Subscribe to a feed. If a feed with this url already exists, it's subscription properties are updated.
Auth Level: ADMIN
Where to give command: channel or private message
Outputs to: notice to sender
Example(s):

  • !subscribe
  • !subscribe -u http://www.deaded.com/backend/deaded.rdf
  • !subscribe -s deaded -u http://www.deaded.com/backend/deaded.rdf
  • !subscribe -s deaded -f "$dateTime: $BOLDfeedTitle$BOLD $title [$link]

Unubscribing from feeds

Command: !unsubscribe (URL|shortcut)
Description: Unsubscribe from a feed
Auth Level: ADMIN
Where to give command: channel or private message
Outputs to: notice to sender
Example(s):

  • !unsubscribe
  • !unsubscribe http://www.deaded.com/backend/deaded.rdf
  • !unsubscribe deaded

Displaying feed information

Command: !feedinfo shortcut
Description: Display feed information
Auth Level: ADMIN
Where to give command: channel or private message
Outputs to: notice to sender
Example(s):

  • !feedinfo
  • !feedinfo deaded

Announcing new entries

Command: !announce <shortcut> [count] [start]
Description: announces entries from a feed in the current channel.
Auth Level: ADMIN
Where to give command: channel
Outputs to: channel
Example(s):

  • !announce deaded
  • !announce bbcworld 1
  • !announce wired 1 9

Change History

v1.0 Updated the Rome libraries to 0.9
v1.0beta6 First Version by jawe