Metadata-Version: 2.4
Name: hexdoc
Version: 1!0.1.0a31
Summary: Python web book docgen for Patchouli and Hex Casting.
Project-URL: Homepage, https://hexdoc.hexxy.media
Project-URL: Documentation, https://hexdoc.hexxy.media/docs
Project-URL: Changelog, https://github.com/hexdoc-dev/hexdoc/blob/main/CHANGELOG.md
Project-URL: Source, https://github.com/hexdoc-dev/hexdoc
Project-URL: Demo, https://book.hexxy.media
Author: object-Object, Alwinfy
License: MIT License
        
        Copyright (c) 2023 object-Object
        
        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.
License-File: LICENSE
Keywords: hexdoc
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Java
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Kotlin
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Documentation
Classifier: Topic :: File Formats :: JSON
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Localization
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: click<8.2.0
Requires-Dist: frozendict~=2.4
Requires-Dist: hatch~=1.9
Requires-Dist: importlib-resources~=6.0
Requires-Dist: jinja2~=3.1
Requires-Dist: minecraft-render~=2.0.0a6
Requires-Dist: moderngl-window~=2.4
Requires-Dist: moderngl[headless]~=5.10
Requires-Dist: more-itertools~=10.1
Requires-Dist: nbtlib==1.12.1
Requires-Dist: networkx~=3.2
Requires-Dist: ordered-set~=4.1
Requires-Dist: packaging~=23.2
Requires-Dist: pillow~=11.0
Requires-Dist: pluggy~=1.3
Requires-Dist: pydantic!=2.9.0,<3,>=2.7.1
Requires-Dist: pydantic-settings!=2.6.0,~=2.0
Requires-Dist: pygithub~=2.1
Requires-Dist: pyjson5~=1.6
Requires-Dist: requests~=2.31
Requires-Dist: rich~=13.3.4
Requires-Dist: svglib~=1.5.1
Requires-Dist: typer~=0.12
Requires-Dist: typing-extensions~=4.6
Requires-Dist: yarl~=1.9
Provides-Extra: dev
Requires-Dist: copier-template-tester; extra == 'dev'
Requires-Dist: nox[uv]; extra == 'dev'
Requires-Dist: pdoc~=14.1; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pyright==1.1.361; extra == 'dev'
Requires-Dist: pytest-dependency~=0.5; extra == 'dev'
Requires-Dist: pytest-describe~=2.2; extra == 'dev'
Requires-Dist: pytest~=7.4; extra == 'dev'
Requires-Dist: pyyaml-include<2; extra == 'dev'
Requires-Dist: ruff~=0.3.2; extra == 'dev'
Requires-Dist: syrupy~=4.6; extra == 'dev'
Provides-Extra: pdoc
Requires-Dist: pdoc~=14.1; extra == 'pdoc'
Provides-Extra: test
Requires-Dist: copier-template-tester; extra == 'test'
Requires-Dist: pyright==1.1.361; extra == 'test'
Requires-Dist: pytest-dependency~=0.5; extra == 'test'
Requires-Dist: pytest-describe~=2.2; extra == 'test'
Requires-Dist: pytest~=7.4; extra == 'test'
Requires-Dist: pyyaml-include<2; extra == 'test'
Requires-Dist: syrupy~=4.6; extra == 'test'
Description-Content-Type: text/markdown

<p align="center">
  <img alt="hexdoc logo" src="https://github.com/hexdoc-dev/hexdoc/raw/main/media/hexdoc.svg" height="200" />
  <br /><br />
  <a href="https://hexdoc.hexxy.media/"><img alt="Docs - hexdoc.hexxy.media" src="https://img.shields.io/badge/docs-hexdoc.hexxy.media-darkmagenta"></a>
  <a href="https://pypi.org/project/hexdoc/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/hexdoc"></a>
  <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/hexdoc">
  <a href="https://github.com/hexdoc-dev/hexdoc/actions/workflows/ci.yml"><img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/hexdoc-dev/hexdoc/ci.yml?logo=github&label=ci"></a>
  <a href="https://github.com/hexdoc-dev/hexdoc#badges"><img src="https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc" alt="hexdoc" style="max-width:100%;"></a>
</p>

# hexdoc

A [Jinja](https://jinja.palletsprojects.com/en/3.1.x/)-based documentation generator for [Patchouli](https://github.com/VazkiiMods/Patchouli) books.

This is the library that powers [Hex Casting](https://github.com/gamma-delta/HexMod)'s web book.

Check out the docs at [https://hexdoc.hexxy.media](https://hexdoc.hexxy.media)!

## IMPORTANT: Version incompatibilities

There are issues related to installing hexdoc with the following dependency versions:
* Python 3.12+ on Windows: https://github.com/aio-libs/multidict/issues/887

hexdoc is known to work with Python 3.11.

## Plugins

hexdoc has a few Copier templates that you can use to set up a hexdoc plugin for your mod:

* [hexdoc-mod-template](https://github.com/hexdoc-dev/hexdoc-mod-template): generic template
* [hexdoc-hexcasting-template](https://github.com/hexdoc-dev/hexdoc-hexcasting-template): Hex Casting addons (also compatible with [HexDummy](https://github.com/FallingColors/hexdummy)!)

## Support

hexdoc does not currently have a dedicated support server. If you have any questions, please feel free to join the [Hex Casting Discord server](https://discord.gg/4xxHGYteWk) and ask in the [#hexdoc](https://discord.com/channels/936370934292549712/1180655324684894309) channel, or open an [issue](https://github.com/hexdoc-dev/hexdoc/issues)/[discussion](https://github.com/hexdoc-dev/hexdoc/discussions) on GitHub.

## Contributing

### Setup

Automatically set up a development environment with Nox:

```sh
pipx install nox  # pipx (recommended)
python3 -m pip install nox  # pip

nox -s setup
# next, run the venv activation command printed by uv
```

Manual setup:

```sh
git submodule update --init

python3.11 -m venv venv

.\venv\Scripts\activate   # Windows
. venv/bin/activate.fish  # fish
source venv/bin/activate  # everything else

pip install -e .[dev]
pre-commit install
```

### Usage

For local testing, create a file called `.env` in the repo root following this template:
```sh
GITHUB_SHA=main
GITHUB_REPOSITORY=hexdoc-dev/hexdoc
GITHUB_PAGES_URL=https://hexdoc.hexxy.media
```

Useful commands:
```sh
# show help
hexdoc -h

# serve hexdoc resources locally
# this is useful if serving other books locally that depend on hexdoc resources
nodemon --exec "hexdoc serve --port 8001 --no-merge"

# render and serve the Hex Casting web book in watch mode
nodemon

# start the Python interpreter with some extra local variables
hexdoc repl

# run tests
pytest  # fast, skips Cookiecutter
nox  # slow, full test suite in an isolated venv
nox --no-install  # after the first Nox run, use this to skip reinstalling everything

# update test snapshots (only running sessions with the tag "test")
nox -t test -- --snapshot-update

# run hexdoc commands in an isolated environment to ensure it works on its own
nox -s hexdoc -- build
nox -s hexdoc -- repl

# set up a dummy book for local testing
nox -s dummy_setup
nox -s dummy_serve

nox -s dummy_hexdoc -- build

nox -s dummy_clean

# generate and run the full docs website locally, or just run Docusaurus
nox -t docs
nox -s docusaurus
```

## Badges

### Shields.io

<a href="https://github.com/hexdoc-dev/hexdoc"><img src="https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc" alt="hexdoc" style="max-width:100%;"></a>
<a href="https://github.com/hexdoc-dev/hexdoc"><img src="https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc?label=1" alt="powered by hexdoc" style="max-width:100%;"></a>

#### Markdown

```md
[![hexdoc](https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc)](https://github.com/hexdoc-dev/hexdoc)

[![powered by hexdoc](https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc?label=1)](https://github.com/hexdoc-dev/hexdoc)
```

#### HTML

```html
<a href="https://github.com/hexdoc-dev/hexdoc"><img src="https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc" alt="hexdoc" style="max-width:100%;"></a>

<a href="https://github.com/hexdoc-dev/hexdoc"><img src="https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc?label=1" alt="powered by hexdoc" style="max-width:100%;"></a>
```

#### reStructuredText

```rst
.. image:: https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc
    :target: https://github.com/hexdoc-dev/hexdoc
    :alt: hexdoc

.. image:: https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc?label=1
    :target: https://github.com/hexdoc-dev/hexdoc
    :alt: powered by hexdoc
```

### Devin's Badges

<a target="_blank" href="https://hexcasting.hexxy.media"><img src="https://github.com/SamsTheNerd/HexGloop/blob/73ea39b3becd/externalassets/hexdoc-badgecozy.svg?raw=true" alt="A badge for hexdoc in the style of Devins Badges" width=225></a>
<a target="_blank" href="https://addons.hexxy.media" height=75><img src="https://github.com/SamsTheNerd/HexGloop/blob/73ea39b3becd/externalassets/addon-badge-cozy.svg?raw=true" alt="A badge for addons.hexxy.media in the style of Devins Badges" width=200></a>

Thanks to [Sam](https://github.com/SamsTheNerd) for making these!

#### HTML

```html
<a target="_blank" href="INSERT_YOUR_BOOK_LINK_HERE"><img src="https://github.com/SamsTheNerd/HexGloop/blob/73ea39b3becd/externalassets/hexdoc-badgecozy.svg?raw=true" alt="A badge for hexdoc in the style of Devins Badges" width=225></a>

<a target="_blank" href="https://addons.hexxy.media" height=75><img src="https://github.com/SamsTheNerd/HexGloop/blob/73ea39b3becd/externalassets/addon-badge-cozy.svg?raw=true" alt="A badge for addons.hexxy.media in the style of Devins Badges" width=200></a>
```
