Gramps filter rule
A named place and its sub-places
A Places filter rule that selects a named place and everything enclosed by it.
Purpose
A named place and its sub-places is a custom Places filter rule that matches a named place and every place enclosed by it, all the way down the place hierarchy.
Unlike Gramps’ built-in IsEnclosedBy rule, it selects by place name rather than Gramps ID. This makes the filter easier to understand and less dependent on IDs that may change after imports, backend upgrades or version changes.
If several places share the same name, all of them are used as targets.
Download and compatibility
- Works with Gramps 5.1, 5.2 and 6.x.
- Used in the Places view.
- A ready-to-use Danish translation is included.
Installation
- Close Gramps.
- Extract the downloaded ZIP archive.
-
Copy or extract the project folder into your Gramps user plugin folder.
Keep the complete folder structure unchanged, including any `locale` folder included with the project.
The user plugin folder is normally located here:
- **Windows:** `%AppData%\gramps\gramps(version)\plugins\`
- **Linux:** `~/.gramps/gramps(version)/plugins/`
- **macOS:** `~/Library/Application Support/gramps/gramps(version)/plugins/`
Replace `(version)` with the Gramps version folder used on your system.
Start Gramps again. -
Check that the installed filter, rule, gramplet or tool is available where described in the project documentation.
If the project does not appear or fails to load, check **Help → Plugin Manager** for an error message.
Removing the test version
- Close Gramps.
- Delete the project folder that you added to the Gramps user plugin folder.
-
Start Gramps again.
Because the project was installed only in the user plugin folder, removing that folder removes the test installation without changing the original Gramps program files.
Use the rule
- Open the place filter editor from the Places view.
- Create or edit a filter and add Places within a named place or its sub-places under General filters.
-
Enter a place name, for example
Langeland. - Leave Use regular expressions off for an exact, case-insensitive match, or enable it for a regular-expression search.
- Save the filter.
The result contains the named place itself and every place enclosed by it.
Name matching
With regular expressions disabled, this rule uses an exact , case-insensitive whole-name match. This differs from many standard Gramps rules, where an unchecked regular-expression option normally means a substring match.
With regular expressions enabled, patterns such as
Lange.*
,
^Skåne$
or
Skåne|Fyn
can be used. In regular-expression mode, the pattern is also tested against the full place title.