Ejemplo n.º 1
0
    def get(self):
        file = str(os.path.join(config.ROOT_XSL_DIR, self.get_argument('file', 'ambient/blocks/page.xsl')))

        limit = self.get_argument('limit_out', None)

        drawer = Drawer(data_cache.data, data_cache.index)

        graph = create_graph()

        drawer.draw_inside(graph, [file])
        drawer.draw_outside(graph, [file], limit=limit)

        result = render_graph(graph)

        self.set_header('Content-Type', 'image/svg+xml')
        self.finish(result)
Ejemplo n.º 2
0
def render_templates_tree(xsl):
    graph = create_graph()

    logging.debug('TRYING TO RENDER')

    gv.layout(graph, 'dot')

    tree = get_applies_tree(xsl)

    draw_tree(tree, graph, [])
    gv.layout(graph, 'dot')

    data = gv.renderdata(graph, 'svg')

    logging.debug('RENDERED!!!')

    return data
Ejemplo n.º 3
0
def render_templates_tree(xsl):
    graph = create_graph()

    logging.debug('TRYING TO RENDER')

    gv.layout(graph, 'dot')

    tree = get_applies_tree(xsl)

    draw_tree(tree, graph, [])
    gv.layout(graph, 'dot')

    data = gv.renderdata(graph, 'svg')

    logging.debug('RENDERED!!!')

    return data
Ejemplo n.º 4
0
    def get(self):
        file = str(os.path.join(config.ROOT_XSL_DIR, self.get_argument('file', 'ambient/blocks/page.xsl')))

        graph = create_graph()

        graph = draw_inside(
            graph=graph,
            data=data_cache.data,
            search_files=[file],
        )

        graph = draw_outside(
            graph=graph,
            index=data_cache.index,
            search_files=[file],
        )

        result = render_graph(graph)

        self.set_header('Content-Type', 'image/svg+xml')
        self.finish(result)