#!/usr/bin/perl
# mowyw - mowyw writes your websites - Copyright (C) 2006 Moritz Lenz
# For documentation please see the README file
#   <moritz@faui2k3.org>
#   Snail Mail address:
#       Moritz Lenz
#       Killingerstr. 92
#       91056 Erlangen
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the Artistic License 2 as published by The Perl
#   Foundation.
#
#   This program 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.

use warnings;
use strict;
use FindBin;
use lib "$FindBin::Bin/lib";
require 5.008001;
use App::Mowyw qw(get_config process_file process_dir parse_all_in_dir);

use Getopt::Long;
$App::Mowyw::config{make_behaviour} = undef;
my $result = GetOptions(
        "make"                  => \$App::Mowyw::config{make_behaviour},
        "postfix=s"             => \$App::Mowyw::config{default}{postfix},
        "includes-prefix=s"     => \$App::Mowyw::config{default}{include},
        "menu-prefix=s"         => \$App::Mowyw::config{default}{menu},
        "destination-prefix=s"  => \$App::Mowyw::config{default}{online},
        "source-prefix=s"       => \$App::Mowyw::config{default}{source},
        "encoding=s"            => \$App::Mowyw::config{encoding},
        "quiet"                 => \$App::Mowyw::config{quiet},
    );

($App::Mowyw::config{per_fn}, $Mowyw::config{file_filter}) = get_config();
#use Data::Dumper;
#print Dumper $App::Mowyw::config{file_filter};

parse_all_in_dir($App::Mowyw::config{default}{source});
__END__

=head1 NAME

mowyw - macro processor (or offline CMS) for creating static HTML pages

=head1 DESCRIPTION

For more documentation please refer to the manual page in this distribution, 
either in HTML (mowyw.1.html) or in asciidoc format (mowyw.1.txt).

=cut

# vim: sw=4 ts=4 expandtab
