Skip to main content

pelican-mboxreader

This pelican plugin adds a generator that can load a Unix style mbox file and generate articles from all the entries in the mailbox.

This was written to support easy interoperation between pelican and mailman (which creates mbox archives). Future work, if done, will involve improving the way (plaintext) email is turned into HTML and adding support for additional mail directory types.

Do I need other dependencies?

Yes; you need python's dateutil module (so dates in emails can be parsed without assuming a standard time format).

The setup.py script will automatically take care of this when installing the package.

How do I install it?

pelican-mboxreader is packaged and available from PyPI; to install it, you can simply run the following command: pip install pelican-mboxreader.

Alternatively, you can clone the git repository, build it, and install it yourself by running python setup.py install.

How does it work?

Enable it using any other Pelican plugin, though note that the plugin is named pelican_mboxreader, then add it to the configuration as follows:

PLUGINS = [
    # ...
    'pelican_mboxreader',
    # ...
]

Then add the following settings to the configuration:

MBOX_PATH = ['/path/to/mail.box']
MBOX_CATEGORY = ['Name of Mbox Category']

MBOX_PATH defaults to "input.mbox" in the current directory. If it is not present, Pelican should behave gracefully. ```MBOX_CATEGORY`` defaults to "Mailbox".

As you might gather from these settings being lists, mboxreader supports taking input from multiple Mailbox files. You must have one category name per mbox path.

Other Configuration Options

MBOX_AUTHOR_STRING = ''

This string is appended to the end of authors created via mbox. This is used to provide a way to distinguish authors via email and authors via normal Pelican, if you want that. It is now disabled by default.

MBOX_MARKDOWNIFY = False

This setting controls whether to feed input emails into Markdown or whether they should be converted "manually" (i.e. replacing newlines with paragraph tags and break tags as appropriate), which is the default. Markdown is the closest to "plaintext" (compare to reStructuredText) though in the future I'll likely add an option to use the rST parser instead.

Is support for other mailbox types (maildir, etc.) possible?

Yes. It would need to be programmed in and made configurable, however it would be trivial if the mailbox type is implemented by python's mailbox module (which is what this uses).

Is this pointless?

Maybe. See the above note about mailman; it was written for a reason but may not be something that anyone in the real world actually needs.

Credits

Ben Rosser rosser.bjr@gmail.com

Written for use by the JHUACM.

Metadata

Release files for pelican-mboxreader 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pelican-mboxreader 0.1.4
File Size Uploaded
pelican-mboxreader-0.1.4.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pelican-mboxreader 0.1.4
File Interpreter ABI Platform
pelican_mboxreader-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / pelican-mboxreader-0.1.4.tar.gz

Download URL pelican-mboxreader-0.1.4.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1653a1a4237a0770c8f43fea9bd6b2fd52574453dffa6c3f9b6453bb9b43269c
BLAKE2b-256 checksum
How to use checksums
9a878b4d21f70bc73aea28231f40e9c2759e50cb081eee5cf15f0693a3eb62de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

Release files / pelican_mboxreader-0.1.4-py3-none-any.whl

Download URL pelican_mboxreader-0.1.4-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3c7426e6fb9e0d98dbfd2206b439ede0609049e2a964e73c9bfc89fd33cdf54
BLAKE2b-256 checksum
How to use checksums
3396f2c655d7221e233a31307db7cbfb5c874d1a50fbd29d54269e997e8882cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

3 release files

0.1.1

3 release files

0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page