{ "info": { "author": "Dave Cranwell", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Other Environment", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.4", "Topic :: Communications :: Email", "Topic :: Text Processing :: Markup :: HTML" ], "description": "============================================\ninlinestyler - Making Styled HTML Email Easy\n============================================\n\n:Version: 0.2.4\n:Download: http://pypi.python.org/pypi/inlinestyler/\n:Source: http://github.com/dlanger/inlinestyler/\n:Keywords: inline, HTML, CSS, email, preflight\n\n`inlinestyler` is an easy way to locally inline CSS into an HTML email message.\n\nStyling HTML email is a `black art`_. CSS works, but only when it's been placed\ninline on the individual elements (and event then, not always) - which makes\ndevelopment frustrating, and iteration slow. \n\nThe general solution is to use an inlining service, which takes a message with \nthe CSS placed externally, and rewrites it so that all CSS is applied to the\nindividual elements. The most widely used of these services - and as far as I \ncan tell, the one that powers CampaignMonitor - is `Premailer`_. It's a great \nservice, and the guys behind it put a lot of work into keeping it up to date\nwith the most recent discoveries in what works and what doesn't.\n\n`inlinestyler` takes (most) of the functionality of Premailer, and makes it \navailable locally, accessible without having call a remote service. \n\nTo see what `inline-styler` can do, check out this `demo`_.\n\n.. _`black art`: http://www.campaignmonitor.com/css/\n.. _`Premailer`: http://premailer.dialect.ca/\n.. _`demo`: http://inlinestyler.torchboxapps.com/\n\n\nCaveat Emptor\n=============\n\nThis project is relatively unmaintained. I will continue to do simple bugfixes \n(and patches with tests are welcome), but I won't be adding features or making\nnew CSS attributes work.\n\nIf this doesn't do what you need, check out the `premailer project`_.\n\n.. _`premailer project`: https://github.com/peterbe/premailer/\n\nHistory\n=======\n\n`Dave Cranwell`_ wrote the original `inline-styler`_ single-app Django project. \n`inlinestyler` is a refactor of that project into a free-standing package usable \noutside of Django.\n\n.. _`inline-styler`: https://github.com/davecranwell/inline-styler\n.. _`Dave Cranwell`: http://www.twitter.com/davecranwell\n\nRequirements\n============\n\n`inlinestyler` requires the following packages in order to run:\n\n* ``cssutils`` \n* ``lxml`` \n\nIt also requires a ``css_complaiance.csv`` file, which indicates the \ncompatibility of various email clients with certain CSS features. This\nis included with the package, but can be updated manually from \n`Campaign Monitor`_'s spreadsheet.\n\n.. _`Campaign Monitor`: http://www.campaignmonitor.com/css/\n\nUsage\n=====\n\n::\n\n from inlinestyler.utils import inline_css\n message_inline_css = inline_css(message_external_css)\n\n\n``message_external_css`` must be a string containing the message to be inlined, \nwith the CSS presented in the HTML as one of:\n\n* an absolute link ```` \n* a ``