The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Followme::CreateNews - Create an index with the more recent files

SYNOPSIS

    use App::Followme::CreateNews;
    my $indexer = App::Followme::CreateNews->new($configuration);
    $indexer->run($directory);

DESCRIPTION

This package creates an index for files in the current directory that contains the text of the most recently modified files together with links to the files, It can be used to create a basic weblog. The index is built using a template. The template has Loop comments that look like

    <!-- for @loop -->
    <!-- endfor -->

and indicate the section of the template that is repeated for each file contained in the index. The following variables may be used in the template:

absolute_url

The absolute_url of the web page.

body

All the text inside the content tags in an page.

title

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 a web page.

time fields

The variables calculated from the modification time are: weekday, month, monthnum, day, year, hour24, hour, ampm, minute, and second.

CONFIGURATION

The following fields in the configuration file are used:

news_file

Name of the file containing recent news items, relative to the base directory.

news_index_file

Name of the index files to be created in each directory.

news_index_length

The number of pages to include in the index.

news_template

The path to the template file, relative to the top directory.

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>