Aaron Straup Cope > MT-Import-Mbox-Importer > MT::Import::Mbox::Importer

Download:
MT-Import-Mbox-Importer-1.0.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 1.0   Source  

NAME ^

MT::Import::Mbox::Importer - wrapper class for importing a collection of mbox folders using MT::Import::Mbox.

SYNOPSIS ^

 use MT::Import::Config::Importer;

 my $mt = MT::Import::Mbox::Importer->new("/path/to/config");
 $mt->collect();

 # You can also do this :

 my $cfg = Config::Simple->new(...);
 my $mt = MT::Import::Mbox::Importer->new($cfg);
 $mt->collect();

DESCRIPTION ^

This is a wrapper class for importing a collection of mbox folders into Movable Type using MT::Import::Mbox.

IMPORTANT ^

You should really familiarize yourself with MT::Import::Mbox before going any further.

REALLY IMPORTANT ^

This package relies on a very particular archiving pattern for email messages : Individual messages stored in a series of nested folders labeled by year (YYYY), month (MM) and day (DD).

This is not a feature.

It just happens to be the way that I store my email. If you want to buy me a beer sometime we can talk about why. The short version is that I wrote this package as a personal helper module for using MT::Import::Mbox.

Aside from bug fixes the top of the TO DO list for this package is to provide a way for users to define a custom "match" criteria to identify mbox files. I am hoping to do this using Regexp::English so that custom patterns can be added to the config file. Forcing users to write their own callback functions is not an ideal solution.

One problem with allowing custom matches is how this would work with date filtering, via the period option (see below). Checking the last modified time on inidividual mboxes is a possibility but error-prone, to say the least.

Suggestions and patches are welcome.

OPTIONS ^

Options are passed to MT::Import::Mbox::Importer using a Config::Simple object or a valid Config::Simple config file. Options are grouped by "block".

importer

mbox

mt

email

OBJECT METHODS ^

$obj->collect()

Returns true or false.

$obj->verbose($bool)

Returns true or false, indicating whether or not debug events would be logged.

$obj->log()

Returns a Log::Dispatch object.

VERSION ^

1.0

DATE ^

$Date: 2005/12/02 05:28:38 $

AUTHOR ^

Aaron Straup Cope <ascope@cpan.org>

SEE ALSO ^

MT::Import::Mbox

BUGS ^

Entirely possible. This package has not been tested on a Windows box. Please report all bugs via :

http://rt.cpan.org

LICENSE ^

Copyright (c) 2005 Aaron Straup Cope. All rights reserved.

This is free software, you may use it and distribute it under the same terms as Perl itself.