Difference between revisions of "Rule expansions"

From Gramps
Jump to: navigation, search
m (Matches families with an event with a selected role)
m (Rule Ammendments)
Line 9: Line 9:
 
With the Release of Gramps version 5.1, the first addon Rules were released as [https://github.com/gramps-project/addons-source/tree/master/FilterRules examples of coding a Filter Rule addon]. [[{{Version manual}}_Addons#Installing_Addons_in_Gramps|Installing similarly to any other addon]], a New Rule appears as a menu item within [[Gramps_{{Version manual}}_Wiki_Manual_-_Filters#Add_Rule_dialog|Add Rule dialog]] while [[Gramps_{{Version manual}}_Wiki_Manual_-_Filters#Define_Filter_dialog|Defining a custom Filter]].  
 
With the Release of Gramps version 5.1, the first addon Rules were released as [https://github.com/gramps-project/addons-source/tree/master/FilterRules examples of coding a Filter Rule addon]. [[{{Version manual}}_Addons#Installing_Addons_in_Gramps|Installing similarly to any other addon]], a New Rule appears as a menu item within [[Gramps_{{Version manual}}_Wiki_Manual_-_Filters#Add_Rule_dialog|Add Rule dialog]] while [[Gramps_{{Version manual}}_Wiki_Manual_-_Filters#Define_Filter_dialog|Defining a custom Filter]].  
  
 
+
Filters created with these Rules can tested, cloned or deleted using the [[Gramps_5.1_Wiki_Manual_-_Filters#CategoryName_Filters_dialog|Filter Editor]]. The dialog is invoked from the {{Man menu|Edit}} menu in each Category view.
  
 
<!--
 
<!--
Line 21: Line 21:
  
 
* isrelatedwithfiltermatch.gpr.py Fix FilterRules to recognize local po files  
 
* isrelatedwithfiltermatch.gpr.py Fix FilterRules to recognize local po files  
 
  
 
: [https://github.com/gramps-project/addons-source/pull/274 Proposed #274] New filter rule 'familieswitheventfiltermatch'  
 
: [https://github.com/gramps-project/addons-source/pull/274 Proposed #274] New filter rule 'familieswitheventfiltermatch'  
 
: [https://github.com/gramps-project/addons-source/pull/275 Proposed #275] New filter rule 'personshavingfamilyfiltermatch'
 
: [https://github.com/gramps-project/addons-source/pull/275 Proposed #275] New filter rule 'personshavingfamilyfiltermatch'
 
-->
 
-->
 +
 
=locating Filter Rule Add-Ons=
 
=locating Filter Rule Add-Ons=
 
[[File:EnhancedPlugInManager-addon-SearchRule 51win.png|thumb|right|450px|Fig. {{#var:chapter}}.{{#vardefineecho:figure|{{#expr:{{#var:figure}}+1}}}} Search for '''''Rule''''' in the [[Plugin_Manager_Plugin|Enhanced Plugin Manager]]]]The Plugin Manager can be used for more than installing & 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 [[Plugin_Manager_Plugin|Enhanced Plugin Manager]]]]The Plugin Manager can be used for more than installing & updating plug-in  modules. It can help you discover the growing capabilities that might not be obvious.

Revision as of 08:59, 1 February 2020


Rule Ammendments

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

New built-in Rules appear without any fanfare. Plus there a 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 Filters.

With the Release of Gramps version 5.1, the first addon Rules were released as examples of coding a Filter Rule addon. Installing similarly to any other addon, a New Rule appears as a menu item within Add Rule dialog while 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 Add-Ons

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

The Plugin Manager can be used for more than installing & 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

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

When manually installed, each add-on rule's Python source code (.py) file and Gramps Plugin Registration (.gpr.py) file will be located in the \gramps5.1\plugins\FilterRules\ subdirectory of your User Directory

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

Add-on Rules



Matches families with an event with a selected role

  • Aid
  • Bride
  • Celebrant
  • Clergy
  • Family
  • Groom
  • Informant
  • Primary
  • Unknown
  • Witness


Matches people who are related to anybody matched by a person filter


Matches people with an event with a selected role


Matches sources with values containing the chosen parameters


People Separated less than <N> degrees of <Home person>

Fig. Addons (Rules).4 Searching by Rule name


People Separated less than <N> degrees of <person>

Fig. Addons (Rules).5 Degrees of Separation add-on Rule


The Evolution of of Rules as Add-Ons

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 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 Add-Ons

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 add-on (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"