Skip to main content

Command-line tools for Sphinx documentation management

Project description

Sphinx-CMD

A collection of command-line tools for managing Sphinx documentation.

Installation

pip install sphinx-cmd

Commands

The sphinx-cmd tool provides subcommands for different Sphinx documentation management tasks.

sphinx-cmd rm

Delete unused .rst files and their unique assets if not used elsewhere.

# Remove files and assets
sphinx-cmd rm path/to/docs

# Dry run to preview deletions
sphinx-cmd rm path/to/docs --dry-run

Development

# Clone the repository
git clone https://github.com/yourusername/sphinx-cmd.git
cd sphinx-cmd

# Install in development mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run linters
black sphinx_cmd tests
flake8 sphinx_cmd tests
mypy sphinx_cmd

# Test the command
sphinx-cmd --help
sphinx-cmd rm --help

Adding New Commands

The architecture is designed to make adding new commands easy:

  1. Create a new file in sphinx_cmd/commands/ (e.g., new_command.py)
  2. Implement an execute(args) function in your new file
  3. Import the command in sphinx_cmd/cli.py
  4. Add a new subparser for your command in create_parser()

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_cmd-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_cmd-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_cmd-0.1.0.tar.gz.

File metadata

  • Download URL: sphinx_cmd-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for sphinx_cmd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4798198b2b01b30726092e72afbc7f6de0b756f6e0194d6db842883ce8fd9be1
MD5 1abc8e48fa4148d33c2f994ae1d1b72a
BLAKE2b-256 22c02eeb566d8561d4e0d3fac3f9817aa29666e1bed1bd3793b7e51afbf6d59b

See more details on using hashes here.

File details

Details for the file sphinx_cmd-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sphinx_cmd-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for sphinx_cmd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82cf177e424f4650a2a09c30339940a38b49004a6434c530c09a30b64064064f
MD5 b43efa9dee3d605de164e5b2df89bc7b
BLAKE2b-256 0ce38100b8b2294e0177554ef5bd8cf75b52b1c41f8331c7249216cef5715bc8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page