57
edits
Changes
→Create a Gramps Plugin Registration file
You can see examples of the kinds of addons [https://github.com/gramps-project/gramps/plugins here] (for example, see [https://github.com/gramps-project/gramps/plugins/drawreport/drawplugins.gpr.py gramps/plugins/drawreport/drawplugins.gpr.py]) and see the full documentation in the [https://github.com/gramps-project/gramps/blob/3f0db9303f29811b43325c30149c8844c7ce24b6/gramps/gen/plug/_pluginreg.py#L23 master/gramps/gen/plug/_pluginreg.py] comments and docstrings.
Note that this <tt>.gpr.py</tt> will automatically use translations if you have them (see [[#Localization|Localization]]). That is, the function "_" is predefined to use your locale translations; you only need to mark the text with <tt>_("TEXT")</tt> and include a translation of "TEXT" in your translation file. For example, in the above example, <tt>_("Attach Source")</tt> is marked for translation. If you have developed and packaged your addon with translation support, then that phrase will be converted into the user's language.
=== Report plugins ===
The possible report categories are ([https://github.com/gramps-project/gramps/blob/892fc270592095192947097d22a72834d5c70447/gramps/gen/plug/_pluginreg.py#L141-L149 gen/plug/_pluginreg.py]):
Each report category has a set of standards and an interface. The categories <tt>CATEGORY_TEXT</tt> and <tt>CATEGORY_DRAW</tt> use the Document interface of Gramps. See also [[Report API]] for a draft view on this. The application programming interface or API for reports is treated at in the [[Report-writing_tutorial]]. For general information on Gramps development , see [[Portal:Developers]] and [[Writing a plugin|Writing a Plugin]] specifically.
=== General plugins ===