2006-04-28
Plagger::Plugin::SmartFeed.pmにlink属性を付ける
--- SmartFeed.pm.orig Fri Apr 28 10:24:11 2006
+++ SmartFeed.pm Fri Apr 28 10:26:49 2006
@@ -23,6 +23,7 @@
$feed->type('smartfeed');
$feed->id( $self->conf->{id} || ('smartfeed:' . $self->rule->id) );
$feed->title( $self->conf->{title} || "Entries " . $self->rule->as_title );
+ $feed->link( $self->conf->{link} );
$self->{feed} = $feed;
}
んで
- module: SmartFeed
rule:
expression: $args->{entry}->link =~ m|http://pcweb\.mycom\.co\.jp/series/\w+/\d+/|
config:
id: series
title: 【連載】 (MYCOM PC WEB)
link: http://pcweb.mycom.co.jp/top/series/
- module: SmartFeed
rule:
expression: $args->{entry}->link =~ m|http://pcweb\.mycom\.co\.jp/column/osx/\d+/|
config:
id: osx
title: 【コラム】 OS Xハッキング! (MYCOM PC WEB)
link: http://pcweb.mycom.co.jp/column/osx/
- module: SmartFeed
rule:
expression: $args->{entry}->link =~ m|http://pcweb\.mycom\.co\.jp/news/\d{4}/\d\d/\d\d/\d+\.html|
config:
id: news
title: NEWS (MYCOM PC WEB)
link: http://pcweb.mycom.co.jp/general/
こんな感じでlinkを指定すると
<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://purl.org/atom/ns#"> <title xmlns="http://purl.org/atom/ns#">NEWS (MYCOM PC WEB)</title> <link xmlns="http://purl.org/atom/ns#" type="text/html" rel="alternate" href="http://pcweb.mycom.co.jp/general/"/>
という風にAtomフィードのlink属性が付く。
コメント
トラックバック - http://subtech.g.hatena.ne.jp/otsune/20060428
