Changes

From Gramps
Synced from repo@41d611f via publish.py
{{man index|6.0}}

== Overview ==

A Gramps '''addon''' extends the application without modifying core. Addons are discovered from the plugin directory; see [[6.0_Addons|the addon list]] for what ships today.

'''New with 6.1''': plugin discovery follows symlinks (with realpath-based dedup to prevent infinite recursion on symlink loops), so a symlinked addon folder loads correctly.

== Anatomy of an addon ==

Every addon ships at minimum a registration file and an implementation module.

{|
! File
! Purpose
|-
| <code>&lt;Addon&gt;.gpr.py</code>
| Registration: name, version, Gramps target, entry point
|-
| <code>&lt;Addon&gt;.py</code>
| The plugin implementation
|-
| <code>po/</code>
| Translation catalogs (optional)
|}

The registration file declares the Gramps version it targets. An addon on <code>maintenance/gramps60</code> expects the Gramps 6.0 API; see [[Addons_development|the porting notes]] for cross-version concerns.

== Minimal registration ==

<syntaxhighlight lang="python">register(
GRAMPLET,
id="Example",
name=_("Example"),
version="1.0.0",
gramps_target_version="6.0",
fname="example.py",
gramplet="Example",
)</syntaxhighlight>
{{stub}}
28
edits

Navigation menu