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.3.0.tar.gz (27.9 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.3.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for docsub-0.3.0.tar.gz
Algorithm Hash digest
SHA256 95b0bec31f45e5a3006984bbe776c4bd0fe8aaaf03b12929936417707ada2b8c
MD5 491981ee3439e0de6560839ebd7187f6
BLAKE2b-256 537c6a23b5b5aaf13a7ecaffdd6f0643dc152c623242f3d389b6966be6b7c6fb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for docsub-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20c7ae58a5ca2e40fe320f034c69519beeb7c50787205feb2d09e41162d0f4cc
MD5 1786020eaa2464d145cbbd5008af1ba7
BLAKE2b-256 61574c2cb584e3a14fac17ea8fdf9ceac776b834bdfb24e9cf9d80b2968dc516

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