Apache-Blog
    
    
  
  
  
view release on metacpan or search on metacpan
        # make UL lists work (perhaps)
	# there's bound to be a better way of doing this
        $text =~ s/^(\s*)\* (.*)$/$1<li>$2<\/li>/mg;
        if ($text =~ /<li>/) {
                $text =~ s/<li>/<ul><li>/;
                $text = reverse $text;
                $text =~ s/>il\/</>lu\/<>il\/</;
                $text = reverse $text;
        } # end it
 
        # bold?
        $text =~ s/\*([^*]+)\*/<b>$1<\/b>/g;	
	# blank lines -> <p>
	$text =~ s/^\s*$/\n<p>\n/mg;
	return $text;
} # end entry
# gets all of the entries in a directory
  Short Title
  Thu Jun 20 17:24:52 BST 2002
  The entry down here.
The date can be in any format that Date::Manip likes. In vim I do :r!date
to add the date line.
Apache::Blog does some simple manipulation on the text. It will turn
lines which start with a * into bullet lists, and blank lines are turned
into <p> tags. You can also *bold* text. It doesn't highlight links or
anything. A more sophisticated text->html converter may be included in
the future.
The module can also allow comments on entries, for this to work properly
the webserver must have write access to the directory containing your
entries.
Entry filenames can be anything you like, as long as it doesn't end in
.html or start with a period. I generally go with filenames like "2002-06-20"
( run in 0.345 second using v1.01-cache-2.11-cpan-c333fce770f )