diff -x {arch} -x .arch-ids -Nur ikiwiki--upstream--1.0--patch-26/IkiWiki/Plugin/inline.pm ikiwiki--devo--1.0--patch-9/IkiWiki/Plugin/inline.pm
--- ikiwiki--upstream--1.0--patch-26/IkiWiki/Plugin/inline.pm 2006-09-17 16:08:18.969109484 -0400
+++ ikiwiki--devo--1.0--patch-9/IkiWiki/Plugin/inline.pm 2006-09-16 13:38:36.336193934 -0400
@@ -26,6 +26,7 @@
my %toping;
my %rsslinks;
+my %atomlinks;
sub yesno ($) { #{{{
my $val=shift;
@@ -41,6 +42,7 @@
my $raw=yesno($params{raw});
my $archive=yesno($params{archive});
my $rss=exists $params{rss} ? yesno($params{rss}) : 1;
@@ -67,6 +69,7 @@
add_depends($params{page}, $params{pages});
my $rssurl=rsspage(basename($params{page}));
@@ -77,6 +80,9 @@
if ($config{rss}) {
$formtemplate->param(rssurl => $rssurl);
}
@@ -85,6 +91,12 @@
$linktemplate->param(rssurl => $rssurl);
$ret.=$linktemplate->output;
}
-
elsif ($config{atom} && $atom) {
-
# Add a Atom link button.
-
my $linktemplate=template("atomlink.tmpl", blind_cache => 1);
-
$linktemplate->param(atomurl => $atomurl);
-
$ret.=$linktemplate->output;
-
}
my $template=template(
($archive ? "inlinepagetitle.tmpl" : "inlinepage.tmpl"),
@@ -149,10 +161,16 @@
# only supports listing one file per page.
if ($config{rss} && $rss) {
writefile(rsspage($params{page}), $config{destdir},
-
genfeed("rss", $rssurl, $desc, $params{page}, @list));
$toping{$params{page}}=1 unless $config{rebuild};
$rsslinks{$params{destpage}}=qq{<link rel="alternate" type="application/rss+xml" title="RSS" href="$rssurl" />};
}
-
if ($config{atom} && $atom) {
-
writefile(atompage($params{page}), $config{destdir},
-
genfeed("atom", $atomurl, $desc, $params{page}, @list));
-
$toping{$params{page}}=1 unless $config{rebuild};
-
$atomlinks{$params{destpage}}=qq{<link rel="alternate" type="application/atom+xml" title="Atom" href="$atomurl" />};
-
}
return $ret;
} #}}}
@@ -164,6 +182,8 @@
$template->param(rsslink => $rsslinks{$page})
if exists $rsslinks{$page} && $template->query(name => "rsslink");
} #}}}
sub get_inline_content ($$) { #{{{
@@ -195,6 +215,17 @@
return $ret;
} #}}}
+sub date_3339 ($) { #{{{
-
my $time=shift;
-
eval q{use POSIX};
-
my $lc_time= POSIX::setlocale(&POSIX::LC_TIME);
-
POSIX::setlocale(&POSIX::LC_TIME, "C");
-
my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", localtime($time));
-
POSIX::setlocale(&POSIX::LC_TIME, $lc_time);
-
return $ret;
+} #}}}
+
sub absolute_urls ($$) { #{{{
# sucky sub because rss sucks
my $content=shift;
@@ -213,15 +244,24 @@
return $page.".rss";
} #}}}
-sub genrss ($$@) { #{{{
+sub atompage ($) { #{{{
-
my $page=shift;
-
return $page.".atom";
+} #}}}
+
+sub genfeed ($$$$@) { #{{{
-
my $itemtemplate=template($feedtype."item.tmpl", blind_cache => 1);
my $content="";
-
my $lasttime;
foreach my $p (@pages) {
next unless exists $renderedfiles{$p};
@@ -232,6 +272,7 @@
url => $u,
permalink => $u,
pubdate => date_822($pagectime{$p}),
-
atompubdate => date_3339($pagectime{$p}),
content => absolute_urls(get_inline_content($p, $page), $url),
);
run_hooks(pagetemplate => sub {
@@ -241,15 +282,19 @@
$content.=$itemtemplate->output;
$itemtemplate->clear_params;
-
my $template=template($feedtype."page.tmpl", blind_cache => 1);
$template->param(
title => $config{wikiname},
wikiname => $config{wikiname},
pageurl => $url,
content => $content,
rssdesc => $desc,
-
feeddate => date_3339($lasttime),
-
feedurl => $feedurl,
);
run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page,
diff -x {arch} -x .arch-ids -Nur ikiwiki--upstream--1.0--patch-26/templates/atomitem.tmpl ikiwiki--devo--1.0--patch-9/templates/atomitem.tmpl
--- ikiwiki--upstream--1.0--patch-26/templates/atomitem.tmpl 1969-12-31 19:00:00.000000000 -0500
+++ ikiwiki--devo--1.0--patch-9/templates/atomitem.tmpl 2006-09-16 02:56:56.075533012 -0400
@@ -0,0 +1,20 @@
+
-
<title><TMPL_VAR TITLE ESCAPE=HTML></title>
-
<TMPL_IF NAME="AUTHOR">
-
<author><TMPL_VAR AUTHOR ESCAPE=HTML></author>
-
<TMPL_ELSE>
-
</TMPL_IF>
-
<id><TMPL_VAR URL></id>
-
<link href="<TMPL_VAR PERMALINK>"/>
-
<TMPL_IF NAME="CATEGORIES">
-
<TMPL_LOOP NAME="CATEGORIES">
-
<category><TMPL_VAR CATEGORY></category>
-
</TMPL_LOOP>
-
</TMPL_IF>
-
<updated><TMPL_VAR ATOMPUBDATE></updated>
-
<content type="xhtml" xml:lang="en">
-
<div xmlns="http://www.w3.org/1999/xhtml">
-
![CDATA[<TMPL_VAR CONTENT>]]
-
</div>
-
</content>
+
diff -x {arch} -x .arch-ids -Nur ikiwiki--upstream--1.0--patch-26/templates/atomlink.tmpl ikiwiki--devo--1.0--patch-9/templates/atomlink.tmpl
--- ikiwiki--upstream--1.0--patch-26/templates/atomlink.tmpl 1969-12-31 19:00:00.000000000 -0500
+++ ikiwiki--devo--1.0--patch-9/templates/atomlink.tmpl 2006-09-16 02:56:56.079533423 -0400
@@ -0,0 +1,5 @@
+
+<TMPL_IF NAME="ATOMURL">
+Atom
+</TMPL_IF>
+
diff -x {arch} -x .arch-ids -Nur ikiwiki--upstream--1.0--patch-26/templates/atompage.tmpl ikiwiki--devo--1.0--patch-9/templates/atompage.tmpl
--- ikiwiki--upstream--1.0--patch-26/templates/atompage.tmpl 1969-12-31 19:00:00.000000000 -0500
+++ ikiwiki--devo--1.0--patch-9/templates/atompage.tmpl 2006-09-16 02:56:56.079533423 -0400
@@ -0,0 +1,15 @@
+
+
+
-
-
-
-
- John Doe
-
- <TMPL_VAR PAGEURL>
- <TMPL_VAR RSSDESC ESCAPE=HTML>
- ikiwiki
- <TMPL_VAR FEEDDATE>
+<TMPL_VAR CONTENT>
+
|