Cheshire3 Objects: PreParser

|  | ## Cheshire3 Objects: PreParser

Description

A PreParser takes a Document and creates a second one. For example, the input document might consist solely of a URL. The output would be a Document with the data that the PreParser has fetched from that address. This functionality allows for work flow chains to be strung together in many ways, and perhaps in ways which the original implemention had not foreseen.

Implementations

- preParser.SgmlPreParser
  Converts SGML into XML. eg empty tags, quoted attributes, normalised case
- preParser.GzipPreParser
  Given a gzipped document, return the decompressed version.
- preParser.MarcToXmlPreParser
  Convert MARC format to MARCXML.
- preParser.MarcToSgmlPreParser
  Convert MARC format to Cheshire's MarcSGML
- preParser.B64EncodePreParser
  Encode data into base64
- preParser.B64DecodePreParser
  Decode data from base64
- preParser.PrintableOnlyPreParser
  Strip non printable (ascii) characters
- preParser.PdfToTxtPreParser
  Convert PDF format to simple text
- preParser.TxtToXmlPreParser
  Add an XML wrapper around plain text.
- preParser.BzipPreParser
  Unbzip a document.
- preParser.WordPreParser
  If the appropriate OpenOffice server is running, use it to turn any format known to OO into OO's internal XML format.

API

Function | Parameters | Returns | Description
--- | --- | --- | ---
__init__ | config, parent |  |
process_document | session, document | Document | Return a new document after some transformation