=pod =head1 NAME App::WRT - WRiting Tool, a static site generator and related utilities =for HTML =head1 SYNOPSIS $ wrt display 2016 > 2016.html Or: $ wrt render Or: #!/usr/bin/env perl use App::WRT; my $w = App::WRT->new( entry_dir => 'archives', url_root => '/', # etc. ); print $w->display(@ARGV); =head1 INSTALLING It's possible this may run on a Perl as old as 5.10.0, although in practice I imagine that at least some of its dependencies have more recent requirements. In practice, I know that it works under 5.20.2. It should work on any reasonably modern Linux distribution, and may also be fine on MacOS or a BSD of your choosing. $ perl Build.PL $ ./Build installdeps $ ./Build test $ ./Build install =head1 DESCRIPTION This started life as C, a simple script to concatenate fragments of handwritten HTML by date. It has since haphazardly accumulated several of the usual weblog features (lightweight markup, feed generation, embedded Perl, poetry tools, image galleries, and ill-advised dependencies), but the basic idea hasn't changed that much. The C utility now generates static HTML files, instead of expecting to run as a CGI script. This is a better idea, for the most part. The C module will work with FastCGI, if called from the appropriate wrapper script, such as C. By default, entries are stored in a simple directory tree under C. Like: archives/2001/1/1 archives/2001/1/1/sub_entry It is possible (although not as flexible as it ought to be) to redefine the directory layout. More about this after a bit. An entry may be either a plain text file, or a directory containing several files. If it's a directory, a file named "index" will be treated as the text of the entry, and all other lower-case filenames without extensions will be treated as sub-entries or documents within that entry, and displayed accordingly. Links to certain other filetypes will be displayed as well. Directories may be nested to an arbitrary depth, although it's probably not a good idea to go very deep with the current display logic. A PNG or JPEG file with a name like 2001/1/1.icon.png 2001/1/1/index.icon.png 2001/1/1/whatever.icon.png 2001/1/1/whatever/index.icon.png will be treated as an icon for the appropriate entry file. =head2 MARKUP Entries may consist of hand-written HTML (to be passed along without further interpretation), a supported form of lightweight markup, or some combination thereof. Actually, an entry may consist of any darn thing you please, as long as Perl will agree that it is text, but presumably you're going to be feeding this to a browser. Special markup is indicated by a variety of HTML-like container tags. B - evaluated and replaced by whatever value you return (evaluated in a scalar context): my $dog = "Ralph."; return $dog; This code is evaluated before any other processing is done, so you can return any other markup understood by the script and have it handled appropriately. B - actually keys to the hash underlying the App::WRT object, for the moment: $self->title("About Ralph, My Dog"); return '';

The title is ${title}.

This will change. Embedded code and variables are intended for use in the F