前回のエントリ について、それ SmartFeed でできるよ、と宮川さんに教えて頂きました。こんな感じで。
- module: CustomFeed::AmazonWebService
config:
title: Amazon - New Books
developer_token: XXXXXXXXXXXXXXXXXXXX
associate_id: xxxxxx-22
keywords:
- 川原正敏
- module: SmartFeed
rule:
module: Ahead
config:
title: Amazon - New Books
- module: Publish::iCal
config:
dir: /home/miya/ical
filename: %t.ics
rule:
expression: $args->{feed}->id ne 'smartfeed:ahead'
- module: Publish::Gmail
config:
mailto: xxx@gmail.com
mailfrom: xxx@mizzy.org
mailroute:
via: smtp
host: localhost
rule:
expression: $args->{feed}->id eq 'smartfeed:ahead'
というわけで、Filter::Rule の改造も、Filter::CloneFeed の存在もまったく必要なし、でした。Rule::Ahead には若干手を加えました 。
今まで SmartFeed が全然理解できていなかったのですが、Filter::Rule の DESCRIPTION に以下の様な記述がある、ということも教えて頂きました。
DESCRIPTION
This module strips entries and feeds using Rules. It's
sort of like SmartFeed, but while SmartFeed creates new
feed using Rule, Filter::Rule strips entries and feeds
that don't match with Rules.
「Filter::Rule は Rule に基づいてフィード/エントリをフィルタリングする(元フィード自体に手を加える)、SmartFeed は 指定された Rule に基づいて新しくフィードを生成する(元フィードには手を加えない)」ってことですね。
追記
宮川さんがこちらに書いてくださってましたね。ありがとうございます!