Esempio n. 1
0
 def __init__(self):
     self.document = None
     Writer.__init__(self)
Esempio n. 2
0
 def __init__(self):
     self.document = None
     Writer.__init__(self)
 def __init__(self, builder, single=False):
     Writer.__init__(self)
     self.single = single
     self.builder = builder
Esempio n. 4
0

class Translator(nodes.NodeVisitor):
    def __init__(self, document):
        super().__init__(document)
        self._depth = 0

    def dispatch_visit(self, node):
        self._depth += 1
        return super().dispatch_visit(node)

    def dispatch_departure(self, node):
        r = super().dispatch_departure(node)
        self._depth -= 1
        return r

    def unknown_visit(self, node):
        i = self._depth
        nodename = node.__class__.__name__
        logger.debug("%svisit %s[%d] :%s", "  " * i, nodename, i, node)

    def unknown_departure(self, node):
        i = self._depth
        nodename = node.__class__.__name__
        logger.debug("%sdeparture %s[%d] :%s", "  " * i, nodename, i, node)


from docutils.core import publish_cmdline  # NOQA
logging.basicConfig(level=logging.DEBUG)
publish_cmdline(writer=Writer())
Esempio n. 5
0
 def __init__(self, builder):
     Writer.__init__(self)
     self.builder = builder
     self.translator_class = ComponentTranslator
Esempio n. 6
0
 def __init__(self, flowdocument=True, xclass=True):
     self.flowdocument = flowdocument
     self.xclass = xclass
     Writer.__init__(self)
Esempio n. 7
0
 def __init__(self, visitor):
     self.visitor = visitor
     Writer.__init__(self)
 def __init__(self, builder, single=False):
     Writer.__init__(self)
     self.single = single
     self.builder = builder
Esempio n. 9
0
 def __init__(self):
     Writer.__init__(self)
     self.translator_class = DotTranslator
Esempio n. 10
0
 def __init__(self, builder):
     Writer.__init__(self)
     self.builder = builder
     self.translator_class = ComponentTranslator
Esempio n. 11
0
 def __init__(self, builder):
     Writer.__init__(self)
     self.builder = builder