pixt converts files to text by making system calls.
pixt is just a wrapper around a series of system
calls, thus making it reasonably extensible. A pixt generator can
be written for any file type. An example below illustrates a simple
pdf conversion.
p = pixt.PiXt()
p.settype('text')
data = p.convert('myfile.txt')
The example above creates a pixt object, defines the conversion type (or item
being read) as text, and then returns the file's data. The general
concept involves reading performing the conversion, and returning
the resulting text, pixt only ever returns a string of
text. This means that anything that is in a text file can
be automatically read, and is in now way massaged. Eventually pixt
might support the notion of formatters to handle objectifying text
objects. As such, even a text file needs a conversion plugin (and
has one).
Next: Writing A
Generator
Download pixt