Slugger 0.1

Slugging done right. Tries to support close to 300 languages.

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
LGPL (GNU Lesser General Public License) 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Marc Brinkmann
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Programming \ Internationalization
Slugger is a Python tool that solves the "simple" problem of turning a title like *Headless body in topless bar* into a slug: *headless-body-in-topless-bar*.

Criterias of what makes a good slug vary, but most often they are required to have a maximum length a reduced character set that is highly URL-friendly.

Usage

Detailed docs are still missing. Here is a quick example::

    from slugger import Slugger

    s = Slugger('de', hanlang='ja')
    print s.sluggify(u'Hellö & Wörld 漢字')


This will print ``helloe-und-woerld-kan-ji``. The Slugger class itself supports a number of construction options, see ``slugger/__init__.py`` for details.

You should not rely on Slugger generating the same slug across different versions, as the goal of this library is to steadily improve, either through better underlying libraries or fixes in Slugger itself.

Installation

You cannot use Slugger straight from a checkout of the repository, as *glibc*-localedata has to be parsed and pickled first. When installing a release from PyPi, this data is already included.

Last updated on March 19th, 2012

requirements

#title slugging #slug titles #Python #title #slugging #slug

Add your review!

SUBMIT