projects
/
blerg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7479900
)
Add titles in RSS for dumb aggregators
author
Chip Black
<bytex64@bytex64.net>
Sat, 29 Mar 2014 23:03:09 +0000
(18:03 -0500)
committer
Chip Black
<bytex64@bytex64.net>
Sat, 29 Mar 2014 23:03:09 +0000
(18:03 -0500)
rss.cgi
patch
|
blob
|
history
diff --git
a/rss.cgi
b/rss.cgi
index
3bc6172
..
3eed7e2
100755
(executable)
--- a/
rss.cgi
+++ b/
rss.cgi
@@
-108,9
+108,11
@@
HEADER
for my $i (@items) {
my $author = defined $i->{author} ? $i->{author} : $name;
my $data = xml_escape(qq{<a href="${baseurl}#$author"><strong>\@$author</strong></a><br> $i->{data}});
for my $i (@items) {
my $author = defined $i->{author} ? $i->{author} : $name;
my $data = xml_escape(qq{<a href="${baseurl}#$author"><strong>\@$author</strong></a><br> $i->{data}});
+ my $title = xml_escape(substr($i->{data}, 0, 27)) . "...";
my $post_time = strftime("%a, %d %b %Y %H:%M:%S %Z", localtime($i->{timestamp}));
print <<ITEM;
<item>
my $post_time = strftime("%a, %d %b %Y %H:%M:%S %Z", localtime($i->{timestamp}));
print <<ITEM;
<item>
+ <title>$title</title>
<pubDate>$post_time</pubDate>
<guid>${baseurl}get/$author/$i->{record}</guid>
<link>${baseurl}#$author/$i->{record}</link>
<pubDate>$post_time</pubDate>
<guid>${baseurl}get/$author/$i->{record}</guid>
<link>${baseurl}#$author/$i->{record}</link>