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
- Generate config:
docstrap init
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9b570d5c2398cc85b1e13d7c74d455ea857af65c01dca0b0b33d5cf1d6f563d
|
|
| MD5 |
7616a1f1a7bec1aacfa34e0c86cb3220
|
|
| BLAKE2b-256 |
1ffb231921ef8b1d27c8e1ae7445ae7a7edf4020bda52809b9ff937c1ede508b
|
Provenance
The following attestation bundles were made for docstrap-0.1.2.tar.gz:
Publisher:
tag-publish.yml on tjcunliffe/docstrap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docstrap-0.1.2.tar.gz -
Subject digest:
c9b570d5c2398cc85b1e13d7c74d455ea857af65c01dca0b0b33d5cf1d6f563d - Sigstore transparency entry: 153383250
- Sigstore integration time:
-
Permalink:
tjcunliffe/docstrap@e315de3d6b9a6704c2dbc096134c2e1684e2e420 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/tjcunliffe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tag-publish.yml@e315de3d6b9a6704c2dbc096134c2e1684e2e420 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87d22301c29d85798c7477845a3138ea4bc65c2c40fdca95e5207f06a565e72d
|
|
| MD5 |
692ec55837ff111957b2e1533d13b966
|
|
| BLAKE2b-256 |
e8657455c6a0210bc7bc2f3739a77c03d47e616a8019133a51f775f969452764
|
Provenance
The following attestation bundles were made for docstrap-0.1.2-py3-none-any.whl:
Publisher:
tag-publish.yml on tjcunliffe/docstrap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docstrap-0.1.2-py3-none-any.whl -
Subject digest:
87d22301c29d85798c7477845a3138ea4bc65c2c40fdca95e5207f06a565e72d - Sigstore transparency entry: 153383253
- Sigstore integration time:
-
Permalink:
tjcunliffe/docstrap@e315de3d6b9a6704c2dbc096134c2e1684e2e420 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/tjcunliffe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tag-publish.yml@e315de3d6b9a6704c2dbc096134c2e1684e2e420 -
Trigger Event:
push
-
Statement type: