Metadata-Version: 2.4
Name: mkdocstrings-twincat
Version: 0.1.0
Summary: A Twincat handler for mkdocstrings that uses pytwincatparser.
Project-URL: Homepage, https://drehstromer.github.io/mkdocstrings-twincat
Project-URL: Documentation, https://drehstromer.github.io/mkdocstrings-twincat
Project-URL: Changelog, https://drehstromer.github.io/mkdocstrings-twincat/changelog
Project-URL: Repository, https://github.com/drehstromer/mkdocstrings-twincat
Project-URL: Issues, https://github.com/drehstromer/mkdocstrings-twincat/issues
Project-URL: Discussions, https://github.com/drehstromer/mkdocstrings-twincat/discussions
Project-URL: Gitter, https://gitter.im/mkdocstrings-twincat/community
Project-URL: Funding, https://github.com/sponsors/drehstromer
Author-email: Samuel Ruckli <privat@samuelruckli.ch>
License-Expression: MIT
License-File: LICENSE
Keywords: documentation,mkdocs,mkdocstrings,pytwincatparser,twincat
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: mkdocstrings>=0.18
Requires-Dist: pytwincatparser>=0.1.0
Description-Content-Type: text/markdown

# mkdocstrings-twincat

[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://drehstromer.github.io/mkdocstrings-twincat/)
[![pypi version](https://img.shields.io/pypi/v/mkdocstrings-twincat.svg)](https://pypi.org/project/mkdocstrings-twincat/)

A Twincat handler for mkdocstrings that uses pytwincatparser to parse TwinCAT PLC files.

## Installation

```bash
pip install mkdocstrings-twincat
```

## Usage

To use this handler, you need to configure it in your `mkdocs.yml` file:

```yaml
plugins:
  - mkdocstrings:
      handlers:
        twincat:
          options:
            extra:
              search_path: path/to/your/twincat/files
```

Then, in your Markdown files, you can use the `::: twincat` directive to include documentation for TwinCAT objects:

```markdown
::: twincat:FB_Example
```

This will include documentation for the `FB_Example` POU. You can also document methods and properties:

```markdown
::: twincat:FB_Example.Method1
```

## Requirements

This handler requires the `pytwincatparser` package, which is automatically installed as a dependency.

## Development

### Building and Publishing

This project uses [uv](https://github.com/astral-sh/uv) for building and publishing. To build and publish the package, you can use one of the provided scripts:

#### Windows

```powershell
.\build_uv.ps1
```

#### Python Script

```bash
python build_uv.py
```

These scripts will:
1. Clean up previous builds
2. Build the package using uv
3. Ask if you want to publish the package to PyPI
4. Publish the package if you choose to do so
