forked from bentglasstube/blosxom-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrss10-v2i0b4
136 lines (90 loc) · 3.27 KB
/
rss10-v2i0b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Blosxom Plugin: rss10
# Author(s): Rael Dornfest <[email protected]>
# Version: 2.0b4
# Documentation: See the bottom of this file or type: perldoc rss10
package rss10;
# --- Configurable variables -----
# What is your full name?
$creator = 'John Jacob Jingleheimer Schmidt';
# What is your email address?
$email = 'jjjs@example';
# What is your timezone's offset from GMT?
$tz_offset = "-08:00"; #PST
# What placeholder in your flavour tempalte should I replace with <items />?
my $template_placeholder = "{{{items}}}";
# What is your TrackBack implementation's URL (if any)?
#$trackback_url = "$blosxom::url/tb.cgi";
# --- Plug-in package variables -----
$items;
$body;
$trackback_ping;
$generatorAgent = "http://www.raelity.org/apps/blosxom/?v=$blosxom::version";
$T = 'T';
$colon = ":";
# --------------------------------
use FileHandle;
my $fh = new FileHandle;
sub start {
1;
}
sub head {
$items = '';
}
sub story {
my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
$body = $$body_ref;
$trackback_ping = $trackback_url ? qq{<trackback:ping rdf:resource="$trackback_url$path/$filename" />} : '';
$items .= qq{ <rdf:li rdf:resource="$blosxom::url$path/$filename.html" />\n};
1;
}
sub foot {
my($pkg, $currentdir, $foot_ref) = @_;
$items = <<"ITEMS";
<items>
<rdf:Seq>
$items
</rdf:Seq>
</items>
ITEMS
$blosxom::output =~ s/$template_placeholder/$items/m;
return 1;
}
1;
__END__
=head1 NAME
Blosxom Plug-in: rss10
=head1 SYNOPSIS
Purpose: Provides the extra bit of programming needed to produce a valid
RSS 1.0 [http://www.purl.org/rss/1.0/] feed for syndication. Works
in concert with the associated {head,story,foot,content_type,date}.rss10
flavour files.
=head1 VERSION
2.0b1
Version number coincides with the version of Blosxom with which the
current version was first bundled.
=head1 AUTHOR
Rael Dornfest <[email protected]>, http://www.raelity.org/
=head1 SEE ALSO
Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/
Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml
=head1 BUGS
Address bug reports and comments to the Blosxom mailing list
[http://www.yahoogroups.com/group/blosxom].
=head1 LICENSE
Blosxom and this Blosxom Plug-in
Copyright 2003, Rael Dornfest
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.