-
Notifications
You must be signed in to change notification settings - Fork 0
Plugins
Plugins in kPad are some scripts that take advantage of the editor by using the built-in API. The plugin script is activated or run from the Plugins menu at the top. An alternative is to auto-start when kPad loads, which is useful for plugins which have widgets (frames, buttons, etc).
Installing a plugin varies from versions.
First clone the plugin repo:
git clone https://github.com/<USERNAME>/<PLUGIN_NAME>.gitThen copy the folder to the specific folder found at:
-
~/Library/Application Support/kPad/pluginsfor Mac -
~/.config/kpad/pluginsfor Linux -
%APPDATA%\kPad\Pluginsfor Windows
The folder name can be anything, but there MUST be logic.py and metadata.json.
Use the protocol:
kpad://InstallPLugin?url=<PLUGIN ZIP URL>
Note: Keep in mind that the URL protocol is still in alpha. If it doesn't work, then use the method above.
First, if you want to make it public, make a repo and start building it from there.
Then, inside, make two files:
|_ logic.py
|_ metadata.json
For the metadata, you need 4 required fields to input:
{
"name": "<plugin name>",
"author": "<username>",
"version": "<version>",
"desc": "<plugin description>"
}And for the logic.py, you need a function named action(editor), like so:
def action(editor):
...Commands to use with the editor variable (passed as a PluginAPI object in kPad) are listed in the PluginAPI wiki page.