Alternative Licensing Request ?

2013-06-28 Thread Jonathan Vanasco
Does anyone know how / where I can request an alternate licensing 
permission ?

I'm trying to create a new Session package that replaces most of beaker 
with a dogpile backend.

Dogpile and Beaker both have the BSD license.  pyramid_beaker is under the 
bsd-like Agendaless Consulting license ; and I'm retaining a large section 
of __init__.py .  I'd prefer (if at all possible) to just use the BSD 
license and credit Agendaless/pyramid_beaker

-- 
You received this message because you are subscribed to the Google Groups 
pylons-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/groups/opt_out.




Wanted: HTML tag generator for WebHelpers2

2013-06-28 Thread Mike Orr
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. Something to reimplement the
low-level make_tag function:

make_tag(a, Click here, href=foo.html)  =
a href=foo.htmlClick here./a

The stdlib seems to only have ElementTree, which is overkill and not that
suited to making individual tags in isolation. The libraries on PyPI seem
to be very old, older than the WebHelpers implementation. So I'm looking
for something that's:

- In the stdlib, or small and with no esoteric dependencies.
- Fast.
- Without ancient HTML 4/3 clutter.
- Compatible with MarkupSafe and the ''.__html__()`` protocol.

Other desirable features:

- Knows about HTML 5's empty tags, boolean attributes, data attributes, etc.
- Can set characteristics at the class level, and is subclassable.
- Has a Tag class or equivalent for lazy stringification. This would allow
you to build up the attributes piecemeal, pass the tag to a template, and
it would stringify itself when str() or .__html__() is called.  Possibly
caching the string.

Is there a library that does this or should I write it myself?

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(..., styles=[margin:0, padding: 1ex]) = '...
style=margin:0; padding: 1ex)

Would this be useful to others? Would the names collide with any other
potential attributes? (I don't think so since HTML doesn't define styles
and classes, and is unlikely to because of user confusion.) Is there a
better API? Are there any other attributes where this would be useful on?

Are there any other syntactic sugar patterns that would be helpful in a
Javascript-rich or HTML 5 application?

-- 
Mike Orr sluggos...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
pylons-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/groups/opt_out.




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:
a href=http://example.com; data-a=1 data-b-a=2Link to 
Example.com/a

you can have one (or more) dashes in them, so I'm not sure how you could 
pass them in , other than as a dict

make_tag(... attrs={ 'data-a' :1 , 'data-b-a':2 }... )
make_tag(... data_attrs={ 'data-a' :1 , 'data-b-a':2 }... )
make_tag(... data_attrs={ 'a' :1 , 'b-a':2 }... )

personally i would prefer one of the first two options; i'm only bringing 
up the last one to note my disapproval of it.

-- 
You received this message because you are subscribed to the Google Groups 
pylons-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/groups/opt_out.




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 there is ever any use case to *not*
convert underscores; i.e., whether it needs to be switchable outside the
specific case of data_ - data-. I don't think so because the HTML spec
seems to say that only hyphens are valid in attribute names.



On Fri, Jun 28, 2013 at 2:31 PM, Jonathan Vanasco jonat...@findmeon.comwrote:



 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:
 a href=http://example.com; data-a=1 data-b-a=2Link to
 Example.com/a

 you can have one (or more) dashes in them, so I'm not sure how you could
 pass them in , other than as a dict

 make_tag(... attrs={ 'data-a' :1 , 'data-b-a':2 }... )
 make_tag(... data_attrs={ 'data-a' :1 , 'data-b-a':2 }... )
 make_tag(... data_attrs={ 'a' :1 , 'b-a':2 }... )

 personally i would prefer one of the first two options; i'm only bringing
 up the last one to note my disapproval of it.

 --
 You received this message because you are subscribed to the Google Groups
 pylons-devel group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to pylons-devel+unsubscr...@googlegroups.com.
 To post to this group, send email to pylons-devel@googlegroups.com.
 Visit this group at http://groups.google.com/group/pylons-devel.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
Mike Orr sluggos...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
pylons-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Alternative Licensing Request ?

2013-06-28 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 06/28/2013 12:13 PM, Jonathan Vanasco wrote:
 Does anyone know how / where I can request an alternate licensing 
 permission ?
 
 I'm trying to create a new Session package that replaces most of
 beaker with a dogpile backend.
 
 Dogpile and Beaker both have the BSD license.  pyramid_beaker is under
 the bsd-like Agendaless Consulting license ; and I'm retaining a large
 section of __init__.py .  I'd prefer (if at all possible) to just use
 the BSD license and credit Agendaless/pyramid_beaker

The BSD-style license allows you to mix-and-match your code (under pretty
much any license) with forked code.  Your 'COPYRIGHT.txt' file should
linclude text something like:

   Portions of this software are copyright Agendaless Consulting, Inc.,
   and licensed under a permissiv open-source license.  See:
   https://github.com/Pylons/pyramid_beaker/LICENSE.txt



Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlHOGEIACgkQ+gerLs4ltQ7XlwCgj7QcWHgTBL7P9zrdFWh3D4T9
AuAAn3L1oDGp53YvtXAcGf3WlVJE+7i9
=ou1C
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
pylons-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/groups/opt_out.