Changes

From Gramps

Gramplets development

14 bytes added, 21:54, 7 September 2024
m
Register Options: move optionals out of the required list
* '''<code>status</code>''': STABLE or UNSTABLE for Gramps 5.1 version. EXPERIMENTAL, BETA {{new|5.2.0}}
* '''<code>audience</code>''': ALL, DEVELOPER, EXPERT {{new|5.2.0}}
* '''<code>authors</code>''': List (comma separated strings) of authors of the plugin, default=[]
* '''<code>authors_email</code>''': List of emails of the authors (in the same order as the '''<code>authors</code>''' list) of the plugin, default=[]
* '''<code>maintainers</code>''': List of maintainers of the plugin, default=[] {{new|5.2.0}}
* '''<code>maintainers_email</code>''': List of emails of the maintainers (in the same order as the '''<code>maintainers</code>''' list) of the plugin, default=[] {{new|5.2.0}}
* '''<code>requires_mod</code>''': specifies python modules that the addon requires. If you want to allow Gramps to try to install a module using pip, then it should be pure python. {{new|5.2.0}}
* '''<code>requires_gi</code>''': specifies GObject introspection modules that are required. Gramps cannot install these {{new|5.2.0}}
* '''<code>requires_exe</code>''': specifies executables that must be present in the PATH. Again, the user must install these themselves {{new|5.2.0}}
* '''<code>version</code>''': a string with 2 dots (such as "1.23.14") representing the version number
* '''<code>gramps_target_version</code>''': a string with 2 dots representing the version of Gramps for which this gramplet was written. Only gramplets matching the installed version will be available for installation.
* '''<code>help_url</code>''': the title of the wiki page that describes the plugin. <br />If the help_url starts with <code>http://</code> (or the secure <code>https://</code> {{new|5.2.0}}) then that fully qualified URL will be used as is. Otherwise, the paths will be interpreted as relative to <code>http&#58;//gramps-project.org/wiki/index.php?title=</code> base URL. The base URL will be prepended to the '''help_url''' and may get a language extension (such as <code>/nl</code> ) appended at the end, if the operating language is one of '''nl''' '''fr''' '''sq''' '''mk''' '''de''' '''fi''' '''ru''' '''sk'''. You should '''''not''''' use the <code>_(</code> <code>)</code> translate function around the '''<code>help_url</code>''' string, unless you specifically intend to create web pages named with the translated string.
At the bare minimum, you need to have the above 11 options when registering your Gramplets.
In additionOptionally, you can are encouraged to use the following as well, if known:
* '''<code>detached_width</code>''': the size in pixels of the minimum and default detached height
* '''<code>expand</code>''': whether or not the Gramplet should expand to fill the column, if it can
* '''<code>description</code>''': a description of the Gramplet
* '''<code>authors</code>''': List (comma separated strings) of authors of the plugin, default=[]
* '''<code>authors_email</code>''': List of emails of the authors (in the same order as the '''<code>authors</code>''' list) of the plugin, default=[]
* '''<code>maintainers</code>''': List of maintainers of the plugin, default=[] {{new|5.2.0}}
* '''<code>maintainers_email</code>''': List of emails of the maintainers (in the same order as the '''<code>maintainers</code>''' list) of the plugin, default=[] {{new|5.2.0}}
* '''<code>requires_mod</code>''': specifies python modules that the addon requires. If you want to allow Gramps to try to install a module using pip, then it should be pure python. {{new|5.2.0}}
* '''<code>requires_gi</code>''': specifies GObject introspection modules that are required. Gramps cannot install these {{new|5.2.0}}
* '''<code>requires_exe</code>''': specifies executables that must be present in the PATH. Again, the user must install these themselves {{new|5.2.0}}
* '''<code>help_url</code>''': the title of the wiki page that describes the plugin. <br />If the help_url starts with <code>http://</code> (or the secure <code>https://</code> {{new|5.2.0}}) then that fully qualified URL will be used as is. Otherwise, the paths will be interpreted as relative to <code>http&#58;//gramps-project.org/wiki/index.php?title=</code> base URL. The base URL will be prepended to the '''help_url''' and may get a language extension (such as <code>/nl</code> ) appended at the end, if the operating language is one of '''nl''' '''fr''' '''sq''' '''mk''' '''de''' '''fi''' '''ru''' '''sk'''. You should '''''not''''' use the <code>_(</code> <code>)</code> translate function around the '''<code>help_url</code>''' string, unless you specifically intend to create web pages named with the translated string.
== Core Methods ==
5,418
edits

Navigation menu