Hmm, Unidecode is 1.4 MB, which is bigger than WebHelpers. What are
you using the slugs for? What general purpose would they have in
other sites?
--
Mike Orr <slugg...@gmail.com>
I could ask the unidecode author to release package on pypi and
WebHelpers users would require them by need basis.
> Hey guy, today I threw together this little function helper that I
> miss a lot in WebHelpers.
>
> unidecode module can be obtained from
> http://code.zemanta.com/tsolc/unidecode/releases/Unidecode-0.04.1.tar.gz
Funny, as I was porting my blog from a Rails-based Typo one, to Pylons
+ MongoDB, I needed a slug generator. The Rails one used a package
called stringex which is quite handy for other common slug
conversions, and I posted Unideocde to Cheeseshop so its
easy_installable. Here's my slugger (urlify), that is ported from the
Ruby version, which also uses unidecode in addition to other common
replacements for a slug:
http://bitbucket.org/bbangert/minger/src/tip/minger/lib/stringex.py
It would be handy to perhaps have those functions in WebHelpers, with
an optional dependency on Unidecode to use it when available?
Cheers,
Ben
It's in WebHelpers dev already. (Finally I have my own time machine!)
webhelpers.text.urlify(). There's also a companion
remove_formatting() to strip HTML tags, and some character/entity
converters. All by Ben and based on Ruby's stringex package.
--
Mike Orr <slugg...@gmail.com>