Zim

Questions on creating a new plugin

Asked by Svenn

Based on the DiagramEditor.pl plugin I try to create a plugin for a timing diagram tool called drawtiming from drawtiming.sourceforge.net which is working almost exactly the same way as the DiagramEditor. I checked out the trunk with the bzr branch lp:zim command and started to read the development manual. Then I just copied the files DiagramEditor.pl and DiagramEditor.pm files in their respective directories to TimingEditor.pl and TimingEditor.pm and as a first starter replaced all occurances of "Diagram" with "Timing". Then I started zim from ./bin/zim inside the bzr tree, but I could not find my new plugin in the plugin preference tab.

In the development manual it looks like plugins go into XDG_DATA_DIR (i.e. the .pl file) and the .pm file should be installed into my site-perl directory. With 'locate DiagramEditor.\*' I see that those files are actually located there. For development I would not always like to do a sudo cp to move my not-yet-finished plugins into my system, but rather hack around in a closed sandbox. How should I set the environment variables in the shell where I am starting ./bin/zim to find the plugin under development without installing them to the system?

I am also looking at creating plugins for asymptote, gle (Graphics Layout Engine) and tikz/pgf as I use those to generate illustrative charts and block diagrams. tikz/pgf and asymptote are Latex-related and gle works very much like Graphviz, so I hope creating a plugin will for those will be very much the same as creating a plugin for drawtiming.

--
Svenn

Question information

Language:
English Edit question
Status:
Answered
For:
Zim Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) said :
#1

Should work from the source directory without any environment settings.
Could it be that you still had a zim instance running ? In that case you
do not get to see the development version but it connects to the already
running instance (which can not see your modifications). Use --no-daemon
when running from the source for testing.

The code from either the EquationEditor or the Diagram editor plugins
can be adapted to any kind of format that is based on a text based
definition and compiles into an image that can be included in a zim
page. The python re-write will have a generic base class to make it even
simpler to write these kind of plugins.

Can you help with this problem?

Provide an answer of your own, or ask Svenn for more information if necessary.

To post a message you must log in.