-
-
03 Dec 2003 15:58:45 UTC
- Distribution: Mariachi
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (11 / 274 / 3)
- Kwalitee
Bus factor: 0- 30.41% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (20.19KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- AppConfig
- Class::Accessor
- Date::Parse
- Email::Find
- Email::Folder
- Email::Thread
- File::Basename
- File::Copy
- File::Find::Rule
- File::Path
- Mail::Thread
- Mail::Thread::Chronological
- Memoize
- Module::Build
- Storable
- Template
- Template::Plugin::Page
- Text::Original
- Time::HiRes
- URI::Find::Schemeless::Stricter
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Template::Plugin::Mariachi - gussy up email for the Mariachi mailing list archiver
SYNOPSIS
[% USE Mariachi %] <b>From:</b> [% message.from | mariachi(uris => 0) %]<br /> <b>Subject:</b> [% message.subject | html | mariachi %]<br /> <b>Date:</b> [% date.format(message.epoch_date) %]<br /> <pre>[% message.body | html | mariachi %]</pre>
DESCRIPTION
Used by the mariachi mailing list archiver to make emails more suitable for display as html by hiding email addresses and turning bare urls into links.
Theoretically this could be done with some other
Template::Toolkit
plugins but this is easier for us.METHODS
[% USE Mariachi %]
Initialise the Mariahci filter in your template. Can take options like so:
[% USE Mariachi( uris => 0, email => 1) %]
which, in this case, turns off uri munging and turns on email munging.
Both options are on by default.
[% FILTER mariachi %]
[% somevar | mariachi %]
Filter some text. Can take options in a similar manner to initialisation.
[% FILTER mariachi(email => 0) %] [% somevar | mariachi(uris => 0) %]
munge_quoting <text_ref>
Takes a reference to some text and returns it munged for quoting
munge_email <email> <orig_email>
Takes exactly the same options as callbacks to
Email::Find
. Currently turns all non period characters in the domain part of an email address and turns them into 'x's such that :simon@thegestalt.org
becomes
simon@xxxxxxxxxx.xxx
Should be overridden if you want different behaviour.
munge_uri <uri> <orig_uri>
Takes exactly the same options as callbacks to
URI::Find
although it actually usesURI::Find::Schemeless::Stricter
.As such you should be wary if overriding that the uri may not have a scheme. This
$uri->scheme('http') unless defined $uri->scheme;
solves that particular problem (for various values of solve)
Currently just turns uris into simple clickable links
www.foo.com
becomes
<a href="http://www.foo.com">www.foo.com</a>
Should be overridden if you want different behaviour.
TODO
Strip html out of html mails?
Defang javascript and display html in line?
COPYING
Copyright 2003, the Siesta Development Team
SEE ALSO
Module Install Instructions
To install Mariachi, copy and paste the appropriate command in to your terminal.
cpanm Mariachi
perl -MCPAN -e shell install Mariachi
For more information on module installation, please visit the detailed CPAN module installation guide.