All Projects → bskinn → sphobjinv

bskinn / sphobjinv

Licence: MIT license
Toolkit for manipulation and inspection of Sphinx objects.inv files

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to sphobjinv

Readthedocs.org
The source code that powers readthedocs.org
Stars: ✭ 6,802 (+12733.96%)
Mutual labels:  sphinx, sphinx-doc
MapServer-documentation
Source repository for the MapServer documentation, for the live website. Please submit pull requests to the 'main' branch.
Stars: ✭ 29 (-45.28%)
Mutual labels:  sphinx, sphinx-doc
sphinx-theme
(Deprecated) Make Sphinx docs look like MDN
Stars: ✭ 27 (-49.06%)
Mutual labels:  sphinx, sphinx-doc
panda3d-docs
Sphinx documentation for Panda3D
Stars: ✭ 37 (-30.19%)
Mutual labels:  sphinx, sphinx-doc
sphinxcontrib-django
This is a sphinx extension which improves the documentation of Django apps.
Stars: ✭ 37 (-30.19%)
Mutual labels:  sphinx, sphinx-doc
sphinx-server
Sphinx documentation Docker image with Python server and support for PlantUML and more.
Stars: ✭ 62 (+16.98%)
Mutual labels:  sphinx, sphinx-doc
gui-python-gtk
Repositório criado para documentar e centralizar conteúdos, dicas, tutoriais e exemplos de código sobre a construção de interfaces com a linguagem de programação Python (PyGObject) e o toolkit gráfico Gtk 4.
Stars: ✭ 85 (+60.38%)
Mutual labels:  sphinx, sphinx-doc
sphinx rtd dark mode
Adds a toggleable dark mode to the Read the Docs theme for Sphinx.
Stars: ✭ 29 (-45.28%)
Mutual labels:  sphinx, sphinx-doc
hou packager
A simple SideFX Houdini package manager
Stars: ✭ 28 (-47.17%)
Mutual labels:  manager
Unity-delayed-asset
**DEPRECATED** Plugin for Unity that allows to assign assets in the inspector while preventing Unity from automatically loading the assets in memory when a scene is loaded
Stars: ✭ 19 (-64.15%)
Mutual labels:  inspector
alfred-wf-bluetooth-manager
Connect and disconnect a bluetooth device easily
Stars: ✭ 58 (+9.43%)
Mutual labels:  manager
sphinx-autorun
Sphinx extension to execute the code output it into a document.
Stars: ✭ 14 (-73.58%)
Mutual labels:  sphinx-doc
InvSee
A PocketMine-MP plugin that lets you view and modify offline and online players' inventories in real-time!
Stars: ✭ 19 (-64.15%)
Mutual labels:  inventory
Port-Able-Suite
🌐 Manager for portable applications
Stars: ✭ 35 (-33.96%)
Mutual labels:  manager
ovh-manager-web
OVH Control Panel Web UI — Official Repository
Stars: ✭ 61 (+15.09%)
Mutual labels:  manager
react-tag-manager
Google Tag Manager for React
Stars: ✭ 24 (-54.72%)
Mutual labels:  manager
Inventory-Management-System-Django
A Inventory management system written in DJango
Stars: ✭ 71 (+33.96%)
Mutual labels:  inventory
eerie
The package manager for Io.
Stars: ✭ 22 (-58.49%)
Mutual labels:  manager
mventory
An API-driven solution for Makerspaces, Tinkerers, and Hackers.
Stars: ✭ 102 (+92.45%)
Mutual labels:  inventory
ProjectCleaner
Unreal engine plugin for managing all unused assets and empty folders in project.
Stars: ✭ 53 (+0%)
Mutual labels:  manager

sphobjinv: Manipulate and inspect Sphinx objects.inv files

Current Development Version:

GitHub Workflow Status

Most Recent Stable Release:

https://img.shields.io/pypi/v/sphobjinv.svg?logo=pypi

https://img.shields.io/pypi/pyversions/sphobjinv.svg?logo=python

Info:

Join the chat at https://gitter.im/sphobjinv/community https://pepy.tech/badge/sphobjinv/month

Using Sphinx?

Having trouble writing cross-references?

sphobjinv (short for 'sphinx objects.inv') can help!

The syntax required for a functional Sphinx cross-reference is highly non-obvious in many cases. Sometimes Sphinx can guess correctly what you mean, but it's pretty hit-or-miss. The best approach is to provide Sphinx with a completely specified cross-reference, and that's where sphobjinv comes in.

After a pip install sphobjinv, find the documentation set you want to cross-reference into, and pass it to sphobjinv suggest.

For internal cross-references, locate objects.inv within build/html:

$ sphobjinv suggest doc/build/html/objects.inv as_rst -st 58

  Name                                                Score
---------------------------------------------------  -------
:py:property:`sphobjinv.data.SuperDataObj.as_rst`      60
:py:class:`sphobjinv.cli.parser.PrsConst`              59
:py:class:`sphobjinv.data.DataFields`                  59
:py:class:`sphobjinv.data.DataObjBytes`                59
:py:class:`sphobjinv.data.DataObjStr`                  59
:py:class:`sphobjinv.data.SuperDataObj`                59
:py:class:`sphobjinv.enum.HeaderFields`                59
:py:class:`sphobjinv.enum.SourceTypes`                 59
:py:function:`sphobjinv.fileops.writebytes`            59
:py:function:`sphobjinv.fileops.writejson`             59
:py:class:`sphobjinv.inventory.Inventory`              59

The -s argument in the above shell command indicates to print the fuzzywuzzy match score along with each search result, and -t 50 changes the reporting threshold for the match score.

For external references, just find the API documentation wherever it lives on the web, and pass sphobjinv suggest a URL from within the documentation set with the --url/-u flag. For example, say I need to know how to cross-reference the linspace function from numpy (see here):

$ sphobjinv suggest https://numpy.org/doc/1.19/reference/index.html linspace -su

No inventory at provided URL.
Attempting "https://numpy.org/doc/1.19/reference/index.html/objects.inv" ...
Attempting "https://numpy.org/doc/1.19/reference/objects.inv" ...
Attempting "https://numpy.org/doc/1.19/objects.inv" ...
Remote inventory found.


  Name                                                           Score
--------------------------------------------------------------  -------
:py:function:`numpy.linspace`                                     90
:py:method:`numpy.polynomial.chebyshev.Chebyshev.linspace`        90
:py:method:`numpy.polynomial.hermite.Hermite.linspace`            90
:py:method:`numpy.polynomial.hermite_e.HermiteE.linspace`         90
:py:method:`numpy.polynomial.laguerre.Laguerre.linspace`          90
:py:method:`numpy.polynomial.legendre.Legendre.linspace`          90
:py:method:`numpy.polynomial.polynomial.Polynomial.linspace`      90
:std:doc:`reference/generated/numpy.linspace`                     90

NOTE that the results from sphobjinv suggest are printed using the longer block directives, whereas cross-references must be composed using the inline directives. Thus, the above linspace() function must be cross-referenced as :func:`numpy.linspace`, not :function:`numpy.linspace`.

Need to edit an inventory after it's created, or compose one from scratch?

sphobjinv can help with that, too.

objects.inv files can be decompressed to plaintext at the commandline:

$ sphobjinv convert plain -o doc/build/html/objects.inv doc/scratch/
Conversion completed.
'...objects.inv' converted to '...objects.txt' (plain).

JSON output is supported (sphobjinv convert json ...), and inventories can be re-compressed to the partially-zlib-compressed form that intersphinx reads (sphobjinv convert zlib ...).

Alternatively, sphobjinv exposes an API to enable automation of inventory creation/modification:

>>> import sphobjinv as soi
>>> inv = soi.Inventory('doc/build/html/objects.inv')
>>> print(inv)
<Inventory (fname_zlib): sphobjinv v2.2, 205 objects>
>>> inv.project
'sphobjinv'
>>> inv.version
'2.2'
>>> inv.objects[0]
DataObjStr(name='sphobjinv.cli.core', domain='py', role='module', priority='0', uri='cli/implementation/core.html#module-$', dispname='-')

The API also enables straightforward re-export of an inventory, for subsequent use with intersphinx cross-references. See the docs for more details.


Full documentation is hosted at Read The Docs.

Available on PyPI (pip install sphobjinv).

Source on GitHub. Bug reports and feature requests are welcomed at the Issues page there.

Copyright (c) Brian Skinn 2016-2022

License: The MIT License. See LICENSE.txt for full license terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].