[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RFS: premailer 2.9.7-1



Hi,

I'd like review / sponsorship for the premailer package, ITP #810942:

* Package name    : premailer
  Version         : 2.9.7
  Upstream Author : Peter Bengtsson <mail@peterbe.com>
* URL             : http://github.com/peterbe/premailer
* License         : BSD-3-Clause
  Programming Lang: Python
  Description     : Turns CSS blocks into style attributes

 When you send HTML emails you can't use style tags but instead you have
 to put inline style attributes on every element. premailer parses an
 HTML page, looks up style blocks and parses the CSS. It then uses the
 lxml.html parser to modify the DOM tree of the page accordingly.

It's pure Python so it's pretty straightforward (and the packaging was
mostly based on the pypi2deb output -- thanks Piotr!). I've pushed it
to DPMT git, and can also stick a .dsc somewhere if that makes review
easier.

Here's an example of what it does / how to test it:

>>> import premailer
>>> print premailer.transform("<style>b {color: red;}</style> <b>hello</b> <i>world</i>")
<html>
<head></head>
<body>
<b style="color:red">hello</b> <i>world</i>
</body>
</html>

-- 
Geoffrey Thomas
geofft@hudson-trading.com


Reply to: