Use transforms in info_translator tests so we can test title and
[rst2info.git] / texinfo / info_writer.py
blob0646bd660cc802f325662f8a30622b7fc5c0e981
1 from docutils import writers
2 import info_translator
4 class InfoWriter(writers.Writer):
5 supported = ('texinfo')
7 def __init__(self):
8 writers.Writer.__init__(self)
9 self.translator_class = info_translator.InfoTranslator
11 def translate(self):
12 #print "writer.translate(), document=\n%s" % self.document.asdom().childNodes[0].toprettyxml(' ','\n')
13 self.visitor = visitor = self.translator_class(self.document)
14 self.document.walkabout(visitor)
15 self.output = self.visitor.astext()