I wrote this mail earlier to sphinx-dev: https://groups.google.com/forum/#!topic/sphinx-dev/GPfhZ9vXVIM
I think that was the wrong group, so I'm following up here. After an afternoon of experimentation, I think I've got something more or less working. http://pastebin.ubuntu.com/6842169/ 'Savvy' is the codename of the project. The basic goal here was to create a specialized index that could list all the python 'data' objects in a single, standalone index. I settled on writing an extension to react to the autodoc-process-docstring event because I wanted access to the 'name', 'obj', and 'lines' parameters. The reason is, if we encounter a docstring such as: #: This describes why we need foo and why we set it to bar foo = /path/to/bar Then in my index, I will have access to 'foo', '/path/to/bar', and the docstring comment itself. I also tried defining my own custom Index class and adding it to the supplied 'py' domain. This made sense to me because the rest of the project is in python, and I am extracting python docstrings from other parts of the code. Unfortunately, this is where I tripped over some sphinx internals I'm not understanding, and this is where I hope I can get some insight. If I do not monkeypatch in my conf.py (as seen in lines 41--48 in the pastebin), then I get an warning upon 'make html': index.rst:44: WARNING: undefined label: savvypaths (if the link has no caption the label must precede a section header) I'm sure I am making a mistake, but I'm not really sure why. Monkey patching makes the warning go away and also properly creates a link to py-savvypaths.html from index.html. Can anyone help? Thanks! -- 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 post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/groups/opt_out.
