README for Text::Presentateur

Presentateur is a static weblog generator written in Perl. Its goal is to be as lightweight, and extensible, as possible.

Required Modules

  • YAML -- install using $ cpanm YAML
  • Text::Markdown -- install using $ cpanm Text::Markdown
  • Text::SmartyPants -- install using $ cpanm Text::SmartyPants
  • Time::ParseDate -- install using $ cpanm Time::ParseDate

The other modules (File::Basename, Getopt::Long, Date::Format) should already be installed on your system.

If you have cpan installed (comes with Xcode for Mac OS X), you can install cpanm using $ cpanm App::cpanminus. Read more...

How to Use

Presentateur is a Perl module (it is not on CPAN, though). There are many ways of installing it, but here's how I do it:

(1) Clone the repository:

$ hg clone ssh://hg@bitbucket.org/jocap/present_pl ~/path/to/present_pl

(2) In the root directory for your website, create a Perl script named present, with the following code:

#!/usr/bin/perl -w

require Text::Presentateur;
require Getopt::Long;
use strict;
use warnings;
use 5.10.1;

sub default_generate
    # ...

my $input_dir;
my $output_dir;
my $options = Getopt::Long::GetOptions
    ("input_dir=s" => \$input_dir,
    "output_dir=s" => \$output_dir);
unless (defined $input_dir and defined $output_dir)
    say "Usage: " . __FILE__ .  " -input_dir X -output-dir X";

generate_default($input_dir, $output_dir);

For an example generate_default subroutine, see my personal weblog source.

(3) In the same directory, touch generate and chmod 755 genreate. Add the following code to the same file:

perl -I ~/path/to/present_pl/ present -input_dir texts -output_dir blog

The input and output directories can be anything, including ./.

In the Future

Planned features:

  • Use of the Movable Type template system
  • Compatiblility with Movable Type plugins

In the works:

  • Programmable hooks

For more context, read "The Future of Presentateur".



The 0.1 release had have pretty much all functionality as the PHP version of Presentateur.


The first proper version of Presentateur. The codebase is revamped to allow for easier extensions. The YAML settings file is removed for the moment, in search of something better. I shall probably make it a package/module, so that you can create your own generator using the provided functions. For now, it's only extensibe by editing the source. The source is fairly simple, though, so it should be no problems converting it to the solution in the works.

This is not exactly a pomp and cermony release.

Copyright (C) 2013 John Ankarström