Sphinx Objects.inv Encoder/Decoder¶
When documentation is built using, e.g., Sphinx’s StandaloneHTMLBuilder
,
an inventory of the named objects in the documentation set is dumped
to a file called objects.inv
in the html build directory. This file is read by intersphinx
when
generating links in other documentation.
Since version 1.0 of Sphinx (~July 2010), the data in these objects.inv
inventories is compressed by
zlib
(presumably to reduce storage requirements and improve download speeds; “version 2”),
whereas prior to that date the data was left uncompressed (“version 1”). This compression renders
the files non-human-readable. It is the purpose of this package to enable quick and simple
encoding/decoding of these files.
In particular, sphobjinv
was developed to satisfy two primary use cases:
- Searching and inspection of
objects.inv
contents in order to identify how to properly insertintersphinx
references.
- Assembly of new
objects.inv
files in order to allowintersphinx
cross-referencing of other documentation sets that were not created by Sphinx.
Sphinx Objects.inv Encoder/Decoder is available on PyPI under sphobjinv
:
pip install sphobjinv
The package is configured for use both as a command-line script and as a Python package.
The project source repository is on GitHub: bskinn/sphobjinv.