Skip to content

Add more CLI Switches for Customization#288

Merged
mhils merged 6 commits intomitmproxy:mainfrom
mhils:cli-switches
Aug 9, 2021
Merged

Add more CLI Switches for Customization#288
mhils merged 6 commits intomitmproxy:mainfrom
mhils:cli-switches

Conversation

@mhils
Copy link
Member

@mhils mhils commented Aug 9, 2021

@Bruntaz convinced me in #283 that we want some additional command line switches for common customizations. This PR adds a dedicated argument group with such customizations. pdoc --help now looks like this:

usage: pdoc [-o DIR] [-d {google,numpy,restructuredtext}] [-e module=url] [--math | --no-math]
            [--show-source | --no-show-source] [--logo URL] [--logo-link URL] [--footer-text TEXT] [-t DIR] [-h HOST]
            [-p PORT] [-n] [--help] [--version]
            [module ...]

Automatically generate API docs for Python modules.

Main Arguments:
  module                Python module names. These may be importable Python module names ("pdoc.doc") or file paths
                        ("./pdoc/doc.py"). (default: [])
  -o DIR, --output-directory DIR
                        Write rendered documentation to the specified directory, don't start a webserver. (default:
                        None)

Customize Rendering:
  -d {google,numpy,restructuredtext}, --docformat {google,numpy,restructuredtext}
                        The default docstring format. (default: None)
  -e module=url, --edit-url module=url
                        A mapping between module names and URL prefixes, used to display an 'Edit' button. May be
                        passed multiple times. Example: pdoc=https://github.com/mitmproxy/pdoc/blob/main/pdoc/
                        (default: [])
  --math, --no-math     Include MathJax to enable math formula rendering. (default: False)
  --show-source, --no-show-source
                        Display "View Source" buttons. (default: True)
  --logo URL            Add a project logo image. (default: None)
  --logo-link URL       Optional URL the logo should point to. (default: None)
  --footer-text TEXT    Custom text for the page footer, for example the project name and current version number.
                        (default: None)
  -t DIR, --template-directory DIR
                        A directory containing Jinja2 templates to customize output. Alternatively, put your
                        templates in $XDG_CONFIG_HOME/pdoc and pdoc will automatically find them. (default: None)

Miscellaneous Options:
  -h HOST, --host HOST  The host on which to run the HTTP server. (default: localhost)
  -p PORT, --port PORT  The port on which to run the HTTP server. (default: 8080)
  -n, --no-browser      Don't open a browser after the web server has started. (default: False)
  --help                Show this help message and exit.
  --version             Show version information and exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant