Blog/Simple version 0.01 ======================== NAME Blog::Simple - Perl extension for the creation of a simple weblog (blogger) system. SYNOPSIS use Blog::Simple; my $sbO = Blog::Simple->new(); $sbO->create_index(); #generally only needs to be called once my $content="
blah blah blah in XHTMthe p entry elsewhere in this document
Better when done in XHTMthe p entry elsewhere in this
document"; my $title = 'some title'; my $author = 'a.n. author'; my
$email = 'anaouthor@somedomain.net'; my $smmry = 'blah blah';
$sbO->add($title,$author,$email,$smmry,$content);
$sbO->render_current('blog_test.xsl',3);
$sbO->render_all('blog_test.xsl');
$sbO->remove('08');
DESCRIPTION
This module provides a simple mechanism for blogging, the reverse
chronological diary-like systems so popular on the Internet today. It
was intended to be simple, and just handles the basics of blogging:
managing blog entries (adding, removing -- there probably should be a
'modify,' but there isn't), generating the most recent *n* entries, and
generating all of the entries in the 'blogbase'.
Blog::Simple requires that the XML::XSL module be installed. Rather than
try and do the rendering itself, it passes the XML that it generates to
an XSL file that the user creates. So you will need to know XSLT to
really find this module useful.
Blog::Simple generates XML files and stores them in a blogbase and in a
timestamped subfolder. The blogbase consists of a folder under the path
you specify in your code called b_base and a file called bb.idx. If no
path is given, then it uses the directory the calling Perl file is saved
in. bb.idx contains a tab-delimited list of the path, datestamp, title,
author, summary of each blog entry. The Blog::Simple generated XML files
are stored underneath b_base in automatically generated timestamped
folders.
The XML entry for a blog is rendered as follows (this XML template is
hardcoded in the "add()" method):