From 2f4472e70821e8dbfe9c14bbf93d6f614c1077d5 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 23 Feb 2022 15:19:45 +0100 Subject: [PATCH] feat(docs): Added more documentation on plugins --- .gitignore | 3 ++- docs/plugin_development.md | 13 +++++++++++++ flaschengeist/cli/docs_cmd.py | 2 +- flaschengeist/plugins/__init__.py | 5 +++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 docs/plugin_development.md diff --git a/.gitignore b/.gitignore index aef08d3..52b370e 100644 --- a/.gitignore +++ b/.gitignore @@ -67,7 +67,8 @@ instance/ # Sphinx documentation docs/_build/ -docs/ +# pdoc +docs/html # PyBuilder target/ diff --git a/docs/plugin_development.md b/docs/plugin_development.md new file mode 100644 index 0000000..21b69c5 --- /dev/null +++ b/docs/plugin_development.md @@ -0,0 +1,13 @@ +# Plugin Development + +## File Structure + + - your_plugin/ + - __init__.py + - ... + - ... + - setup.cfg + +The basic layout of a plugin is quite simple, you will only need the `setup.cfg` or `setup.py` and +the package containing your plugin code, at lease a `__init__.py` file with your `Plugin` class. + diff --git a/flaschengeist/cli/docs_cmd.py b/flaschengeist/cli/docs_cmd.py index 54faf02..f33a697 100644 --- a/flaschengeist/cli/docs_cmd.py +++ b/flaschengeist/cli/docs_cmd.py @@ -8,7 +8,7 @@ import subprocess "--output", "-o", help="Documentation output path", - default="./docs", + default="./docs/html", type=click.Path(file_okay=False, path_type=pathlib.Path), ) @click.pass_context diff --git a/flaschengeist/plugins/__init__.py b/flaschengeist/plugins/__init__.py index 2db90c5..f759d24 100644 --- a/flaschengeist/plugins/__init__.py +++ b/flaschengeist/plugins/__init__.py @@ -1,3 +1,8 @@ +"""Flaschengeist Plugins + +.. include:: docs/plugin_development.md + +""" import pkg_resources from werkzeug.datastructures import FileStorage from werkzeug.exceptions import MethodNotAllowed, NotFound