Metadata-Version: 2.1
Name: pymdownx-blocks
Version: 0.1.1
Summary: A Collection of Blocks for PyMdownX
Author-email: Tyler Baur <baur.tyler@gmail.com>
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Requires-Dist: pymdown-extensions>=10.3.1
Requires-Dist: pyyaml>=6.0.1
Description-Content-Type: text/markdown

# PyMdown Extensions Blocks

[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![PyPI - Version](https://img.shields.io/pypi/v/pymdownx-blocks)](https://pypi.org/project/pymdownx-blocks/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pymdownx-blocks)
[![Tests](https://github.com/TillerBurr/pymdownx-blocks/workflows/Tests/badge.svg)](https://github.com/TillerBurr/pymdownx-blocks/actions)



These are a collection of blocks for the [PyMdown Extensions](https://facelessuser.github.io/pymdown-extensions) that I find useful.

This project is not affiliated with the PyMdown Extensions project and is currently in a very early stage. Currently, there is only one block: `DirTree`.

## Installation

```bash
pip install pymdownx-blocks
```

## Usage
This can be used in MkDocs or by itself. To use in a Python file, we use the following:

```python
import markdown

yaml_str=...
md=markdown.Markdown(extensions=['pymdownx_blocks.dirtree'])
```

To use in MkDocs, register the extension.

```yaml
...
markdown_extensions:
...
- pymdownx_blocks.dirtree
...
```

In a markdown file, 
```
///dirtree

root:
- subdir:
  - File
- another subdir:
  - anotherfile.txt
  - file.csv
///
```


When rendered, this will produce the following tree

<div>
<pre class="admonition note"><p class="admonition-title">Directory Structure</p>
<p> 
root
├── subdir 
│   └── File
└── another subdir
    ├── anotherfile.txt 
    └── file.csv
</p></pre>
</div>


## Contributing 

More blocks are always welcome! This project uses [rye](https:rye-up.com) for dependency
management.

1. Fork the repository
2. Create a branch with the name of the block
3. Implement the block
4. Create a pull request.
