Bryar
view release on metacpan or search on metacpan
bryar-newblog view on Meta::CPAN
<title>[% bryar.config.name | html %]</title>
<link>[% bryar.config.baseurl %]</link>
<description>[% bryar.config.description | html %]</description>
<dc:language>en-us</dc:language>
<admin:generatorAgent rdf:resource="http://bryar.multiply.org/" />
<dc:date>[%documents.first.timepiece.datetime%]-05:00</dc:date>
<items>
<rdf:Seq>
[% FOREACH item=documents %]
<rdf:li rdf:resource="[% permalink(item) %]"/>
[% END %]
</rdf:Seq>
</items>
</channel>
</rss>
EOC
write_file("template.atom", <<EOC);
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>[% bryar.config.name | html %]</title>
<subtitle>[% bryar.config.description | html %]</subtitle>
<id>[% bryar.config.baseurl %]/?format=atom</id>
<link rel="alternate" type="text/html"
href="[% bryar.config.baseurl %]/"/>
<link rel="alternate" type="application/rdf+xml" title="RSS"
href="[% bryar.config.baseurl %]/?format=xml"/>
<link rel="self" type="application/atom+xml" title="ATOM"
href="[% bryar.config.baseurl %]/?format=atom"/>
<updated>[% datetimetz(documents.first.datetime) %]</updated>
<author>
<name>[% bryar.config.author | html %]</name>
<uri>[% bryar.config.baseurl %]/</uri>
</author>
<generator uri="http://search.cpan.org/dist/Bryar/" version="3.0">Bryar</generator>
[% FOREACH item = documents %]
<entry>
<title>[% item.title | html %]</title>
<link rel="alternate" type="text/html"
href="[% permalink(item) %]"/>
[% idURL = bryar.config.baseurl | replace('http://', '') | replace('/.*', '') %]
<id>tag:[% idURL _ "," _ item.timepiece.year _ ":id_" _ item.id %]</id>
<published>[% datetimetz(item.datetime) %]</published>
<updated>[% datetimetz(item.datetime) %]</updated>
[#%
<summary type="text">[% FILTER truncate(252) %]
[% item.excerpt(bryar.config.excerpt_words) %]
[% END %]
</summary>
%]
<content type="html" xml:lang="en" xml:base="[% bryar.config.baseurl %]/">
<![CDATA[[% item.content %]]]>
</content>
</entry>
[% END %]
</feed>
EOC
write_file("calendar.tt2", <<EOC);
<table class="calendar">
<thead>
<tr class="days">
<th abbr='Sunday' scope='col' title='Sunday'>S</th>
<th abbr='Monday' scope='col' title='Monday'>M</th>
<th abbr='Tuesday' scope='col' title='Tuesday'>T</th>
<th abbr='Wednesday' scope='col' title='Wednesday'>W</th>
<th abbr='Thursday' scope='col' title='Thursday'>T</th>
<th abbr='Friday' scope='col' title='Friday'>F</th>
<th abbr='Saturday' scope='col' title='Saturday'>S</th>
</tr>
</thead>
<tbody>
[% FOREACH week = bryar.posts_calendar.calendar %]
<tr>
[% FOREACH day = week %]
<td[% IF day.sunday %] class="sunday"[% END %]>
[% '<a href="' _ bryar.config.baseurl _ '/' _ day.link _ '">' IF day.link%]
[% day.day || ' ' %][% '</a>' IF day.link %]</td>
[% END %]
</tr>
[% END %]
</tbody>
</table>
EOC
chmod 0644, $_ for ("bryar.conf", "1.txt", "head.html", "foot.html",
"template.html","template.rss", "template.atom",
"calendar.tt2", "blogmacros.tt2");
print "\nDone. Now you want to probably customize 'bryar.conf'.\n";
print "You should probably also customize template.html, head.html and foot.html\n";
print "Then point your browser at bryar.cgi, and get blogging!\n";
( run in 1.468 second using v1.01-cache-2.11-cpan-364913b4093 )