datadesk/latimes-table-stacker — pull request #113 by chrislkeller (2012-11-28 06:28:55+00:00)
Title: Added a formatting filter for an email address...

Hey Ben...

Don't know if it's worth considering as it is small, but I added a formatting filter for an email address based of your link filter. This will wrap an email address in a mailto: tag. Small add.

def email_address(title, address):
"""
Wrap the email address in mailto: tag, if the link exists.
"""
if not address:
return title
return '%(title)s' % {'address': address, 'title': title}

Usage is basically the same as the link...

TextColumnName:
method: email_address
arguments:
- EmailColumnName