Moray: RSS Feed Remixer
Filter - Aggregate - Republish
Moray is a free add-on script which uses CaRP and Grouper Evolution to filter and aggregate RSS feeds, and republish the results in a single RSS feed. Moray requires Grouper Evolution, but can use any version of CaRP. CaRP Koi or CaRP Evolution is recommended, because with the free version of CaRP, the resulting feeds will not have date and author elements.Download
Tar/GZip archiveZIP archive
StuffIt archive
Important Notes
• Ethics: When republishing others' material, please consider the following:
• You may wish to obtain permission from the original publisher.
• Unless you have permission to the contrary from the original publisher, you should always publish proper source attribution. By default, Moray publishes a link to the source at the end of the description in each item.
• Be sure that MorayConf.php and your copies of sample_conf.php do not contain anything (no spaces, no linebreaks, etc.)
before the opening "<?php" or after the closing "?>".
Otherwise, the output may contain error messages which will break the feed.
In case you're interested, this is because Grouper sets the "Content-Type" HTTP header.
If any text appears outside of the PHP code in these files, it will be output before Grouper sends the header,
which will result in an error when Grouper sends the header.• Unless you have permission to the contrary from the original publisher, you should always publish proper source attribution. By default, Moray publishes a link to the source at the end of the description in each item.
Unimportant Note ;-)
Why "Moray"?Because moray eels eat young grouper, and Moray eats RSS feeds, which is what Grouper outputs. Moray eels also eat other moray eels...
IMPORTANT NOTE
If you wish to aggregate multiple feeds only for display on your website, but do not need to publish the aggregation in RSS format (to enable subscription to it in a RSS feed reader), you do not need Moray. CaRP is able to aggregate multiple feeds and convert the results to HTML for display on a website without any help from Grouper or Moray.Installation & Usage
- Download and unpack the archive. All of the archives have the same contents.
- Edit MorayConf.php, entering the locations of your CaRP and Grouper installations, and the URL where you intend to upload MorayAggregate.php.
- Upload Moray.php, MorayAggregate.php and MorayConf.php to your webserver, keeping them all in the same directory.
- Create a subdirectory named "conf" inside the directory where you uploaded the files.
- For each set of feeds that you wish to aggregate, make a copy of sample_conf.php and edit the settings as desired.
- Make sure that the names of your copies of sample_conf.php contain only numbers, letters, periods, minus signs and underscores, and that each ends with ".php".
- Upload the copies of sample_conf.php to the conf directory.
- Access the aggregated feeds with a URL like "http://www.example.com/moray/Moray.php?conf=conf-file-name",
where "conf-file-name" is the name of one of your copies of sample_conf.php without the ".php".
For example, if one of you files in named "tech-feeds.php" and Moray.php can be found at "http://www.example.com/moray/Moray.php",
the URL would be "http://www.example.com/moray/Moray.php?conf=tech-feeds".
Alternatively, you may create a PHP file with contents like the following, and use the URL of that file to access the feed:
<?php
$conf='tech-feeds';
include '/your/path/to/Moray.php';
?>
Configuration
In MorayConf.php:- "encoding" sets the character set used in the resulting feed. It must be one of "UTF-8", "ISO-8859-1" and "US-ASCII".
- "cacheinterval" controls the "cacheinterval" setting for Grouper--not for CaRP.
It specifies the number of minutes to cache the Moray's output feed.
To control the number of minutes to cache each of the source feeds,
add code like this in the "case 2" section of your copy of sample_conf.php:
CarpConf('cacheinterval',30);
- The "case 1" section is used during the phase where Grouper is converting the aggregated feed data to RSS. If you want to override any of Grouper's configuration settings, that is the place to do it.
- The "case 2" section is used during the phase where CaRP is filtering and aggregating the feeds.
- $feedconf contains the data that will go into the "channel" section of your remixed feed.
If any of the values you enter contain apostropies (single quotes), be sure to precede them with a backslah character.
For example, if you feed's title will be "Joe's Feed", the "feed-title" setting should look like this:
'feed-title'=>'Joe\'s Feed'.
Alternatively, you may change the quote marks surrounding the title to double quote marks (as long as there are no double quote marks in the title, in which case they would need to be preceded by a backslash), like this:
'feed-title'=>"Joe's Feed". - $feeds is a list of feeds and cache file names to use for them. See the documentation for CarpGroupFilter for details. NOTE: Each of the items in all of the feeds must have a description element of the results will be unpredictable.
- In the section marked "// Add any desired filtering code here", you may enter filtering code as described in the documentation for CaRP's filterin and filterout configuration settings, or if you have CaRP Evolution, code to use the Filter plugin. You may also enter other CaRP configuration code here, such as setting the cacheinterval as described above, changing the descriptiontags setting, etc. Note that MorayAggregate.php sets some of CaRP's configuration settings, and will override any changes you make to the same settings.
- $feedconf contains the data that will go into the "channel" section of your remixed feed.
If any of the values you enter contain apostropies (single quotes), be sure to precede them with a backslah character.
For example, if you feed's title will be "Joe's Feed", the "feed-title" setting should look like this:
Moray is no longer available
As of version 4.0, CaRP Evolution can perform the function of Moray by itself, and is much easier to use, so Moray is no longer available.Use CaRP Evolution's RSS 2.0 theme to generate RSS feed mashups.