Sharing your plugin
Make a .wmplugin file, add modules, pictures and translations, ship updates, and list it in an addon repository.
A plugin travels as one file, name.wmplugin. This page covers how to make
one, what can go in it, how updates work, and how to list it where other
people can find it.
Make the file
Section titled “Make the file”The editors make the file for you:
- In the browser, press Install the plugin at the top of the editor, or
Save as a file in the Details tab. The browser saves
Name-1.0.0.wmplugin. - On the phone, choose Save as a file in the editor’s menu.
To install it, open the file on the phone from a file manager. The keyboard shows the name, the author and every permission, and installs it when you confirm. Plugins must be allowed first:
WM Keyboard Tools Plugins Manage pluginsBy hand
Section titled “By hand”A .wmplugin is a ZIP file with plugin.json at the top:
cd my-plugin && zip -r ../my-plugin.wmplugin plugin.json main.pyBuild it by hand when you want more than one file.
Several files
Section titled “Several files”A .wmplugin archive can hold up to 64 entries and 4 MB. Any other .py file
is a module you can import, and assets/ holds pictures and data (png, webp,
jpg, svg, json, txt; 512 KB each):
weather.wmplugin├── plugin.json├── main.py├── forecast.py import forecast├── lib/__init__.py from lib import parse├── locales/bn.json _("Look up") in Bengali└── assets/logo.png ui.image("assets/logo.png")locales/ holds translations. Module names are Python identifiers. A name that is not refuses the install.
wm and the standard library names
are taken.
Directoryweather/
- plugin.json
- main.py
- forecast.py a module:
import forecast Directoryassets/
- logo.png
Directorylocales/
- bn.json
Then cd weather && zip -r ../weather.wmplugin . makes the file.
Updates
Section titled “Updates”Change pluginVersion (for example "1.0.0" to "1.1.0") and keep the same
id. Installing the new file replaces the old one and keeps what the plugin
saved.
- An update that asks for a new risky permission, or a new host, leaves it off. The plugin’s page tells the user what is new, and they decide.
- Changing the
idmakes a different plugin, with its own empty storage.
List it in an addon repository
Section titled “List it in an addon repository”The keyboard’s Addons screen reads addon repositories: a JSON file that lists addons and where to download them. Anyone can host one on GitHub or any web server.
-
Put the
.wmpluginfile in your repository, underplugins/. -
In the web editor, open the Details tab and press Copy repository entry (with sha256).
-
Paste the entry into your repository’s
wmkeyboard-repo.json, in itsaddonslist. -
Change the
pathif your file is somewhere else.
The app checks each plugin against its sha256 before it installs, and
refuses one without it. Addon repositories and
the repository format explain the
rest. The official addon repository
has plugins to read and copy, and its tools/validate.py checks a whole
repository before you publish it.
