Update README.md
All checks were successful
/ build (push) Successful in 4s

This commit is contained in:
phil 2025-05-28 17:01:04 +00:00
parent 1e51db3170
commit e8d64c3b80

View file

@ -15,14 +15,18 @@ It has a Forgejo CI build action, defined in `.forgejo/actions/build.yaml`.
## Usage
Just replace `foo` by the name of the plugin below:
```fish
set NAME knoc_foo
set NAME foo
set PNAME knoc_$NAME
set DNAME (echo $NAME | tr "_" "-")
```
or with bash:
```bash
NAME=knoc_foo
PNAME=knoc_$NAME
DNAME=$(echo $NAME | tr "_" "-")
```
@ -32,10 +36,10 @@ 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/knoc_plugin_template/$NAME/" -i pyproject.toml
sed "s/plugin_template/$NAME/" -i pyproject.toml
sed "s/knoc-plugin-template/$DNAME/" -i pyproject.toml
sed "s/knoc_plugin_template/$NAME/" -i src/$NAME/api.py
sed "s/knoc_plugin_template/$NAME/" -i src/$NAME/cli.py
sed "s/knoc_plugin_template/$NAME/" -i src/$NAME/settings.py
sed "s/knoc_plugin_template/$NAME/" -i src/$NAME/workflows.py
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
```