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

Download:
MT-Import-Mbox-1.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.01   Source  

NAME ^

MT::Import::Mbox - import one or more mbox messages in to a Movable Type weblog

SYNOPSIS ^

 use strict;
 use MT::Import::Mbox;

 my $cfg = Config::Simple->new("/path/to/mbox.cfg");
 my $mt = MT::Import::Mbox->new($cfg);
 $mt->verbose(1);

 $mt->import_mbox("/path/to/mbox");
 $mt->rebuild();

DESCRIPTION ^

Import one or more mbox messages in to a Movable Type weblog.

MOTIVATION ^

I keep my email in a dated (YYYY/MM/DD) space. In a world where every other way of organizing email messages kind of sucks, this one doesn't necessarily suck any less but at least it's consistent.

The downside to doing things this way is that there aren't any email clients that are capable of doing multi-folder searches. When I need to find something I am reduced to using tools like grep which, despite having a certain charm, is pretty painful.

Movable Type, with its built-in search and trackback widget seemed like an interesting way to create a threaded read-only archive of my mail. I could have built something from scratch (and I have) but MT was most of the puzzle already completed.

The idea of using tags and comments for annotating an email was also intriguing. Using custom X-headers to tag an email from Ted as "asshole" is great until you need to reply to that message and forget to purge your personal notes.

Also I was curious to see if, and how, it could be done and I hadn't played with the MT source in a couple years.

EMAIL TO MT MAPPINGS ^

SETUP ^

Versioning

This package is designed to be used with Movable Type 3.2

Templates

Future releases may try to automate this process.

Plugins

In order to rebuild your templates with bi-directional trackback threading, you will need to install the MTPingUrls plugin.

 cp /path/to/MT-Import-Mbox-1.01/plugins/pinged-by-entry \
    /path/to/your/cgi-bin/mt/plugins/

Future releases may try to automate this process.

Permissions

Ensure that your MT installation is configured to allow both the default CGI scripts and the scripts using this library sufficient permissions to create an modify files in your (MT) static archive.

PACKAGE METHODS ^

__PACKAGE__->new()

CONFIG OPTIONS ^

mt

importer

email

OBJECT METHODS (you should care about) ^

$obj->import_mbox($path_to_mbox,%args)

Where %args are whatever valid parameters you can pass to the Email::Folder::Mbox object constructor.

$obj->import_msg(Email::Simple)

Returns an MT::Entry object.

VERSION ^

1.01

DATE ^

$Date: 2005/12/03 19:10:27 $

AUTHOR ^

Aaron Straup Cope <ascope@cpan.org>

SEE ALSO ^

MT::Import::Base

http://pep.perl.org

http://www.movabletype.org

TO DO ^

Write message body to disk and store as an attachment Render the static version using MTInclude. This should allow for better searching and indexing by third-party tools.

BUGS ^

Probably, or at least a handful of special-cases. Patches are welcome. 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.

syntax highlighting: