Just a Python Template Advice for Flow plugin, not a plugin.
You can follow the template advice or not. But it could be better if you do.
.
│ README.md
│ LICENSE
│ plugin.json
│ .gitignore
│ .env # user config file
│ main.py
│ test.py
| commands.py # commands for developer
│ requirements.txt
| requirements-dev.txt # only for developer
| babel.cfg # `babel` config file
│
├─assets
│ example.png
│ favicon.ico
│
└─plugin # main scripts
__init__.py
extensions.py
settings.py
templates.py
ui.py
utils.py
└──translations # localization
├─en_US
└─zh_CN
Using click
to integrate the command function.
We can use the command to update plugin.json
from the package itself.
Just like follow.
python commands.py gen-plugin-info
Using gettext
to integrate localization function.
We can init a language like follow.
python commands.py init lang
Then we can fill .po
file in translations folder.
If something changed, you can take this to update the information.
python commands.py update
After all of this, we need to compile the .po
to .mo
file.
python commands.py compile
flowlauncher
Flow's jsonRPC API for Python. It's NECESSARY for plugin.python-dotenv
User's config package.
- auto commands
- local language
- inputs parser, for mulity inputs
- setting ui for Flow