Skip to main content

Turn docstrings into man pages using Sphinx, and view the result with man.

Installation

python -mpip install git+https://github.com/anntzer/speedoc

Tests can be run with pytest.

Usage

speedoc [--opts ...] obj.to.document

Options are passed as is to python -msphinx. By default, sphinx is invoked as

# $tmpdir1, $tmpdir2 are set up by speedoc.
# -bman: build a man page; -q: quietly
python -msphinx $tmpdir1 $tmpdir2 -bman -q -Dextensions=sphinx.ext.napoleon

with a minimal conf.py that sets man_pages = [("contents", obj_name, "\n", "", "3")]. To use, e.g., numpydoc instead of sphinx.ext.napoleon, call

speedoc -Dextensions=sphinx.ext.autodoc,numpydoc obj.to.document

(With numpydoc≥0.9, it is not necessary anymore to explicitly load autodoc.)

Options to man can be passed by setting the (standard) MANOPT environment variable. For example, justification can be disabled with

MANOPT=--nj speedoc ...

Troubleshooting

Q:

Docstrings are rendered terribly!

A:

Invalid RST formatting is very common :-(

Release files for speedoc 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for speedoc 0.2
File Interpreter ABI Platform
speedoc-0.2-py3-none-any.whl Python 3 none any Details

Release files / speedoc-0.2-py3-none-any.whl

Download URL speedoc-0.2-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f01eececeac24e52b90f6e04e86957af3ebd30b2d5a213ec11da672dd6b999a
BLAKE2b-256 checksum
How to use checksums
c327fdfde00dbdb4a90a37b629a23c26e0a566641ef8f915012aafbfe08663a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page