Metadata-Version: 2.4
Name: griffonner
Version: 0.1.1
Summary: A templating tool for Griffe.
Author-email: Will Langdale <willdon@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Department for Business and Trade
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: <3.14,>=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: griffe>=1.12.1
Requires-Dist: typer>=0.16.1
Requires-Dist: jinja2>=3.1.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: pydantic>=2.0.0
Dynamic: license-file

# Griffonner

Template-first Python documentation generator that gets out of your way.

> *From French "griffonner" (to scribble/draft) - because Griffe finds it, you sketch it out*

## Quick start

1. Create a markdown file with frontmatter:

```markdown
---
template: "python/default/module.md.jinja2"
griffe_target: "mypackage.utils"
output:
  filename: "api-utils.md"
---

# Optional content here
```

2. Generate documentation:

```shell
pip install griffonner
griffonner generate docs/pages/
```

That's it! Griffonner uses [Griffe](https://mkdocstrings.github.io/griffe/) to parse your Python code and Jinja2 templates to generate docs in any format you want.

## Features

- **Zero opinions** - You control output format through templates
- **Frontmatter-driven** - Configuration in your markdown files
- **Template ecosystem** - Share and reuse templates
- **Format agnostic** - Generate Markdown, RST, HTML, JSON, anything

## Example templates

```shell
# List available templates
griffonner templates

# Generate with custom template
---
template: "python/gitlab-wiki/module.md.jinja2"
griffe_target: "myapp.database"
custom_vars:
  emoji: "🗄️"
  category: "Core"
---
```

## CLI

```shell
griffonner generate docs/pages/           # Generate all
griffonner generate docs/pages/api.md    # Generate one
griffonner watch docs/pages/             # Watch mode
```

## Contributing

We use [uv](https://github.com/astral-sh/uv) for dependency management and [just](https://github.com/casey/just) for task running:

```shell
git clone https://github.com/yourusername/griffonner
cd griffonner
uv sync
just test    # Run tests
just format  # Lint and format code
just -l      # See other tasks
```
