Open main menu

Gramps β

Changes

User:Ahs3/Contributing

25 bytes added, 02:50, 21 May 2025
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]):
<pre>
#possible report categories
CATEGORY_TEXT = 0
CATEGORY_DRAW = 1
CATEGORY_CODE = 2
CATEGORY_WEB = 3
CATEGORY_BOOK = 4
CATEGORY_GRAPHVIZ = 5
CATEGORY_TREE = 6
REPORT_CAT = [ CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_CODE,
CATEGORY_WEB, CATEGORY_BOOK, CATEGORY_GRAPHVIZ, CATEGORY_TREE]
</pre>
Each #possible report category has a set of standards and interface. The categories CATEGORY_TEXT and = 0 CATEGORY_DRAW use the Document interface of Gramps. See also = 1 CATEGORY_CODE = 2 CATEGORY_WEB = 3 CATEGORY_BOOK = 4 CATEGORY_GRAPHVIZ = 5 CATEGORY_TREE = 6 REPORT_CAT = [[Report API]CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_CODE, CATEGORY_WEB, CATEGORY_BOOK, CATEGORY_GRAPHVIZ, CATEGORY_TREE] for a draft view on this.
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 ===
57
edits