Difference between revisions of "Addon:Rule expansions"

From Gramps
m (People with events with a selected role)
m (Change Heading level to one level deeper so no H1 on page. Needed for printed document)
Line 2: Line 2:
 
{{#vardefine:chapter|Addons (Rules)}}
 
{{#vardefine:chapter|Addons (Rules)}}
  
=Rule Amendments=
+
==Rule Amendments==
 
{{man tip| 1=Changes to Rules are inconspicuous|2=New built-in Rules appear without any fanfare. Plus there are so many of them, grouped in so many subcategories that they may remain concealed.<br />Addons require downloading and installation, so the addon Rules have more visibility than the builtins. Plus they can be searched as a category in the Plugin Manager.}}
 
{{man tip| 1=Changes to Rules are inconspicuous|2=New built-in Rules appear without any fanfare. Plus there are so many of them, grouped in so many subcategories that they may remain concealed.<br />Addons require downloading and installation, so the addon Rules have more visibility than the builtins. Plus they can be searched as a category in the Plugin Manager.}}
 
[[File:Preferences UpdateAddons-Rule-51.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Preferences: Check for Updated Addons showing Rules]]
 
[[File:Preferences UpdateAddons-Rule-51.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Preferences: Check for Updated Addons showing Rules]]
Line 31: Line 31:
 
-->
 
-->
  
=Locating Filter Rule AddOns=
+
==Locating Filter Rule AddOns==
 
[[File:EnhancedPlugInManager-addon-SearchRule 51win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Search for '''''Rule''''' in the Enhanced Plugin Manager]]The [[Addon:Plugin_Manager|Plugin Manager]] can be used for more than installing and updating plug-in  modules. It can help you discover the growing capabilities that might not be obvious.
 
[[File:EnhancedPlugInManager-addon-SearchRule 51win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Search for '''''Rule''''' in the Enhanced Plugin Manager]]The [[Addon:Plugin_Manager|Plugin Manager]] can be used for more than installing and updating plug-in  modules. It can help you discover the growing capabilities that might not be obvious.
  
Line 43: Line 43:
 
Looking at the Info on any currently installed Rule will verify the file location where addon rules have been installed.  
 
Looking at the Info on any currently installed Rule will verify the file location where addon rules have been installed.  
 
{{-}}
 
{{-}}
==Addon Rules==
+
===Addon Rules===
 
Rules are added in sets/groups via the Plugin Manager. All the Rules in a set are added/removed when any Rule in that set is added/removed.
 
Rules are added in sets/groups via the Plugin Manager. All the Rules in a set are added/removed when any Rule in that set is added/removed.
  
Line 49: Line 49:
  
 
In the few months that addon Rules have been a feature, two sets of rules have been collected:
 
In the few months that addon Rules have been a feature, two sets of rules have been collected:
===Individual Rules===
+
====Individual Rules====
====Active Person====
+
=====Active Person=====
 
[[File:Rule_Active_Person_Filter_Win.png|thumb|right|191px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching for '''''person''''' rules]]'''General filters''' [[{{Version manual}}_Addons|addon]] rule to find the [[Gramps_Glossary#active_person|Active Person]]. Available for {{icon|peop}}'''Person''', {{icon|rela}}'''Relationships''', {{icon|ance}}'''Charts''', {{icon|geog}}'''Geography'''
 
[[File:Rule_Active_Person_Filter_Win.png|thumb|right|191px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching for '''''person''''' rules]]'''General filters''' [[{{Version manual}}_Addons|addon]] rule to find the [[Gramps_Glossary#active_person|Active Person]]. Available for {{icon|peop}}'''Person''', {{icon|rela}}'''Relationships''', {{icon|ance}}'''Charts''', {{icon|geog}}'''Geography'''
  
Line 59: Line 59:
 
{{-}}
 
{{-}}
  
=== Isotammi Add-on Rules ===
+
==== Isotammi Add-on Rules ====
 
Rather than distributing through the Gramps open source project, the [https://github.com/Taapeli Taapeli Project] (which is a national database of Finnish Genealogical Society) curates [[Addon:Isotammi_addons|their own set of "Isotammi lisäosia"]] : “Big Oak (the mythological World Tree) add-ons" for Gramps. The [[Addon:Isotammi_addons#Installation|add-on manager installation]] files are hosted separately.
 
Rather than distributing through the Gramps open source project, the [https://github.com/Taapeli Taapeli Project] (which is a national database of Finnish Genealogical Society) curates [[Addon:Isotammi_addons|their own set of "Isotammi lisäosia"]] : “Big Oak (the mythological World Tree) add-ons" for Gramps. The [[Addon:Isotammi_addons#Installation|add-on manager installation]] files are hosted separately.
  
Line 66: Line 66:
 
* [[Addon:Isotammi_addons#Generic_.3CObject.3E_filter|Generic &lt;Object> filter]]
 
* [[Addon:Isotammi_addons#Generic_.3CObject.3E_filter|Generic &lt;Object> filter]]
  
===[https://github.com/gramps-project/addons-source/tree/master/FilterRules FilterRules] : Plugin Manager Rulebook Collection===
+
====[https://github.com/gramps-project/addons-source/tree/master/FilterRules FilterRules] : Plugin Manager Rulebook Collection====
 
General Filter Rule Addons
 
General Filter Rule Addons
====People related to &lt;filter&gt;====
+
=====People related to &lt;filter&gt;=====
 
<!-- isrelatedwithfiltermatch.py -->
 
<!-- isrelatedwithfiltermatch.py -->
 
[[File:Rule_Person_Filter_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching by Rule name]]{{icon|peop}}'''Person &bull; General filters''' [[{{Version manual}}_Addons|addon]] rule to find [[Gramps_Glossary#person|Person(s)]] matching a specified filter.
 
[[File:Rule_Person_Filter_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching by Rule name]]{{icon|peop}}'''Person &bull; General filters''' [[{{Version manual}}_Addons|addon]] rule to find [[Gramps_Glossary#person|Person(s)]] matching a specified filter.
Line 74: Line 74:
 
Matches people who are related to anybody matched by a person filter.{{-}}[[File:Pythongadget.png|left|150px|link=https://github.com/gramps-project/addons-source/tree/master/FilterRules]]<code>'''isrelatedwithfiltermatch'''</code> provided as [https://github.com/gramps-project/addons-source/tree/master/FilterRules <code>sample '''.gpr.py''' & '''.py''' code</code> for writing addon filter rules]. Demonstrates piping the output of one custom Filter into another.{{-}}
 
Matches people who are related to anybody matched by a person filter.{{-}}[[File:Pythongadget.png|left|150px|link=https://github.com/gramps-project/addons-source/tree/master/FilterRules]]<code>'''isrelatedwithfiltermatch'''</code> provided as [https://github.com/gramps-project/addons-source/tree/master/FilterRules <code>sample '''.gpr.py''' & '''.py''' code</code> for writing addon filter rules]. Demonstrates piping the output of one custom Filter into another.{{-}}
  
====People with events with a selected role====
+
=====People with events with a selected role=====
 
<!-- hasrolerule.py -->
 
<!-- hasrolerule.py -->
 
[[File:Rule_PersonEvent_Role_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching for Person Rules which include the 'role' term.]]
 
[[File:Rule_PersonEvent_Role_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching for Person Rules which include the 'role' term.]]
Line 82: Line 82:
 
{{-}}
 
{{-}}
  
====Families with Events with a selected role====
+
=====Families with Events with a selected role=====
 
<!-- familieswitheventfiltermatch.py -->
 
<!-- familieswitheventfiltermatch.py -->
 
[[File:Rule_FamiliesEvent_Role_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching by Rule name]]
 
[[File:Rule_FamiliesEvent_Role_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching by Rule name]]
 
{{icon|fami}}'''Families &bull; Event filters''' [[{{Version manual}}_Addons|addon]] rule to find [[Gramps_Glossary#family|Families]] having any Family member or shared Family level [[Gramps_Glossary#event|Event]] with a specified [[Gramps_Glossary#event_role|Event Role]].{{-}}[[File:Pythongadget.png|left|150px|link=https://github.com/gramps-project/addons-source/tree/master/FilterRules]]<code>'''hasrolerule'''</code> provided as [https://github.com/gramps-project/addons-source/tree/master/FilterRules <code>sample '''.gpr.py''' & '''.py''' code</code> for writing addon filter rules]. Demonstrates including category variants of a rule in the same addon.{{-}}
 
{{icon|fami}}'''Families &bull; Event filters''' [[{{Version manual}}_Addons|addon]] rule to find [[Gramps_Glossary#family|Families]] having any Family member or shared Family level [[Gramps_Glossary#event|Event]] with a specified [[Gramps_Glossary#event_role|Event Role]].{{-}}[[File:Pythongadget.png|left|150px|link=https://github.com/gramps-project/addons-source/tree/master/FilterRules]]<code>'''hasrolerule'''</code> provided as [https://github.com/gramps-project/addons-source/tree/master/FilterRules <code>sample '''.gpr.py''' & '''.py''' code</code> for writing addon filter rules]. Demonstrates including category variants of a rule in the same addon.{{-}}
  
====Source matching parameters====
+
=====Source matching parameters=====
 
<!-- hassourcefilter.py -->[[File:Rule_Sources_Parameters_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching by Rule name]]
 
<!-- hassourcefilter.py -->[[File:Rule_Sources_Parameters_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching by Rule name]]
 
{{icon|sour34}}'''Sources &bull; General filters''' [[{{Version manual}}_Addons|addon]] rule to find [[Gramps_Glossary#source|Sources]] based on the following parameters: ''Title'', ''Author'', ''Abbreviation'', ''Publication''.
 
{{icon|sour34}}'''Sources &bull; General filters''' [[{{Version manual}}_Addons|addon]] rule to find [[Gramps_Glossary#source|Sources]] based on the following parameters: ''Title'', ''Author'', ''Abbreviation'', ''Publication''.
Line 93: Line 93:
 
This addon rule has similar options to the standard Filter Gramplet for the [[Gramps_{{Version manual}}_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_2#New_Source_dialog|Source]] [[Gramps_{{Version manual}}_Wiki_Manual_-_Categories#Sources_Category|Category View]]. It can be used to save complex filter parameters.{{-}}[[File:Pythongadget.png|left|150px|link=https://github.com/gramps-project/addons-source/tree/master/FilterRules]]<code>'''hassourcefilter'''</code> provided as sample [[Addons_development#Create_a_Gramps_Plugin_Registration_file|.gpr.py]] & '''.py''' code for [https://github.com/gramps-project/addons-source/tree/master/FilterRules writing addon filter rules]. Demonstrates text based filtering with RegEx options.{{-}}
 
This addon rule has similar options to the standard Filter Gramplet for the [[Gramps_{{Version manual}}_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_2#New_Source_dialog|Source]] [[Gramps_{{Version manual}}_Wiki_Manual_-_Categories#Sources_Category|Category View]]. It can be used to save complex filter parameters.{{-}}[[File:Pythongadget.png|left|150px|link=https://github.com/gramps-project/addons-source/tree/master/FilterRules]]<code>'''hassourcefilter'''</code> provided as sample [[Addons_development#Create_a_Gramps_Plugin_Registration_file|.gpr.py]] & '''.py''' code for [https://github.com/gramps-project/addons-source/tree/master/FilterRules writing addon filter rules]. Demonstrates text based filtering with RegEx options.{{-}}
  
====People Separated less than &lt;N&gt; degrees of &lt;Home person&gt;====
+
=====People Separated less than &lt;N&gt; degrees of &lt;Home person&gt;=====
 
<!-- degreesofseparation.py (1)-->
 
<!-- degreesofseparation.py (1)-->
 
[[File:Rule_DegreesOfSep_HomePerson_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching for Person Rules which include the 'degrees' term.]]
 
[[File:Rule_DegreesOfSep_HomePerson_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching for Person Rules which include the 'degrees' term.]]
Line 109: Line 109:
 
{{-}}
 
{{-}}
  
====People Separated less than &lt;N&gt; degrees of &lt;person&gt;====
+
=====People Separated less than &lt;N&gt; degrees of &lt;person&gt;=====
 
<!-- degreesofseparation.py (2)-->[[File:Rule_DegreesOfSep_PersonID_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching Person rules by 'degrees' term; roll-over hint for ID.]]
 
<!-- degreesofseparation.py (2)-->[[File:Rule_DegreesOfSep_PersonID_Win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Searching Person rules by 'degrees' term; roll-over hint for ID.]]
 
{{icon|peop}}'''Person &bull; Relationship filters''' [[{{Version manual}}_Addons|addon]] rule to find [[Gramps_Glossary#person|Person(s)]] having  a relationship to a specified Person within a specified degree of [[Genealogy_Glossary#consanguinity|Consanguinity]] and [[Genealogy_Glossary#affinity|Affinity]].
 
{{icon|peop}}'''Person &bull; Relationship filters''' [[{{Version manual}}_Addons|addon]] rule to find [[Gramps_Glossary#person|Person(s)]] having  a relationship to a specified Person within a specified degree of [[Genealogy_Glossary#consanguinity|Consanguinity]] and [[Genealogy_Glossary#affinity|Affinity]].
Line 124: Line 124:
 
See the [https://github.com/gramps-project/addons-source/pull/283 GitHub Repository files]
 
See the [https://github.com/gramps-project/addons-source/pull/283 GitHub Repository files]
  
====Events of families matching a &lt;family filter&gt;====
+
=====Events of families matching a &lt;family filter&gt;=====
 
Events of families matching a &lt;family filter&gt;
 
Events of families matching a &lt;family filter&gt;
  
====Families matching &lt;event filter&gt;====
+
=====Families matching &lt;event filter&gt;=====
 
<!-- isfamilyfiltermatchevent.py -->
 
<!-- isfamilyfiltermatchevent.py -->
 
Matches families that are matched by an event filter
 
Matches families that are matched by an event filter
  
====People who are part of families matching &lt;filter&gt;====
+
=====People who are part of families matching &lt;filter&gt;=====
 
<!-- infamilyrule.py -->
 
<!-- infamilyrule.py -->
  
 
People who are part of families matching &lt;filter&gt;
 
People who are part of families matching &lt;filter&gt;
  
====Filter people by their age at death====
+
=====Filter people by their age at death=====
  
====Match associations of &lt;person filter&gt;====
+
=====Match associations of &lt;person filter&gt;=====
  
====People with multiple parent records====
+
=====People with multiple parent records=====
 
{{icon|peop}}'''Person &bull; Family filters''' [[{{Version manual}}_Addons|addon]] rule that
 
{{icon|peop}}'''Person &bull; Family filters''' [[{{Version manual}}_Addons|addon]] rule that
 
matches people who have more than one set of parents.
 
matches people who have more than one set of parents.
Line 146: Line 146:
 
{{-}}
 
{{-}}
  
===[https://github.com/gramps-project/addons-source/tree/master/FilterRules2 FilterRules2] : Plugin Manager Rulebook Collection===
+
====[https://github.com/gramps-project/addons-source/tree/master/FilterRules2 FilterRules2] : Plugin Manager Rulebook Collection====
 
Genetic Genealogy Filter Rule Addons
 
Genetic Genealogy Filter Rule Addons
  
 
The following rules are based on the logical rules of genetics, not on comparing DNA data.
 
The following rules are based on the logical rules of genetics, not on comparing DNA data.
  
====Matrilineal progenitrix of &lt;person&gt;====
+
=====Matrilineal progenitrix of &lt;person&gt;=====
 
<!-- matrilinealprogenitrix.py -->
 
<!-- matrilinealprogenitrix.py -->
 
Matches the earliest recorded matrilineal ancestor mother.
 
Matches the earliest recorded matrilineal ancestor mother.
  
====Mitochondrial inheritance of &lt;filter&gt;====
+
=====Mitochondrial inheritance of &lt;filter&gt;=====
 
<!-- mtinheritanceoffiltermatch.py -->
 
<!-- mtinheritanceoffiltermatch.py -->
 
Matches recorded descendants of a filter result following mitochondrial inheritance patterns.
 
Matches recorded descendants of a filter result following mitochondrial inheritance patterns.
  
====Mitochondrial inheritance of &lt;person&gt;====
+
=====Mitochondrial inheritance of &lt;person&gt;=====
 
<!-- mtinheritance.py -->
 
<!-- mtinheritance.py -->
 
Matches recorded descendants of person following mitochondrial inheritance patterns.
 
Matches recorded descendants of person following mitochondrial inheritance patterns.
  
====Patrilineal progenitor of &lt;person&gt;====
+
=====Patrilineal progenitor of &lt;person&gt;=====
 
<!-- patrilinealprogenitor.py -->
 
<!-- patrilinealprogenitor.py -->
 
Matches the earliest recorded patrilineal ancestor father.
 
Matches the earliest recorded patrilineal ancestor father.
  
====X-chromosomal ancestors of &lt;person&gt;====
+
=====X-chromosomal ancestors of &lt;person&gt;=====
 
<!-- xchromancestors.py -->
 
<!-- xchromancestors.py -->
 
Matches ancestors of &lt;person&gt; following a X-chromosomal inheritance pattern.
 
Matches ancestors of &lt;person&gt; following a X-chromosomal inheritance pattern.
  
====X-chromosomal descendants of &lt;person&gt;====
+
=====X-chromosomal descendants of &lt;person&gt;=====
 
<!-- xchromdescendants.py -->
 
<!-- xchromdescendants.py -->
 
Matches descendants of &lt;person&gt; following a X-chromosomal inheritance pattern.
 
Matches descendants of &lt;person&gt; following a X-chromosomal inheritance pattern.
  
====Y-chromosomal inheritance of &lt;person filter&gt;====
+
=====Y-chromosomal inheritance of &lt;person filter&gt;=====
 
<!-- yinheritanceoffiltermatch.py -->
 
<!-- yinheritanceoffiltermatch.py -->
 
Matches recorded descendants of a filter result following Y-chromosomal inheritance patterns.
 
Matches recorded descendants of a filter result following Y-chromosomal inheritance patterns.
====Y-chromosomal inheritance of &lt;person&gt;====
+
=====Y-chromosomal inheritance of &lt;person&gt;=====
 
<!-- yinheritance.py -->
 
<!-- yinheritance.py -->
 
Matches recorded descendants of person following Y-chromosomal inheritance patterns.
 
Matches recorded descendants of person following Y-chromosomal inheritance patterns.
 
{{-}}
 
{{-}}
  
===Pre-Release Rules===
+
====Pre-Release Rules====
====Descendants of &lt;person&gt; sharing yDNA with each other====
+
=====Descendants of &lt;person&gt; sharing yDNA with each other=====
 
Matches descendants of a &lt;person&gt; sharing yDNA
 
Matches descendants of a &lt;person&gt; sharing yDNA
 
<!--
 
<!--
 
Hide the Active Person rule until the necessary patch is released in 5.1.3
 
Hide the Active Person rule until the necessary patch is released in 5.1.3
  
====The Active Person====
+
=====The Active Person=====
 
The active Person
 
The active Person
  
Line 195: Line 195:
 
-->
 
-->
  
=The Evolution of of Rules as AddOns=
+
==The Evolution of of Rules as AddOns==
==Gramps 5.1.1 (Sept. 2019)==
+
===Gramps 5.1.1 (Sept. 2019)===
 
* Fix bug {{Bug|0011114}}: resolve crashes in withinarea filter rule:
 
* Fix bug {{Bug|0011114}}: resolve crashes in withinarea filter rule:
 
: Avoid bad coordinates in the ref place
 
: Avoid bad coordinates in the ref place
Line 204: Line 204:
 
: Fix Bug {{Bug|0011293}} Fix internationalization issue where untranslated English GUI items appear in Event filter
 
: Fix Bug {{Bug|0011293}} Fix internationalization issue where untranslated English GUI items appear in Event filter
  
==Gramps 5.1.0 ([https://gramps-project.org/blog/2019/08/gramps-5-1-0-released/ Aug. 2019])==
+
===Gramps 5.1.0 ([https://gramps-project.org/blog/2019/08/gramps-5-1-0-released/ Aug. 2019])===
 
* '''New feature : Filter Rules can now be expanded through the [[{{Version manual}}_Addons|addons]] interface.'''
 
* '''New feature : Filter Rules can now be expanded through the [[{{Version manual}}_Addons|addons]] interface.'''
 
* Filter Rule editor, save pane position
 
* Filter Rule editor, save pane position
Line 214: Line 214:
 
* Fix exception when merging with active sidebar filter
 
* Fix exception when merging with active sidebar filter
  
==Gramps 5.0.2 (Aug. 2019)==
+
===Gramps 5.0.2 (Aug. 2019)===
 
* Fix bug {{Bug|0010509}}: resolves silent fail - relationship path between filter rule when parent is missing
 
* Fix bug {{Bug|0010509}}: resolves silent fail - relationship path between filter rule when parent is missing
 
* Fix crash when using sidebar filter and merging in another view
 
* Fix crash when using sidebar filter and merging in another view
Line 220: Line 220:
 
* Fix Relationship Graph; extra people when using filters & subgraphs
 
* Fix Relationship Graph; extra people when using filters & subgraphs
  
==Gramps 5.0.1 (Dec. 2018)==
+
===Gramps 5.0.1 (Dec. 2018)===
 
* Fix bug {{Bug|0010685}}: resolves crash in IsDuplicatedAncestorOf filter rule on tree loop
 
* Fix bug {{Bug|0010685}}: resolves crash in IsDuplicatedAncestorOf filter rule on tree loop
 
* Fix Person Sidebarfilter when using ‘Event’ and Reg expressions
 
* Fix Person Sidebarfilter when using ‘Event’ and Reg expressions
Line 227: Line 227:
 
* Fix view so column widths are preserved when using filters
 
* Fix view so column widths are preserved when using filters
  
==Gramps 5.0.0 (Jul. 2018)==
+
===Gramps 5.0.0 (Jul. 2018)===
 
* Fix Custom filter update when created via sidebar.
 
* Fix Custom filter update when created via sidebar.
  
=Developing New Rule AddOns =
+
==Developing New Rule AddOns ==
 
Beginning with version 5.0, Gramps implemented an database API (application programming interface) infrastructure supporting user selectable backends. This new exploration of database support lead developer to extend the addon (plug-in) framework to support expanding Filter Rules via the Plugin Manager.
 
Beginning with version 5.0, Gramps implemented an database API (application programming interface) infrastructure supporting user selectable backends. This new exploration of database support lead developer to extend the addon (plug-in) framework to support expanding Filter Rules via the Plugin Manager.
  
Line 238: Line 238:
 
-->
 
-->
  
== Resources ==
+
=== Resources ===
 
* [[Develop an Add-on Rule]]
 
* [[Develop an Add-on Rule]]
 
* [https://github.com/gramps-project/addons-source/tree/master/FilterRules Sample addon Filter code]
 
* [https://github.com/gramps-project/addons-source/tree/master/FilterRules Sample addon Filter code]
  
== See also ==
+
=== See also ===
 
* [[Gramps_{{man version}}_Wiki_Manual_-_Filters#Which_filter_rules_in_which_Category.3F|Built-in rules by category]]
 
* [[Gramps_{{man version}}_Wiki_Manual_-_Filters#Which_filter_rules_in_which_Category.3F|Built-in rules by category]]
 
* [[Brief_introduction_to_Git|Git introduction]]
 
* [[Brief_introduction_to_Git|Git introduction]]
Line 310: Line 310:
 
----
 
----
  
== (Section) ==
+
=== (Section) ===
 
Stub, english (''default'')
 
Stub, english (''default'')
 
{{Stub}}
 
{{Stub}}
Line 317: Line 317:
 
Stub, french
 
Stub, french
  
=== Embeddable Snippets (Subsection) ===
+
==== Embeddable Snippets (Subsection) ====
 
Icons
 
Icons
 
:Dashboard: {{icon|gram}}
 
:Dashboard: {{icon|gram}}
Line 333: Line 333:
 
:Notes Notes: {{icon|note}}
 
:Notes Notes: {{icon|note}}
 
:[[Template:Icon/doc|more of the standard icons]]
 
:[[Template:Icon/doc|more of the standard icons]]
==== [[Help:Formatting|Text formatting]] (Level 2 Subsection) ====
+
===== [[Help:Formatting|Text formatting]] (Level 2 Subsection) =====
 
''italic'', '''bold''', '''''bold & italic'''''
 
''italic'', '''bold''', '''''bold & italic'''''
====== Annotations of User Activities  (Level 4 Subsection) ======
+
======= Annotations of User Activities  (Level 4 Subsection) =======
  
 
*<pre>Commands you type at the command line</pre>
 
*<pre>Commands you type at the command line</pre>
Line 356: Line 356:
 
*{{checkbox|0|Unchecked}} - Checkbox that is &#x274f; unselected
 
*{{checkbox|0|Unchecked}} - Checkbox that is &#x274f; unselected
  
== Boxed annotations ==
+
=== Boxed annotations ===
 
{{man tip| 1=Title of Tip |2=Tips text.}}
 
{{man tip| 1=Title of Tip |2=Tips text.}}
 
{{man note|Example Note |Notes text.}}
 
{{man note|Example Note |Notes text.}}
 
{{man warn|1=WarningTitle/Heading |2=warning text }}</onlyinclude>
 
{{man warn|1=WarningTitle/Heading |2=warning text }}</onlyinclude>
 
-->
 
-->

Revision as of 00:50, 10 June 2024

Gramps-notes.png
This is a Third-party Addon. The Addon/Plugin system is controlled by the Plugin Manager.

Please use carefully on data that is backed up, and help make it better by reporting any issues to the bug tracker.
Unless otherwise stated on this page, you can download this addon by following these instructions.
Please note that some Addons have prerequisites that need to be installed before they can be used.


Contents

Rule Amendments

Tango-Dialog-information.png
Changes to Rules are inconspicuous

New built-in Rules appear without any fanfare. Plus there are so many of them, grouped in so many subcategories that they may remain concealed.
Addons require downloading and installation, so the addon Rules have more visibility than the builtins. Plus they can be searched as a category in the Plugin Manager.

Fig. Addons (Rules).1 Preferences: Check for Updated Addons showing Rules

Rules are the basic building blocks of custom Filters. A wide variety of rules have been built-in for creating custom filters in each category.

The following of add-on Rule collections have been gathered released as "Packs" of rules:

  • FilterRules - documentation, GitHub repository
  • FilterRules2 - documentation, GitHub repository
  • Generic rules (SuperTool) - (separate entries under each object category, for use with with custom rule code generated by SuperTool) - documentation, GitHub repository

With the release of Gramps version 5.1, the first addon Rules were posted as examples of coding a Filter Rule addon. [[Template:Version manual_Addons#Installing_Addons_in_Gramps|Installing similarly to any other addon]], a New Rule appears as a menu item within [[Gramps_Template:Version manual_Wiki_Manual_-_Filters#Add_Rule_dialog|Add Rule dialog]] while [[Gramps_Template:Version manual_Wiki_Manual_-_Filters#Define_Filter_dialog|Defining a custom Filter]].

Filters created with these Rules can tested, cloned or deleted using the Filter Editor. The dialog is invoked from the Edit menu in each Category view.


Locating Filter Rule AddOns

Fig. Addons (Rules).2 Search for Rule in the Enhanced Plugin Manager

The Plugin Manager can be used for more than installing and updating plug-in modules. It can help you discover the growing capabilities that might not be obvious.

Open the Plugin Manager from the Help menu and use its Search box to filter the view to only those addons which have a row or filename which include the 'Rule' term.

Fig. Addons (Rules).3 Info on 'People related to <filter>' addon Rule

Addon Rules that have been peer-reviewed will be added to Gramps' Update Manager system. This automates the installation process

When manually installed, each addon rule's Python source code (.py) file and Gramps Plugin Registration (.gpr.py) file will be located in the \grampsTemplate:Version manual\plugins\FilterRules\ subdirectory of your [[Gramps_Template:Version manual_Wiki_Manual_-_User_Directory|User Directory]]

Looking at the Info on any currently installed Rule will verify the file location where addon rules have been installed.

Addon Rules

Rules are added in sets/groups via the Plugin Manager. All the Rules in a set are added/removed when any Rule in that set is added/removed.

Each set supports Multilingual internationalization services through .po and .pot files using gettext.

In the few months that addon Rules have been a feature, two sets of rules have been collected:

Individual Rules

Active Person
Fig. Addons (Rules).4 Searching for person rules

General filters [[Template:Version manual_Addons|addon]] rule to find the Active Person. Available for PeoplePerson, RelationshipsRelationships, ChartsCharts, GeographyGeography

This is a useful "basic" rule for use in compound filters.

Also see:


Isotammi Add-on Rules

Rather than distributing through the Gramps open source project, the Taapeli Project (which is a national database of Finnish Genealogical Society) curates their own set of "Isotammi lisäosia" : “Big Oak (the mythological World Tree) add-ons" for Gramps. The add-on manager installation files are hosted separately.

Besides an initial experiment distributing a rule, they created the SuperTool for directly executing queries and building custom query rules used by a "Generic <Object> filter" in each category view.

FilterRules : Plugin Manager Rulebook Collection

General Filter Rule Addons

People related to <filter>
Fig. Addons (Rules).5 Searching by Rule name

PeoplePerson • General filters [[Template:Version manual_Addons|addon]] rule to find Person(s) matching a specified filter. Matches people who are related to anybody matched by a person filter.

Pythongadget.png

isrelatedwithfiltermatch provided as sample .gpr.py & .py code for writing addon filter rules. Demonstrates piping the output of one custom Filter into another.

People with events with a selected role
Fig. Addons (Rules).6 Searching for Person Rules which include the 'role' term.

PeoplePerson • Event filters [[Template:Version manual_Addons|addon]] rule to find Person(s) having any Event with a specified Event Role.

This rule is particularly useful to search for people with Events having an "Unknown" event role. An Unknown role always a placeholder that should be resolved as soon as possible.

Families with Events with a selected role
Fig. Addons (Rules).7 Searching by Rule name

FamilyFamilies • Event filters [[Template:Version manual_Addons|addon]] rule to find Families having any Family member or shared Family level Event with a specified Event Role.

Pythongadget.png

hasrolerule provided as sample .gpr.py & .py code for writing addon filter rules. Demonstrates including category variants of a rule in the same addon.

Source matching parameters
Fig. Addons (Rules).8 Searching by Rule name

Sources (v3.4.x)Sources • General filters [[Template:Version manual_Addons|addon]] rule to find Sources based on the following parameters: Title, Author, Abbreviation, Publication.

This addon rule has similar options to the standard Filter Gramplet for the [[Gramps_Template:Version manual_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_2#New_Source_dialog|Source]] [[Gramps_Template:Version manual_Wiki_Manual_-_Categories#Sources_Category|Category View]]. It can be used to save complex filter parameters.

Pythongadget.png

hassourcefilter provided as sample .gpr.py & .py code for writing addon filter rules. Demonstrates text based filtering with RegEx options.

People Separated less than <N> degrees of <Home person>
Fig. Addons (Rules).9 Searching for Person Rules which include the 'degrees' term.

PeoplePerson • Relationship filters [[Template:Version manual_Addons|addon]] rule to find Person(s) having a relationship to the Home Person within a specified degree of Consanguinity and Affinity.

The Home person is point of reference for calculating (<N>) Degrees. For N, Minimum value is 1, Maximum is value 32.

  • Degree 1: person/spouse + children ( <zero N> ancestors, because the selected person is generation 1 + 1N descendants)
  • Degree 2: person plus person’s parents, siblings, niece/nephew, children, grandchildren, etc. (= 1N ancestors + 2N descendants)
  • Degree 3: persons grandparents and 3 generations down. (= 2N ancestors + 3N descendants).

The ancestors and descendants generations have an offset of 1 to mimic the built-in filter rule behavior. Early versions of this rule optionally included partners and non-primary parents. Those relatives are now always included.

This Rule may need to manually downloaded and installed: see the source code files on the GitHub Repository

People Separated less than <N> degrees of <person>
Fig. Addons (Rules).10 Searching Person rules by 'degrees' term; roll-over hint for ID.

PeoplePerson • Relationship filters [[Template:Version manual_Addons|addon]] rule to find Person(s) having a relationship to a specified Person within a specified degree of Consanguinity and Affinity.

The Person corresponding to the ID is the focal point of reference for calculating (<N>) Degrees. For N, Minimum value is 1, Maximum is value 32.

  • Degree 1: person/spouse + children ( <zero N> ancestors, because the selected person is generation 1 + 1N descendants)
  • Degree 2: person plus person’s parents, siblings, niece/nephew, children, grandchildren, etc. (= 1N ancestors + 2N descendants)
  • Degree 3: persons grandparents and 3 generations down. (= 2N ancestors + 3N descendants).

The ancestors and descendants generations have an offset of 1 to mimic the built-in filter rule behavior. Early versions of this rule optionally included partners and non-primary parents. Those relatives are now always included.

Early versions of this rule optionally included partners and non-primary parents. Those relatives are now always included. See the GitHub Repository files

Events of families matching a <family filter>

Events of families matching a <family filter>

Families matching <event filter>

Matches families that are matched by an event filter

People who are part of families matching <filter>

People who are part of families matching <filter>

Filter people by their age at death
Match associations of <person filter>
People with multiple parent records

PeoplePerson • Family filters [[Template:Version manual_Addons|addon]] rule that matches people who have more than one set of parents.


FilterRules2 : Plugin Manager Rulebook Collection

Genetic Genealogy Filter Rule Addons

The following rules are based on the logical rules of genetics, not on comparing DNA data.

Matrilineal progenitrix of <person>

Matches the earliest recorded matrilineal ancestor mother.

Mitochondrial inheritance of <filter>

Matches recorded descendants of a filter result following mitochondrial inheritance patterns.

Mitochondrial inheritance of <person>

Matches recorded descendants of person following mitochondrial inheritance patterns.

Patrilineal progenitor of <person>

Matches the earliest recorded patrilineal ancestor father.

X-chromosomal ancestors of <person>

Matches ancestors of <person> following a X-chromosomal inheritance pattern.

X-chromosomal descendants of <person>

Matches descendants of <person> following a X-chromosomal inheritance pattern.

Y-chromosomal inheritance of <person filter>

Matches recorded descendants of a filter result following Y-chromosomal inheritance patterns.

Y-chromosomal inheritance of <person>

Matches recorded descendants of person following Y-chromosomal inheritance patterns.

Pre-Release Rules

Descendants of <person> sharing yDNA with each other

Matches descendants of a <person> sharing yDNA

The Evolution of of Rules as AddOns

Gramps 5.1.1 (Sept. 2019)

  • Fix bug 0011114: resolve crashes in withinarea filter rule:
Avoid bad coordinates in the ref place
Avoid alphabetic characters in filter rules
Could not convert string to float by using withinarea filter rule
Difference between sidebar filter and filter rule
Fix Bug 0011293 Fix internationalization issue where untranslated English GUI items appear in Event filter

Gramps 5.1.0 (Aug. 2019)

  • New feature : Filter Rules can now be expanded through the [[Template:Version manual_Addons|addons]] interface.
  • Filter Rule editor, save pane position
  • Fix Bugs 0007950 and 0011430: Name Filter rule now supports multiple attribute: Check all values of an attribute type and not only the first one
  • filters rule have children person filter: Check all families of a person for children and not only the first
  • Person Sidebarfilter:
Fix Person Sidebarfilter when using ‘Event’ and Reg expressions
In personsidebarfilter, search on each part of name Instead of requiring that the entire search string matches a single one of the Person’s names, the function will require that each word in the search string matches any of the Person’s name fields.
  • Fix exception when merging with active sidebar filter

Gramps 5.0.2 (Aug. 2019)

  • Fix bug 0010509: resolves silent fail - relationship path between filter rule when parent is missing
  • Fix crash when using sidebar filter and merging in another view
  • Fix Place Tree view when using enclosed by sidebar filter
  • Fix Relationship Graph; extra people when using filters & subgraphs

Gramps 5.0.1 (Dec. 2018)

  • Fix bug 0010685: resolves crash in IsDuplicatedAncestorOf filter rule on tree loop
  • Fix Person Sidebarfilter when using ‘Event’ and Reg expressions
  • Fix FilterParser for much older 3.x custom_filters.xml files
  • Fix crash when a filter with loop in definition is defined
  • Fix view so column widths are preserved when using filters

Gramps 5.0.0 (Jul. 2018)

  • Fix Custom filter update when created via sidebar.

Developing New Rule AddOns

Beginning with version 5.0, Gramps implemented an database API (application programming interface) infrastructure supporting user selectable backends. This new exploration of database support lead developer to extend the addon (plug-in) framework to support expanding Filter Rules via the Plugin Manager.

The 5.1 release changed the default database backend from BSDDB (Berkeley database) to SQLite. With the broader group of user familiar with optimizing searches, it made sense to open Gramps to the specialized knowledge.

Resources

See also

The Group As name override
unify similar surmanes thread
threads with "Group As name"