|
Babble::DataSource::Mail - Fetch documents from mail archives |
Babble::DataSource::Mail - Fetch documents from mail archives
use Babble; use Babble::DataSource::Mail;
my $babble = Babble->new ();
$babble->add_sources (
Babble::DataSource::Mail->new (
-location => "babble.mbox",
-permalink_base => 'http://example.org/~me/blog/'
)
);
...
Babble::DataSource::Mail implements a Babble data source class that fetches documents from mailboxes, maildirs, or anything Mail::Box supports.
This can be used in a setup where one filters blog entries into a separate mailbox, and uses this module to generate the blog itself.
The method specified in -permalink_gen takes four arguments: base, msgid, subject and date. All of them are strings, except the first, which is a string reference.
Base is what we specified using -permalink_base, msgid is the message id, and subject is the subject of the mail.
The documents id property contains a pointer to the entry (eg, to one's weblog). This is generated by the $source->{permalink_gen} function, explained above.
For the Babble::Document::Collection object to return, some information will be gathered from the Babble object which calls this method, or from the parameters passed to us. Namely, the meta_title, meta_desc, meta_link, meta_owner, meta_owner_email, meta_subject, meta_image and meta_feed_link keys will be used, if present.
Gergely Nagy, algernon@bonehunter.rulez.org
Bugs should be reported at http://bugs.bonehunter.rulez.org/babble.
Babble::Document, Babble::Document::Collection, Babble::DataSource, Mail::Box
|
Babble::DataSource::Mail - Fetch documents from mail archives |