atelier.sphinxconf.refstothis

(This module’s source code is available here.)

A Sphinx extension which adds the refstothis directive.

Thanks to Tomasz Czyż who inspired me to write this. His sphinxcontrib-taglist module uses a different approach, based on the idea that every “reference” to a tag also specifies a text to appear in the list of references. refstothis is for people who don’t want to specify their own text for each tag directive.

TODO:

  • When I do fab fab clean followed by fab docs, then e.g. the refstothis in Baz does not mention all other documents. But when I then touch the baz.rst file and run fab docs, then they are all there. I guess this is because not all documents have been loaded when the rst is being generated.

Functions

docname_join(basedocname, docname)
pprint(object[, stream, indent, width, depth]) Pretty-print a Python object to a stream [default is sys.stdout].
py2rst(x)
setup(app)

Classes

InsertInputDirective(name, arguments, ...) Base class for directives that work by generating rst markup to be forwarded to state_machine.insert_input().
RefsToThis(name, arguments, options, ...) Implements the rst:dir:refstothis directive.
class atelier.sphinxconf.refstothis.RefsToThis(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

Implements the rst:dir:refstothis directive.