docstrap


Namedocstrap JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/tjcunliffe/docstrap
SummaryA tool for bootstrapping and managing documentation project structures
upload_time2024-12-04 18:21:39
maintainerNone
docs_urlNone
authorTom Cunliffe
requires_python<4.0,>=3.9
licenseMIT
keywords documentation bootstrap scaffold structure generator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
pipx install docstrap  # Recommended
# or: pip install docstrap
```

## Quick Start

1. Generate config:
```bash
docstrap init
```

2. Create structure:
```bash
docstrap create -c docstrap.yaml
```

Additional options:
```bash
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`:
```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

```python
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

```bash
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](LICENSE.md)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tjcunliffe/docstrap",
    "name": "docstrap",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "documentation, bootstrap, scaffold, structure, generator",
    "author": "Tom Cunliffe",
    "author_email": "tom.cunliffe@onoclea.io",
    "download_url": "https://files.pythonhosted.org/packages/1f/fb/231921ef8b1d27c8e1ae7445ae7a7edf4020bda52809b9ff937c1ede508b/docstrap-0.1.2.tar.gz",
    "platform": null,
    "description": "# DocStrap\n\nA tool for creating structured documentation hierarchies with optional MkDocs integration.\n\n## Features\n\n- Create consistent documentation structures\n- Optional numbered prefixes for ordering (010_, 020_, etc.)\n- Automatic markdown headings\n- MkDocs integration with navigation structure\n- Interactive, silent, or dry-run modes\n\n## Installation\n\n```bash\npipx install docstrap  # Recommended\n# or: pip install docstrap\n```\n\n## Quick Start\n\n1. Generate config:\n```bash\ndocstrap init\n```\n\n2. Create structure:\n```bash\ndocstrap create -c docstrap.yaml\n```\n\nAdditional options:\n```bash\ndocstrap create -c docstrap.yaml [options]\n  -d DIR        # Target directory\n  --dry-run     # Preview changes\n  -y            # Skip prompts\n  --mkdocs      # Generate mkdocs.yaml\n```\n\n## Configuration\n\nExample `docstrap.yaml`:\n```yaml\n# Base settings\ndocs_dir: \"docs\"\nuse_numbered_prefix: false  # Optional file/dir prefixes (010_, 020_, etc.)\nuse_markdown_headings: true\n\n# Documentation structure\ndirectories:\n  guides:\n    - getting-started.md\n    - configuration.md\n  reference:\n    - api.md\n\ntop_level_files:\n  - index.md\n\n# MkDocs integration (optional)\ngenerate_mkdocs: true\nmkdocs_config:\n  site_name: \"My Documentation\"\n  theme:\n    name: \"material\"\n  markdown_extensions:\n    - toc\n    - admonition\n    - pymdownx.highlight\n```\n\n## Python API\n\n```python\nfrom docstrap import DocumentationManager, StructureConfig, SilentFileHandler\n\nconfig = StructureConfig.from_yaml(\"docstrap.yaml\")\n# or: config = StructureConfig(docs_dir=\"docs\", ...)\n\nmanager = DocumentationManager(config, SilentFileHandler())\nmanager.create_structure()\n```\n\n## Development\n\n```bash\ngit clone https://github.com/yourusername/docstrap.git\ncd docstrap\npoetry install\npoetry run pre-commit install\npoetry run pytest\n```\n\n## License\n\nMIT - see [LICENSE.md](LICENSE.md)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool for bootstrapping and managing documentation project structures",
    "version": "0.1.2",
    "project_urls": {
        "Documentation": "https://github.com/tjcunliffe/docstrap",
        "Homepage": "https://github.com/tjcunliffe/docstrap",
        "Repository": "https://github.com/tjcunliffe/docstrap"
    },
    "split_keywords": [
        "documentation",
        " bootstrap",
        " scaffold",
        " structure",
        " generator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e8657455c6a0210bc7bc2f3739a77c03d47e616a8019133a51f775f969452764",
                "md5": "692ec55837ff111957b2e1533d13b966",
                "sha256": "87d22301c29d85798c7477845a3138ea4bc65c2c40fdca95e5207f06a565e72d"
            },
            "downloads": -1,
            "filename": "docstrap-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "692ec55837ff111957b2e1533d13b966",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 18296,
            "upload_time": "2024-12-04T18:21:37",
            "upload_time_iso_8601": "2024-12-04T18:21:37.781433Z",
            "url": "https://files.pythonhosted.org/packages/e8/65/7455c6a0210bc7bc2f3739a77c03d47e616a8019133a51f775f969452764/docstrap-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ffb231921ef8b1d27c8e1ae7445ae7a7edf4020bda52809b9ff937c1ede508b",
                "md5": "7616a1f1a7bec1aacfa34e0c86cb3220",
                "sha256": "c9b570d5c2398cc85b1e13d7c74d455ea857af65c01dca0b0b33d5cf1d6f563d"
            },
            "downloads": -1,
            "filename": "docstrap-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "7616a1f1a7bec1aacfa34e0c86cb3220",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 14048,
            "upload_time": "2024-12-04T18:21:39",
            "upload_time_iso_8601": "2024-12-04T18:21:39.742005Z",
            "url": "https://files.pythonhosted.org/packages/1f/fb/231921ef8b1d27c8e1ae7445ae7a7edf4020bda52809b9ff937c1ede508b/docstrap-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-04 18:21:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tjcunliffe",
    "github_project": "docstrap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "docstrap"
}
        
Elapsed time: 0.90347s