Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8171 > unrolled thread

RFS: premailer 2.9.7-1

Started byGeoffrey Thomas <geofft@hudson-trading.com>
First post2016-01-27 16:40 +0100
Last post2016-01-27 16:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.debian.maint.python


Contents

  RFS: premailer 2.9.7-1 Geoffrey Thomas <geofft@hudson-trading.com> - 2016-01-27 16:40 +0100

#8171 — RFS: premailer 2.9.7-1

FromGeoffrey Thomas <geofft@hudson-trading.com>
Date2016-01-27 16:40 +0100
SubjectRFS: premailer 2.9.7-1
Message-ID<qVAmm-5zA-13@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web