Help Wrapping HTMLTidy in LCB
lists at mangomultimedia.com
Mon Dec 9 13:28:38 EST 2019
On Fri, Nov 22, 2019 at 10:30 AM Trevor DeVore <lists at mangomultimedia.com>
> While looking at solutions for converting HTML into XHTML that can be
> parsed by revXML I decided to test HTMLTidy which has an option to output
> the input as XHTML. While I could bundle up the tidy command line tool and
> include it with my app, I prefer to wrap things up in LCB if possible.
> Unfortunately I haven't gotten very far with HTMLTidy and I'm
> hoping someone else might be able to figure out what I'm doing wrong. If
> you are up for loading up an LCB project in LC 9 on macOS and looking at
> some C files then please read on:
I made some progress on the HTMLTidy project and this morning Mark
Waddingham and Brian Milby helped me over the last hurdle. The code base
now has a tidyHTMLToXHTML() function which works on macOS. You can try it
out using the test stack included in the repo. The code may also be of
interest to those trying to wrap other libraries.
I will be adding the Windows DLL so that the extension works on Windows and
then trying to create a sensible API around HTMLTidy for my current needs.
I don't plan on making it feature complete at the moment as I just need to
for my own work. If someone else wanted to take that up they are welcome to.
More information about the use-livecode