2,183
edits
Changes
→Overview: change order to highlight importance of gpr file
==Overview==
Before going into details, it is useful to note that the report should have two basic parts. This is explained on the [[Addons development]] page, that the source code goes into two different files:
# the source code file Gramps Plugin Registration (''*.gpr.py'') file e.g.: <code>report.gpr.py</code># and a Gramps Plugin Registration the main source code file (''*.gpr.py'') file e.g.: <code>report.gpr.py</code>
===report.gpr.py===
A report can potentially be generated as a standalone report, as a Gramps Book item, and as a command line report. The registration determines which modes are enabled for a given report. The report class does not have to know anything about the mode. The options class is there to provide options interface for all available modes.
===report.py===
;Report class : This is the code that takes data from the Gramps database and organizes it into the document structure. This structure can later be printed, viewed, or written into a file in a variety of formats. This class uses the [https://gramps-project.org/docs/gen/gen_plug.html#module-gen.plug._docgenplugin docgen] interface to abstract away the output format details.
;Options class : This is the code that provides means to obtain options necessary for the report using a variety of available mechanisms.
==Document interface==