Skip to main content

A tool for bootstrapping and managing documentation project structures

Project description

DocStrap

A tool for creating structured documentation hierarchies with optional MkDocs integration.

Features

  • Create consistent documentation structures
  • Optional numbered prefixes for ordering (010_, 020_, etc.)
  • Automatic markdown headings
  • MkDocs integration with navigation structure
  • Interactive, silent, or dry-run modes

Installation

pipx install docstrap  # Recommended
# or: pip install docstrap

Quick Start

  1. Generate config:
docstrap init
  1. Create structure:
docstrap create -c docstrap.yaml

Additional options:

docstrap create -c docstrap.yaml [options]
  -d DIR        # Target directory
  --dry-run     # Preview changes
  -y            # Skip prompts
  --mkdocs      # Generate mkdocs.yaml

Configuration

Example docstrap.yaml:

# Base settings
docs_dir: "docs"
use_numbered_prefix: false  # Optional file/dir prefixes (010_, 020_, etc.)
use_markdown_headings: true

# Documentation structure
directories:
  guides:
    - getting-started.md
    - configuration.md
  reference:
    - api.md

top_level_files:
  - index.md

# MkDocs integration (optional)
generate_mkdocs: true
mkdocs_config:
  site_name: "My Documentation"
  theme:
    name: "material"
  markdown_extensions:
    - toc
    - admonition
    - pymdownx.highlight

Python API

from docstrap import DocumentationManager, StructureConfig, SilentFileHandler

config = StructureConfig.from_yaml("docstrap.yaml")
# or: config = StructureConfig(docs_dir="docs", ...)

manager = DocumentationManager(config, SilentFileHandler())
manager.create_structure()

Development

git clone https://github.com/yourusername/docstrap.git
cd docstrap
poetry install
poetry run pre-commit install
poetry run pytest

License

MIT - see LICENSE.md

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

docstrap-0.1.2.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

docstrap-0.1.2-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file docstrap-0.1.2.tar.gz.

File metadata

  • Download URL: docstrap-0.1.2.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for docstrap-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c9b570d5c2398cc85b1e13d7c74d455ea857af65c01dca0b0b33d5cf1d6f563d
MD5 7616a1f1a7bec1aacfa34e0c86cb3220
BLAKE2b-256 1ffb231921ef8b1d27c8e1ae7445ae7a7edf4020bda52809b9ff937c1ede508b

See more details on using hashes here.

Provenance

The following attestation bundles were made for docstrap-0.1.2.tar.gz:

Publisher: tag-publish.yml on tjcunliffe/docstrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docstrap-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: docstrap-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for docstrap-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87d22301c29d85798c7477845a3138ea4bc65c2c40fdca95e5207f06a565e72d
MD5 692ec55837ff111957b2e1533d13b966
BLAKE2b-256 e8657455c6a0210bc7bc2f3739a77c03d47e616a8019133a51f775f969452764

See more details on using hashes here.

Provenance

The following attestation bundles were made for docstrap-0.1.2-py3-none-any.whl:

Publisher: tag-publish.yml on tjcunliffe/docstrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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