| Plagger documentation | Contained in the Plagger distribution. |
Plagger::Plugin::Filter::BreakEntriesToFeeds - 1 entry = 1 feed
- module: Filter::BreakEntriesToFeeds
This plugin breaks all the updated entries into a single feed. This is a bit hackish plugin but allows things like sending a single mail containing single entry, rather than a feed containing multiple entries, with Publish::Gmail plugin.
Use entry's title as a newly generated feed title. Defaults to 0.
Tatsuhiko Miyagawa
| Plagger documentation | Contained in the Plagger distribution. |
package Plagger::Plugin::Filter::BreakEntriesToFeeds; use strict; use base qw( Plagger::Plugin ); sub register { my($self, $context) = @_; $context->register_hook( $self, 'update.feed.fixup' => \&break, ); } sub break { my($self, $context, $args) = @_; for my $entry ($args->{feed}->entries) { my $feed = $args->{feed}->clone; $feed->clear_entries; $feed->add_entry($entry); $feed->title($entry->title) if $self->conf->{use_entry_title}; $context->update->add($feed); } $context->update->delete_feed($args->{feed}); } 1; __END__