App::Followme - Simple static web site maintenance
use App::Followme::ConvertPages; my $converter = App::Followme::ConvertPages->new($configuration); $converter->run();
If there are any text files in the directory, they are converted into html files by substituting the content into a template. After the conversion the original file is deleted. Along with the content, other variables are calculated from the file name and modification date. Variables in the template are surrounded by double braces, so that a link would look like:
The string which indicates a variable is configurable. The variables that are calculated for a text file are:
All the content of the text file. The content is passed through a subroutine before being stored in this variable. The subroutine takes one input, the content stored as a string, and returns it as a string containing html. The default subroutine, add_tags in this module, only surrounds paragraphs with p tags, where paragraphs are separated by a blank line. You can supply a different subroutine by changing the value of the configuration variable page_converter.
The title of the page is derived from the file name by removing the filename extension, removing any leading digits,replacing dashes with spaces, and capitalizing the first character of each word.
The variables calculated from the modification time are:
monthnum, day, year, hour24, hour, ampm, minute, and
The following parameters are used from the configuration:
If true, urls in a page will be absolute
Only convert files in current directory
The path to the template used to create a page, relative to the top directory.
The extension of files that are converted to web pages.
The extension used by web pages. The default value is html
Copyright (C) Bernie Simon.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Bernie Simon <firstname.lastname@example.org>