t.p._.BookBuilder(LoreBuilderMixin) : class documentation

Part of twisted.python._release View Source View In Hierarchy

Generate the LaTeX and PDF documentation.

The book is built by assembling a number of LaTeX documents. Only the overall document which describes how to assemble the documents is stored in LaTeX in the source. The rest of the documentation is generated from Lore input files. These are primarily XHTML files (of the particular Lore subset), but man pages are stored in GROFF format. BookBuilder expects all of its input to be Lore XHTML format, so ManBuilder should be invoked first if the man pages are to be included in the result (this is determined by the book LaTeX definition file). Therefore, a sample usage of BookBuilder may look something like this:

   man = ManBuilder()
   man.build(FilePath("doc/core/man"))
   book = BookBuilder()
   book.build(
       FilePath('doc/core/howto'),
       [FilePath('doc/core/howto'), FilePath('doc/core/howto/tutorial'),
        FilePath('doc/core/man'), FilePath('doc/core/specifications')],
       FilePath('doc/core/howto/book.tex'), FilePath('/tmp/book.pdf'))
Method run Execute a command in a child process and return the output.
Method buildTeX Build LaTeX files for lore input files in the given directory.
Method buildPDF Build a PDF from the given a LaTeX book document.
Method build Build a PDF book from the given TeX book definition and directories containing lore inputs.

Inherited from LoreBuilderMixin:

Method lore Run lore with the given arguments.
def run(self, command): (source)
Execute a command in a child process and return the output.
ParameterscommandThe shell command to run. (type: str)
RaisesCommandFailedIf the child process exits with an error.
def buildTeX(self, howtoDir): (source)
Build LaTeX files for lore input files in the given directory.

Input files ending in .xhtml will be considered. Output will written as .tex files.

ParametershowtoDirA directory containing lore input files. (type: FilePath)
RaisesValueErrorIf howtoDir does not exist.
def buildPDF(self, bookPath, inputDirectory, outputPath): (source)
Build a PDF from the given a LaTeX book document.
ParametersbookPathThe location of a LaTeX document defining a book. (type: FilePath)
inputDirectoryThe directory which the inputs of the book are relative to. (type: FilePath)
outputPathThe location to which to write the resulting book. (type: FilePath)
def build(self, baseDirectory, inputDirectories, bookPath, outputPath): (source)
Build a PDF book from the given TeX book definition and directories containing lore inputs.
ParametersbaseDirectoryThe directory which the inputs of the book are relative to. (type: FilePath)
inputDirectoriesThe paths which contain lore inputs to be converted to LaTeX. (type: list of FilePath)
bookPathThe location of a LaTeX document defining a book. (type: FilePath)
outputPathThe location to which to write the resulting book. (type: FilePath)
API Documentation for Twisted, generated by pydoctor at 2012-06-04 17:20:01.