Re: Wanted: HTML tag generator for WebHelpers2

2013-07-04 Thread Michael Bayer
On Jul 4, 2013, at 5:15 PM, Mike Orr wrote: > On Wed, Jul 3, 2013 at 10:21 PM, Tres Seaver wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 07/03/2013 11:12 PM, Mike Orr wrote: >> >>> The thing is, WebHelpers has always tried to avoid dependencies so >>> that it can be used

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-04 Thread Mike Orr
On Wed, Jul 3, 2013 at 10:21 PM, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 07/03/2013 11:12 PM, Mike Orr wrote: > >> The thing is, WebHelpers has always tried to avoid dependencies so >> that it can be used in the widest variety of use cases. It now >> depends on

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-03 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/2013 11:12 PM, Mike Orr wrote: > The thing is, WebHelpers has always tried to avoid dependencies so > that it can be used in the widest variety of use cases. It now > depends on MarkupSafe because that's a small best-of-breed security > enh

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-03 Thread Mike Orr
On Wed, Jul 3, 2013 at 11:09 AM, Jason McKellar wrote: > On Tue, Jul 2, 2013 at 12:46 PM, Mike Orr wrote: >> Maybe I should just ask the list: is lxml suitable as a tag generator >> for webhelpers2.html? Or is it too big for a general-purpose library, >> not everyone of which will be generating H

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-03 Thread Wichert Akkerman
On Jul 3, 2013, at 21:53, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 07/03/2013 02:09 PM, Jason McKellar wrote: > >> I may be in the minority about dependencies, but I really don't mind >> have extra dependencies if they are the right tool. It doesn't hurt >> t

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-03 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/2013 02:09 PM, Jason McKellar wrote: > I may be in the minority about dependencies, but I really don't mind > have extra dependencies if they are the right tool. It doesn't hurt > that I use lxml in most of my Pyramid applications anyway. I

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-03 Thread Jason McKellar
On Tue, Jul 2, 2013 at 12:46 PM, Mike Orr wrote: > On Tue, Jul 2, 2013 at 12:46 AM, Mike Orr wrote: > > On Mon, Jul 1, 2013 at 11:48 PM, Wichert Akkerman > wrote: > >> > >> On Jun 28, 2013, at 23:04 , Mike Orr wrote: > >> > >> I'm thinking about rewriting the low-level HTML tag generator in >

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-02 Thread Mike Orr
On Tue, Jul 2, 2013 at 12:46 AM, Mike Orr wrote: > On Mon, Jul 1, 2013 at 11:48 PM, Wichert Akkerman wrote: >> >> On Jun 28, 2013, at 23:04 , Mike Orr wrote: >> >> I'm thinking about rewriting the low-level HTML tag generator in >> WebHelpers2, and wondering if there's an existing library that w

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-02 Thread Jens W. Klein
Just read this thread and thought maybe our very simple tag generator in yafowil could be of interest - even if it does not meet the all the expectations you wrote about. Its plays nice with json in data tags and also has a plugin point for a simple translation system (used currently with Zope

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-02 Thread Mike Orr
On Mon, Jul 1, 2013 at 11:48 PM, Wichert Akkerman wrote: > > On Jun 28, 2013, at 23:04 , Mike Orr wrote: > > I'm thinking about rewriting the low-level HTML tag generator in > WebHelpers2, and wondering if there's an existing library that would be > worth using in this HTML 5/Python 2.6+ world. >

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-01 Thread Wichert Akkerman
On Jun 28, 2013, at 23:04 , Mike Orr wrote: > I'm thinking about rewriting the low-level HTML tag generator in WebHelpers2, > and wondering if there's an existing library that would be worth using in > this HTML 5/Python 2.6+ world. In rare situations where I can't use a template library I us

Re: Wanted: HTML tag generator for WebHelpers2

2013-07-01 Thread Mike Orr
I implemented the 'class', 'class_',' and 'style' list arguments. Version b3 looks like it was never frozen for release, so that will be the next version. My next steps, not necessarily in this order, are: reimplementing the HTML builder, converting the tests to py.test, the Python 3 port, and some

Re: Wanted: HTML tag generator for WebHelpers2

2013-06-29 Thread Mike Orr
On Sat, Jun 29, 2013 at 3:11 PM, Marius Gedminas wrote: > On Fri, Jun 28, 2013 at 02:04:08PM -0700, Mike Orr wrote: >> I'd also like feedback on another idea. I'm thinking about adding arguments >> to build up the class attribute and style attribute piecemeal: >> >> make_tag(..., classes=["foo

Re: Wanted: HTML tag generator for WebHelpers2

2013-06-29 Thread Marius Gedminas
On Fri, Jun 28, 2013 at 02:04:08PM -0700, Mike Orr wrote: > I'd also like feedback on another idea. I'm thinking about adding arguments > to build up the class attribute and style attribute piecemeal: > > make_tag(..., classes=["foo", "bar"]) => ' ... class="foo bar"' > > make_tag(..., s

Re: Wanted: HTML tag generator for WebHelpers2

2013-06-28 Thread Mike Orr
Version b3 converts arguments like "data_a_b" to "data-a-b". It's not in PyPI (I must have forgotten that step) but it's in the source. Version b4 will probably be out this weekend, with at least 'classes' and 'styles', because I need that for a project. There was some discussion about whether the

Re: Wanted: HTML tag generator for WebHelpers2

2013-06-28 Thread Jonathan Vanasco
On Friday, June 28, 2013 5:04:08 PM UTC-4, Mike Orr wrote: > > > Are there any other syntactic sugar patterns that would be helpful in a > Javascript-rich or HTML 5 application? > you should support html5 custom data attributes , the *data-** syntax. ie: http://example.com"; data-a="1" d