← Back to team overview

zim-wiki team mailing list archive

Installing custom templates & plugins

 

Dear all,

Since I see more custom plugins and templates being send around lately, I
want to address how users can download and install those.

Very simple step is that starting with the next release there will be links
in the interface saying "get more online" that point to these wiki pages:
https://github.com/jaap-karssenberg/zim-wiki/wiki/Plugins for plugins and
https://github.com/jaap-karssenberg/zim-wiki/wiki/Templates for templates.

I would like to invite everybody to use these two pages to publish custom
templates and plugins that may be of use to other users.

With respect to packaging and installing custom plugins I did the
following: All the "zim/plugins" folders in the XDG_DATA_HOME and
XDG_DATA_DIRS folders are now loaded as part of the "zim.plugins" package
search path.

What this means is that:
a/ Plugins must be packaged as a folder with files
b/ This folder must be a valid python package - specifically it needs to
contain a "__init__.py" file that contains the plugin class
c/ Users can simply copy this folder to "~/.local/share/zim/plugins" and
have it show up in zim.

Or even better, if you setup a github or launchpad branch that contains
only the plugin (so not the rest of the zim sources!) users can directly
use git/bzr to obtain a local branch in "~/.local/share/zim/plugins". That
way updating the plugin also becomes a simple git/bzr command.

(As a result installing custom plugins in site-packes will no longer work.
I found this logic was conflicting with local installs of zim.)

Probably I will need to illustrate this with some example for plugin
writers. Will set something up and put instructions for users in the wiki
pages as well.

Regards,

Jaap