NAME
App::Followme::CreateIndex - Create index file for a directory
SYNOPSIS
use App::Followme::CreateIndex;
my $indexer = App::Followme::CreateIndex->new($configuration);
$indexer->run($directory);
DESCRIPTION
This package builds an index for a directory containing links to all the files contained in it with the specified extensions. The variables described below are substituted into a template to produce the index. Loop comments that look like
<!-- for @loop -->
<!-- endfor -->
indicate the section of the template that is repeated for each file contained in the index.
- absolute_url
-
The absolute_url of the web page.
- body
-
If a file is a web (html) file, the body is all the text inside the content tags in an page.
- title
-
If the file is a web (html) file, the title is the text contained in the header tags at the top of the page. if not, 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.
- url
-
The relative url of each file.
- time fields
-
The variables calculated from the modification time are:
weekday, month,
monthnum, day, year, hour24, hour, ampm, minute,
andsecond.
CONFIGURATION
The following fields in the configuration file are used:
- index_file
-
Name of the index file to be created
- index_include
-
A comma separated list of filename patterns used to create the index
- index_template
-
The name of the template file. The template file is either in the same directory as the configuration file used to invoke this method, or if not there, in the templates subdirectory.
LICENSE
Copyright (C) Bernie Simon.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Bernie Simon <bernie.simon@gmail.com>