The code is here:

https://github.com/kaymccormick/heptet-sphinx-ext/blob/master/heptet_sphinx_ext.py

It's not ready for primetime - it only works for the XML builder, and is
designed to generate XLink-based references. But it can be adapted. I'm
playing around with it right now and trying to figure it out.

Take a look at build_finished.

    master_doc = app.config.master_doc
    toctree = TocTree(app.env).get_toctree_for(master_doc, app.builder,
False)
    if toctree:
        visitor = TocVisitor(document, app.builder, app.config.master_doc)
        visitor.new['master'] = True
        toctree.walkabout(visitor)
        document.children.append(visitor.new)

this code builds the toc tree, transforms it (not in place) and then places
it into a new document ('_links'). It isn't what you want but could give
you a head start.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/CANQ3tOhjxA_Za7ervhEmut20ZQGe%2BjnbhE4j-c_hUprQirn%3DUg%40mail.gmail.com.

Reply via email to