I love tidy. I need tidy. What I really really want is a simple wrapper around tidy that will let me use it through Python.
It's not that the current set of wrappers are bad, it's just that they didn't meet my target requirements. What are my target requirements?
import pytidy
xhtml = pytidy.fix("just same <b>malformed HTML<br/> stuff")
That's it, just a single fucntion that takes in poor markup and then returns well-formed XHTML as output.
Download pyTidy, a simple Python wrapper of TidyLib that has just the minimal interface described above.
Build Instructions:
Type 'make' to build. This will build two files:
pytidy.so (or _pytidy.dll on Windows) and pytidy.py
Copy both of these files into your project, or the right location in your Python libraries.
Version 0.1 - Initial Release. Currently untested on Windows.
Yes, I would like to automate this whole process using distutils, but that will have to wait for a later release.
Posted by Joe on 2003-11-26
Posted by Yay on 2003-12-05
Posted by Joe on 2003-12-05
There is also
http://utidylib.sourceforge.net/
Which uses ctypes, so it's dead easy to use on windows.
Posted by icepick on 2004-04-16
Posted by doug ransom on 2004-07-01
i need help converting any html to well formed xml in a server side .NET script.
can u help me? or direct me to a place where i can find what i am looking for?
thanks in advance,
danielb
Posted by daniel bar on 2004-12-22
2003-11-21
Posted by John Beimler on 2003-11-22