Mercurial > projects > dil
view trunk/src/docgen/document/plaintextwriter.d @ 451:3f44c38bf870
Page templates, more flexible writer interfaces, small fixes.
author | Jari-Matti M?kel? <jmjm@iki.fi> |
---|---|
date | Wed, 24 Oct 2007 17:25:52 +0300 |
parents | |
children | f658ec4a15dd |
line wrap: on
line source
/** * Author: Jari-Matti Mäkelä * License: GPL3 */ module docgen.document.plaintextwriter; import docgen.document.writer; import docgen.misc.textutils; import tango.io.FileConduit : FileConduit; import tango.io.Print: Print; import tango.text.convert.Layout : Layout; //TODO: this is mostly broken now /** * Writes a plain text document skeleton. */ class PlainTextWriter : AbstractDocumentWriter!(1, "plaintext") { this(DocumentWriterFactory factory, OutputStream[] outputs) { super(factory, outputs); } void generateDocument() { auto output = new Print!(char)(new Layout!(char), outputs[0]); output( plainTextHeading(factory.options.templates.title ~ " Reference Manual") ~ factory.options.templates.versionString ~ \n ~ "Generated by " ~ docgen_version ~ \n ~ timeNow() ~ \n \n \n ~ plainTextHorizLine() ~ \n \n ~ plainTextHeading("Table of Contents") ~ \n ~ plainTextHeading("Module documentation") ~ \n ~ plainTextHeading("File listings") ~ \n ~ plainTextHeading("Dependency diagram") ~ \n ); } }