Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axelgard/inkpot
a simple library for generating documentation from docstrings
https://github.com/axelgard/inkpot
docs-generator docstrings documentation markdown pip python python-library python-package python3 simple tool
Last synced: 1 day ago
JSON representation
a simple library for generating documentation from docstrings
- Host: GitHub
- URL: https://github.com/axelgard/inkpot
- Owner: AxelGard
- License: mit
- Created: 2021-07-01T09:30:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-11T20:18:05.000Z (8 months ago)
- Last Synced: 2025-02-09T13:37:13.051Z (1 day ago)
- Topics: docs-generator, docstrings, documentation, markdown, pip, python, python-library, python-package, python3, simple, tool
- Language: Python
- Homepage: https://pypi.org/project/inkpot/
- Size: 79.1 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# inkpot
A small simple library for generating documentation from docstringsinkpot is available on [pip](https://pypi.org/project/inkpot/). **Please give it a star if you like it!**
![GitHub stars](https://img.shields.io/github/stars/AxelGard/inkpot?style=social)
![GitHub forks](https://img.shields.io/github/forks/AxelGard/inkpot?style=social)
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/Axel_Gard)![GitHub](https://img.shields.io/github/license/AxelGard/inkpot?style=plastic)
![PyPI](https://img.shields.io/pypi/v/inkpot)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/inkpot)
![PyPI - Downloads](https://img.shields.io/pypi/dm/inkpot)To know more about way this project was started, checkout this **[blog post](https://axelgard.github.io/blog/inkpot/2021/07/01/inkpot-init.html)**.
## Installation
```bash
pip install inkpot
```## Usage
single file
```bash
python3 -m inkpot myfile.py
```
or directory
```bash
python3 -m inkpot myproject/
```
output to a file (also works with directories)
```bash
python3 -m inkpot myfile.py > doc.md
python3 -m inkpot myproject/ > doc.md
```More functionality and better formatting might be added.
## Example
On the [wiki](https://github.com/AxelGard/inkpot/wiki/inkpot-src-docs) you can se the result of running inkpot on the inkpot source code.
Here is a small example from the test files.
Python file `tests/.ex/add.py`
```python
def add(a,b):
""" add to objects """
return a + b```
```bash
python3 -m inkpot tests/.ex/add.py
```
returns markdown
```
# tests/.ex/add.py
## tests/.ex/add.py
**def add(a, b)** \
`add to objects `
```## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE.txt) file for details## Acknowledgement
A special thanks to:
* [Astunparse](https://pypi.org/project/astunparse/), which is used in inkpot to unparse python files