nodes of doctree, but there is no module name there. The code:
def writedata(app, doctree, docname):
for node in doctree.traverse():
print node.tagname
def setup(app):
app.connect("doctree-resolved", writedata)
For example, here is the contents of sdl2_sdlgfx.rst:
.. module:: sdl2.sdlgfx
:synopsis: SDL2_gfx library wrapper
sdl2.sdlgfx - SDL2_gfx library wrapper
======================================
The :mod:`sdl2.sdlgfx` module is a :mod:`ctypes`-based wrapper
around the SDL2_gfx library. It wraps nearly all publicly accessible
structures and functions of the SDL2_gfx library to be accessible from
Python code.
A detailed documentation about the behaviour of the different functions
can found on the `SDL2_gfx project website
And output for the sdl2_sdlgfx.rst processing:
...
writing output... [100%] modules/sdl2_sdlgfx
document
target
index
section
title
#text
paragraph
#text
reference
literal
#text
#text
reference
literal
#text
#text
paragraph
#text
reference
#text
target
#text
generating indices... genindex py-modindex
...