Newcomen

Description A static content generator.
Newcomen > Perl Modules > Newcomen::Plugin::Blog::Crawler
Source

Index


NAME ^

Newcomen::Plugin::Blog::Crawler - Filesystem crawler for the blog plugins.

DESCRIPTION ^

This plugin provides the crawler for the blog plugins. It will create Newcomen::Source instances for all files matching the configured pattern found in the configured data directories. See below for the configuration options and their defaults.

Sources

Please see Newcomen::Role::Crawler::Filesystem for the properties of the source items created. The sources' creator ID will be set to 'Blog::Crawler'.

OPTIONS ^

{
   'blog'        => {
      'crawler'  => {
         'dirs'  => undef,
         'match' => undef,
      },
   },
}

These are the default options set by the plugin, they may be overridden by user configuration.

blog/crawler/dirs must either be a single string specifying one directory, or an arrayref of strings specifying zero or more directories in which to look for data sources. Directory names must be relative to the project's root. If this is undef (the default), it will be set to an empty arrayref (and no sources will be created).

blog/crawler/match must be a string, it will be used in a regular expression and must match the path of the source file relative to the project's root directory. Setting this to undef (the default) means no files will be included.

Note: For a file to be included, not only must it match the regular expression, it must also pass Perl's file tests -f and -T, the latter one being a test for text files. Also note that empty files will not be filtered out at this point.

META DATA ^

Sources

The source items created by this plugin will include all the information set by the Newcomen::Role::Crawler::Filesystem role. No additional data will be added.

HOOKS ^

This plugin implements the hook_crawl() hook (default priority).

SEE ALSO ^

Newcomen::Role::Crawler::Filesystem, Newcomen::Source

VERSION ^

This is version 2014052501.

AUTHOR ^

Stefan Goebel - newcomen {at} subtype {dot} de

COPYRIGHT AND LICENSE ^

Copyright 2013-2014 Stefan Goebel.

This file is part of Newcomen.

Newcomen is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the license, or (at your option) any later version.

Newcomen is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Newcomen. If not, see <http://www.gnu.org/licenses/>.