Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

htmlentitiesdecode

This module makes it easy to decode html entities in strings.

License

htmlentitiesdecode is free software under the terms of the Do What The Fuck You Want To Public License version 2 (or any later version). The author of htmlentities is Niels Serup, contactable at ns@metanohi.org. This is version 0.1.1 of the program.

Installing

If you have python-setuptools installed, you can just do this:

$ sudo easy_install htmlentitiesdecode

Alternatively, download and extract the gzipped tarball found on this very page, and then run this:

$ sudo python setup.py install

The newest version of htmlentitiesdecode is always available at http://metanohi.org/projects/htmlentitiesdecode/ and at the Python Package Index.

Using

This module has only one main function: decode. Example usage:

>>> from htmlentitiesdecode import decode as entity_decode
>>> print entity_decode('Wie heißt du?')
Wie heißt du?
>>> print entity_decode('Ich heiße "htmlentitiesdecode".')
Ich heiße "htmlentitiesdecode".
>>> print entity_decode('Wir heißen "modules".')
Wir heißen "modules".

Running

When this module has been installed, you will have both a module and a command-line script that uses the decode function of the module. This script can be run this way:

$ decodehtmlentities TEXT

Changelog

  • Version 0.1.0: Initial release
  • Version 0.1.1: Fixed error in README

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.