No description
Find a file Use this template
phil e8d64c3b80
All checks were successful
/ build (push) Successful in 4s
Update README.md
2025-05-28 17:01:04 +00:00
.forgejo/workflows Inital commit 2025-05-28 17:36:06 +02:00
src/knoc_plugin_template Inital commit 2025-05-28 17:36:06 +02:00
.gitignore Inital commit 2025-05-28 17:36:06 +02:00
.python-version Inital commit 2025-05-28 17:36:06 +02:00
pyproject.toml Inital commit 2025-05-28 17:36:06 +02:00
README.md Update README.md 2025-05-28 17:01:04 +00:00
uv.lock Inital commit 2025-05-28 17:36:06 +02:00

Template for Knoc plugins

Entry points

It has 4 standard entry points, defined in pyproject.toml:

  • CLI
  • workflow
  • api
  • settings

CI

It has a Forgejo CI build action, defined in .forgejo/actions/build.yaml.

Usage

Just replace foo by the name of the plugin below:

set NAME foo
set PNAME knoc_$NAME
set DNAME (echo $NAME | tr "_" "-")

or with bash:

NAME=knoc_foo
PNAME=knoc_$NAME
DNAME=$(echo $NAME | tr "_" "-")

Then:

git clone https://code.philo.ydns.eu/K-Net/knoc-plugin-template.git $DNAME
cd $DNAME
rm -rf .git
mv src/knoc_plugin_template src/$NAME
sed  "s/plugin_template/$NAME/" -i pyproject.toml
sed  "s/knoc-plugin-template/$DNAME/" -i pyproject.toml
sed  "s/plugin_template/$NAME/" -i src/$NAME/api.py
sed  "s/plugin_template/$NAME/" -i src/$NAME/cli.py
sed  "s/plugin_template/$NAME/" -i src/$NAME/settings.py
sed  "s/plugin_template/$NAME/" -i src/$NAME/workflows.py