FilterWorkbench — Guide

*A Gramps gramplet for building, saving, editing, sharing and testing your own person filters. Danish name: Filterværksted.*

This guide covers what FilterWorkbench is, how it stores things, and how to use every part of it. For a quick summary and install steps, see README.md.


1. What it is

FilterWorkbench is a floating gramplet that you add to the People view sidebar. From there you can:

It is meant for beginners and slightly experienced users who understand the three ways rules can be combined (all / any / exactly one), and who want a friendlier place to experiment than Gramps' built‑in filter editor.

2. How it stores filters (and why that matters)

FilterWorkbench keeps its filters in its own file, one per family tree, named after the tree's internal database id. It has two sections:

By default it never writes to Gramps' custom_filters.xml. FilterWorkbench filters are completely separate from Gramps' own custom filters, so experimenting here can't clutter or corrupt your Gramps filter list. When a filter is finished you can opt in and copy it into Gramps' own Filter Editor with Export to — and take it out again with Remove from (see §8). Both are deliberate, one‑at‑a‑time actions that never overwrite anything.

References between filters are stored as stable ids and resolved to run‑time names only when a filter is actually applied — so renaming a helper never breaks a main filter that uses it.

3. Concepts

of…"*. FilterWorkbench uses the same rule catalogue as Gramps, including any rule add‑ons you have installed.

one or more main filters. Helper filters are building blocks; they are created and edited inside the builder (there is deliberately no standalone "new helper" button). If you want a filter available on its own elsewhere, make it a main filter instead.

plain rules and/or references to helper filters.

them, match any of them, or match exactly one. There is also an invert option ("show the opposite result").

4. The build window

Open it from the gramplet with New (blank) or Edit (the selected main filter).

At the top a short note reminds you what the window does. Below that:

the comment of a referenced helper filter, so you can see at a glance what a reference does. You can drag the Filter column wider; its width is remembered.

rule on the person list to see what it alone matches.

rule to Add to / Remove from favorites. Your favorites appear grouped at the top of the list for quick reuse. The builder itself scrolls vertically, so long filters stay reachable.

Test selected filter (runs just the highlighted helper on the person list).

closing the builder**, so you can keep tweaking.

Live match count

While you build, FilterWorkbench shows how many people the current filter matches, and updates it as you edit. One special case: a rule that depends on the active person can't be counted from the floating window (Gramps only knows the active person in the person view itself), so its count is shown blank rather than a misleading 0 — the filter still applies correctly. If you want a dependable "proband" anchor, use Gramps' built‑in Home Person rule instead.

5. Testing vs. applying

while you work. It's transient.

person list until you press Reset (or close Gramps).

While a filter is applied — or while you're testing one — it also appears in Gramps' other person selectors (GEDCOM export's Person Filter, reports, the sidebar) under the readable name wb_<name>. This is convenient: you can apply a filter here and then pick it straight from the GEDCOM export dialog. It lives only in memory; Reset or closing removes it, and it is never written to custom_filters.xml.

> Note the distinction: applying only makes a filter appear transiently in Gramps' > filter selection lists as wb_<name> (gone on Reset or when you close Gramps). To > make a filter appear permanently in Gramps' own filter editor, use Export to > instead (see §8).

6. The gramplet

The gramplet is your home base in the People view sidebar:

filters it uses nested underneath. A Filter box above the list narrows it as you type, and a Guide button (top‑right) opens this guide.

show everyone again.

filter and the helper filters it uses that nothing else needs; helper filters still used by another filter, and any separate main filters it referenced, are kept — the confirmation lists exactly what will be deleted and what will stay. Deleting the filter currently applied resets the view automatically.

filter into Gramps' own Filter Editor, or take it back out again (see §8).

7. Import / Export between trees

Export writes all of this tree's filters to a file. Import adds filters from another tree's file — it never replaces what you already have. The merge is careful:

true duplicate and skipped; references are pointed at your local copy. Re‑importing the same file therefore adds nothing (it's idempotent).

name (Name (2), Name (3), …), and the importing filter is rewired to that new copy. Your local filters are never changed.

The import dialog summarises what was added, skipped and renamed. If an imported filter references a rule add‑on that isn't installed in this Gramps, the dialog **warns you before you confirm** — the filter still imports, but it will only work once you install the matching rule add‑on.

8. Export to / Remove from Gramps' Filter Editor

Sometimes you want a finished FilterWorkbench filter to live in Gramps' own Filter Editor — so it shows up there permanently, like any native custom filter. The **Gramps Filter Editor** section at the bottom of the gramplet does exactly that, as a deliberate, non‑destructive, opt‑in step.

Gramps' custom_filters.xml. Your main filter keeps its name; helper filters are written under safe, sortable names so they can't clash with your own. Nothing is ever overwritten: if a name already belongs to a non‑FilterWorkbench filter the export is refused and asks you to rename; if you exported the same filter before it asks you to Remove from first. Helper filters already exported by another of your filters are reused, not duplicated — so shared helpers work across several exported filters.

filter and the helper filters that nothing else uses; helper filters still shared by another exported filter are kept. The confirmation lists exactly what is removed and what stays.

Two things to know:

dialog) is open while you Export to / Remove from, closing it would re‑save its old copy over your change — so FilterWorkbench refuses until it is closed.

to a specific person, place or event, that reference is only meaningful in the tree it came from. The confirmation warns you when this might apply.

This is different from applying (§5): applying shows a filter transiently as wb_<name> and disappears on Reset; Export to writes it in permanently until you Remove from.

9. Regular expressions and case

Rules that support it (the ones with a Use regular expressions option in the rule editor) can match by regex, and optionally case‑sensitively. Tick *Use regular expressions to treat the value as a regex; the Case sensitive* option becomes available when regex is on. These settings are saved with the rule and re‑applied whenever the filter runs, on both Gramps 5.2 and 6.0.

10. Notes & known limitations

can't guarantee it reopens in the same spot; window size is restored. X11 behaves as expected. Not critical.

Home Person for a deterministic anchor.

11. Uninstall

Close Gramps and delete the add‑on's folder from your user plugins directory (see the README for the path). Your family‑tree data is untouched. FilterWorkbench's own per‑tree filter files live separately, in …/gramps<XY>/filterbuilder/, and can be removed too if you wish.

12. Translations

The interface ships with a Danish translation ("Filterværksted"). A few strings shared with Gramps' own rule editor follow Gramps' built‑in translation, so they appear in your language if Gramps itself is translated there.

License & author

Released under the GNU General Public License v2.0 or later (GPL‑2.0‑or‑later), the same license as Gramps.

Henning — <contact@myown-project.dk> · <https://myown-project.dk>