WebHelpers 1.0b1 (revised announcement)

3 views
Skip to first unread message

Mike Orr

unread,
Nov 20, 2009, 2:51:27 PM11/20/09
to pylons-...@googlegroups.com, turbo...@googlegroups.com
WebHelpers 1.0b1 is released. It contains a year's worth of
enhancements since 0.6.4, listed below. Get your fresh copy at
http://pypi.python.org/pypi/WebHelpers/1.0b1
Documentation is in the module docstrings.

1.0 final will be released as soon as I finish the online
documentation and pending enhancements.

**THE DEPRECATED RAILS HELPERS ARE GONE!!** If you're still using
them, stick to WebHelpers 0.6.4, or copy the whole rails directory
into your application.

The Pylons dependency will not change, at least through 0.10 and
probably through 1.x. This will allow you to use either version of
WebHelpers with Pylons or TurboGears 2.

I don't use TurboGears, so somebody please test it with TG2.

If you use webhelpers.feedgenerator or are an expert on RSS/Atom
syndication, please email me. I need some advice on updating
webhelpers.feedgenerator.

Changes since WebHelpers 0.6.4:

* Delete deprecated subpackage: rails.
These are replaced by new helpers in date, html, misc, number, text.
* Delete other deprecated subpackages: commands, hinclude, htmlgen, pagination.
Pagination is replaced by paginate.
* webhelpers.constants:
- ``uk_counties`` returns tuples rather than lists.
* webhelpers.feedgenerator:
- ``rfc3339_date`` now accepts date objects without crashing.
- Add 'generator' and 'source' properties to RSS2 feeds. Patch by
Vince Spicer.
* webhelpers.html.converters:
- New helper ``render()`` formats HTML to text.
- New helper ``sanitize()`` strips HTML tags from user input.
* webhelprs.html.tags:
- New helper ``css_classes()`` to add classes to a tag programmatically.
- Fix bug in tag helpers when passing 'id_' argument (although 'id' is
recommended instead).
- Add OptionGroup class and optgroup support to select(). Patch by
Alexandre Bourget.
* webhelpers.html.tools:
- New helper ``strip_tags()`` deletes HTML tags in a string.
* webhelpers.paginate:
- convert "_range" and "_pagelink" function to Page class method so that they
can be overridden
- pager "onclick" argument use template string value. So, javascript code can
use "partial_url" or "page" value or any. Backward compatibility is
considered.
- Add presliced list option to avoid slicing when list is already.
* webhelpers.pylonslib:
- is now a package.
- The ``Flash`` class now accepts severity categories, thanks to Wichert
Akkerman. The docstring shows how to set up auto-fading messages using
Javascript a la Mac OSX's "Growl" feature. This is backward compatible
although you should delete existing sessions when upgrading from 0.6.x.
- ``webhelpers.pylonslib.minify`` contains enhanced versions of
``javascript_link`` and ``stylesheet_link`` to minify (shrink) files for
more efficient transmission. (EXPERIMENTAL: tests fail in
unfinished/disabled_test_pylonslib_minify.py; see
http://pylonshq.com/project/pylonshq/ticket/466 .)
* webhelpers.text:
- Port several helpers from Ruby's "stringex" package.
+ ``urlify()`` converts any string to a URL-friendly equivalent.
+ ``remove_formatting()``
+ If the ``unidecode`` package is installed, these two helpers will also
transliterate non-ASCII characters to their closest pronounciation
equvivalent in ASCII.
+ Four other helpers reduce HTML entities or whitespace.


--
Mike Orr <slugg...@gmail.com>

Jonathan Vanasco

unread,
Nov 20, 2009, 3:39:10 PM11/20/09
to pylons-discuss
On Nov 20, 2:51 pm, Mike Orr <sluggos...@gmail.com> wrote:
> WebHelpers 1.0b1 is released.  It contains a year's worth of
> enhancements since 0.6.4, listed below.  Get your fresh copy athttp://pypi.python.org/pypi/WebHelpers/1.0b1

rad!

> * Delete deprecated subpackage: rails.
>   These are replaced by new helpers in date, html, misc, number, text.
Can we get a mapping of what is now where ?

Mike-
i have a ton of helpers that you may want to include in this / future
release that are on my damn MIT licensed project that keeps getting
held back for security issues on the controllers. contact me offlist
if you'd like access to the SVN repo.

Mike Orr

unread,
Nov 20, 2009, 4:01:40 PM11/20/09
to pylons-...@googlegroups.com
On Fri, Nov 20, 2009 at 12:39 PM, Jonathan Vanasco
<jona...@findmeon.com> wrote:
> On Nov 20, 2:51 pm, Mike Orr <sluggos...@gmail.com> wrote:
>
>> * Delete deprecated subpackage: rails.
>>   These are replaced by new helpers in date, html, misc, number, text.
> Can we get a mapping of what is now where ?

I don't have a 1:1 list, but it should be clear from the subpackage names.

containers: various container objects and dict/list helpers
date: date/time formatting
html:
- builder: HTML tag builder (exported as webhelpers.html)
- converters: convert text markup to HTML and back
(front ends for markdown & textilize)
fill paragraphs, newline-to-break, render HTML to text,
sanitize (strip tags)
- tags: create form tags, anchor tags, etc
- secure_form: form with authentication tokens to prevent XSS attacks
- tools: create more sophisticated tags (mailto, highlight, etc)
misc: Things that don't fall into another package.
any(), all(), no(), count_true(), convert_or_none(),
DeclarativeException: an extensible exception base class
number: number formatting, statistical analysis
text: text formatting (non-HTML)

These subpackages have all existed for 1 1/2 years, so you're probably
familiar with them.

> i have a ton of helpers that you may want to include in this / future
> release that are on my damn MIT licensed project that keeps getting
> held back for security issues on the controllers. contact me offlist
> if you'd like access to the SVN repo.

That would be great, just send me the info. All helpers are
considered if they're:
* useful to a wide variety of applications
* pure Python
* proper XHTML syntax with smart escaping (must use
webhelpers.html, not string concatenation)

--
Mike Orr <slugg...@gmail.com>

Marius Gedminas

unread,
Nov 22, 2009, 3:07:36 PM11/22/09
to pylons-...@googlegroups.com
On Fri, Nov 20, 2009 at 11:51:27AM -0800, Mike Orr wrote:
> WebHelpers 1.0b1 is released. It contains a year's worth of
> enhancements since 0.6.4, listed below. Get your fresh copy at
> http://pypi.python.org/pypi/WebHelpers/1.0b1
> Documentation is in the module docstrings.
>
> 1.0 final will be released as soon as I finish the online
> documentation and pending enhancements.
...

> * webhelpers.pylonslib:
> - is now a package.
> - The ``Flash`` class now accepts severity categories, thanks to Wichert
> Akkerman. The docstring shows how to set up auto-fading messages using
> Javascript a la Mac OSX's "Growl" feature. This is backward compatible
> although you should delete existing sessions when upgrading from 0.6.x.

Actually, it isn't completely backwards-compatible: you can no longer
pass HTML markup to Flash(). I filed a bug and uploaded a patch here,
I'd appreciate it if you could take a look at it:
http://pylonshq.com/project/pylonshq/ticket/659

There's another bug with an outstanding patch that I'd love to see merged:
http://pylonshq.com/project/pylonshq/ticket/656

Cheers!
Marius Gedminas
--
IBM motto: "If you can't read our assembly language, you must be
borderline dyslexic, and we don't want you to mess with it anyway"
-- Linus Torvalds

signature.asc
Reply all
Reply to author
Forward
0 new messages