Skip to main content

Update documentation files from external content.

Project description

docsub

Update documentation files from external content.

Features

  • Markdown files:
    • Fenced code blocks
  • Readable shell-like rule syntax
  • Idempotent

Installation

uv tool install docsub

Basic usage

This file itself uses docsub to substitute examples from test folder!

Given README.md

# Title

<!-- docsub: cat hello.txt -->
```
```

<!-- docsub: cat hello.py -->
```python
# existing text will be replaced
```

hello.txt

Hello world!

hello.py

def hello():
    print('Hi!')

Get updated README.md

$ uvx docsub -i README.md
# Title

<!-- docsub: cat hello.txt -->
```
Hello world!
```

<!-- docsub: cat hello.py -->
```python
def hello():
    print('Hi!')
```

CLI Reference

$ docsub --help
                                                            
 Usage: python -m docsub [OPTIONS] [FILE]...                
                                                            
 Update documentation files with external content.          
                                                            
╭─ Options ────────────────────────────────────────────────╮
│ --in-place  -i    Overwrite source files.                │
│ --version         Show the version and exit.             │
│ --help            Show this message and exit.            │
╰──────────────────────────────────────────────────────────╯

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

docsub-0.4.0.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

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

docsub-0.4.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file docsub-0.4.0.tar.gz.

File metadata

  • Download URL: docsub-0.4.0.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for docsub-0.4.0.tar.gz
Algorithm Hash digest
SHA256 013aa9dbbc71273156a3aae260c76843d7f7d06a6e0a38559f762244f5dc37fd
MD5 1c442411f5b686e46dae74bf6193ef7e
BLAKE2b-256 923ea67d584e9453795627747437bfc7d1888ba91dece45584deb06cc25a9ecc

See more details on using hashes here.

File details

Details for the file docsub-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: docsub-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for docsub-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f71e366933a2a4c013da4e4a7258a840ad26952a025784e7215dcf0716795fce
MD5 2e64801d18eb8910b8599db58c5e5a4c
BLAKE2b-256 5a754560319476561e915b2bc4d4299bb7964d002d91c980f2f00188c7d2ce65

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