Convert Markdown content into Google Analyitics-tagged HTML and plain email.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
COPYING
README.markdown
markdownmail.py

README.markdown

Markdown Mail

Prepare HTML emails given a Markdown document.

Unfortunately, it assumes you're running under Gnome (to allow for live-browser prviews.)

Good if you want to send HTML email.

  • Tags specified tags in an email with Google Analytics parameters

  • Converts Markdown to HTML (if -p [plaintext] paramter is not specified)

  • Wraps HTML in specified header and footer template files

  • Copies result to clipboard

Technical details

If the template files ./template/{header,footer}.html are found, then output is also wrapped with these files.

By default, the basename of the Markdown file is used as the campaign name given to Google Analytics.

By default, the name of the folder that contains the Markdown file is used as the traffic source value given to Google Analytics.

Dependencies

  • Python's pip package manager. In Debian install it as:

    sudo apt-get install python-pip

  • python-markdown module. Install it:

    sudo pip install markdown

  • pynliner module. Install it:

    sudo pip install cssutils sudo pip install pynliner

  • A utility to allow us to launch the preview in a browser:

    sudo pip install desktop

  • Gnome window manager (since my copy-to-clipboard is not platform independent in its current form)

Usage

python markdownmail.py [campaign-name.markdown]

License

Copyright (c) 2012 Eoin Ó Conchúir.

Markdown Mail is licensed under The MIT License provided by the Open Source Initiative. See the file COPYING for the license.

About author

Contact Eoin at e@eoinoc.net.

I welcome questions and pullrequests at this project's GitHub repo.