cl-tidy [ASDF system]

FFI bindings for HTML Tidy

Version:0.0.1
License:BSD sans ad-clause
Website:on github.com
Author:Red Daly <reddaly at gmail.com>
Dependencies:cl-tidy, cffi

CL-Tidy

HTML Tidy for Common Lisp

Synopsis

CL-Tidy is a small set of bindings for the HTML Tidy library. It is used for cleaning up mostly-correct HTML pages and for identifying the problems in an understandable way. From the author of Tidy:

Tidy is able to fix up a wide range of problems and to bring to your attention things that you need to work on yourself. Each item found is listed with the line number and column so that you can see where the problem lies in your markup. Tidy won't generate a cleaned up version when there are problems that it can't be sure of how to handle. These are logged as "errors" rather than "warnings".

The interface is described in detail below but the basic usage is this:

(cl-tidy:clean-up-html (drakma:http-request "http://www.bkstr.com/")) 

Contents

  1. Download and Installation
  2. Functions
    1. clean-up-html

Download and Installation

All the code is maintained in a git repository. To obtain the library, use the following command:

git clone git://github.com/gonzojive/cl-tidy.git 

You can also browse the code at http://github.com/gonzojive/cl-tidy.

Functions

[Function]
clean-up-html string

Given an HTML string, string, runs the input through Tidy. If Tidy can handle the input, returns a version of the document that is valid XHTML.

Thus, most dirty web pages from the internet can be grabbed run through CLEAN-UP-HTML and subsequently passed into a strict XML parser.