Changes

Jump to: navigation, search

Addons development

45 bytes added, 15:24, 6 November 2009
Develop your addon
Follow the development API for your tool, [[Report-writing_tutorial|report]], view, or [[Gramplets]]. Place all of your associated .py, .glade, etc. files in this directory. For general information on GRAMPS development see [[Portal:Developers]] and [[Writing a Plugin]] specifically.
To test your addon as you develop it it is suggested that you add replace your GRAMPS user plugin directory with a link to your addon development directory from your GRAMPS user plugin directory, like so:
cd ~/.gramps/ mv plugins/* /wherever/gramps-addons/contrib/ rm -rf plugins ln -s /home/username/grampswherever/gramps-addons/contrib developmentplugins
GRAMPS will search this link folder (and subdirectories) for .grp.py files, and add them to the plugin list.
If you have code that you want to share between addons, you don't need to do anything special. Currently, GRAMPS adds each directory in which a .gpr.py is found onto the PYTHONPATH which is searched when you perform an import. Thus "import NewProjectName" will work from another addon. You should always make sure you name your addons with a name appropriate for Python imports.

Navigation menu