Managing your complex Custom Filters

I’ve had to flush my library of Custom Filters
several times now. It gets so cluttered that I cannot remember what’s there. And, since the Filter management tool is siloed by View category, it is hard to gain perspective. It it also painful to clean View by View by View by… So I just delete the XML file from the User Directory and start fresh.

The other 2 problems are that Custom Filters definitions:

  1. are application-wide (rather than Tree-specific)
  2. are not included in the backup.

The first is a problem since many rules depend on specifying a Tree object for comparison… a named Tag or particular record ID. When you’re in a different Tree, that object probably doesn’t exist and the Filter fails.

The problems of the 2nd item are obvious.

So how do you manage your filters?

3 Likes

Something I had just posted to the maillist:

Once you write your Custom Filter (remember to give it an unambiguous description) and use it a few times, why not share the Filter definition with us?

The easiest way to share a custom filter is NOT to describe all the rule settings in excruciating detail. Instead, just find the custom_filter.xml file in your Gramps User Directory. Open it with a text editor and share the XML snippet. (Finding the rule start & end points, buried among XML tags, is easier with those unambiguous descriptions.)

Interested parties can paste the snippet (after making a backup) into their own custom_filter.xml file. The next time they open Gramps, it’ll be in their Filter list.

(And, if you unfortunately lose your Filter definition in the future, it will have been preserved here in the Maillist archive.)

There is a Feature Request to backup custom_filter.xml

0011408: Add Option for Saving filters when you Backup your Gramps database.

2 Likes

I still think it would be better to included it in the backup, with all media files, and any other settings and custom edits you have done…

I still wish for an user defind folder for settings and gramplets (specially those you need to customize) away from the system drive on windows, and yes, I know it can be moved with a path setting or a symlink, but either are recommended for system folders in Windows…

It would be so great to be able to just define a folder the same way you do with databases and media…

  • Database folder:
  • User settings (and gramplets):
  • Media library root folder:

And for backup:
Would you like to backup:
[ ] Database
[ ] All User settings
[ ] Customized Gramplets and Code*

*(if its possible)

There is a command line interface for Gramps, so it should possible to create a backup script that includes all desired files.

For tree-specific custom filters, maybe you could include some abbreviation(s) in parentheses within the filter name to indicate which tree(s) it applies to.

I don’t think most users of Gramps will know how to create a command line script or run it…
Most users of Windows and MAC’s don’t actually know what “Python” or “Graphviz” are…

1 Like

I hesitate to offer this… it is potentially dangerous.

But I’ve stored a few more esoteric items as Private Notes within the Tree. (This isn’t the dangerous bit.)

As background, let’s say I’m going to generate a family branch website or collate book for publication from Gramps. At that point, I’m probably going to export a filtered set of data to a new Tree. That creates something that can be inspected to make certain Private data doesn’t get published. It can also be archived as a fixed point of reference… or published on the website as a downloadable shared Tree.

So that this style of website or book can be re-generated from the full Tree, I’ll store Private ToDoNotes under the central figure of the report. That’s usually the Home Person.

This includes:

  1. the contents of the custom_filter.xml with a notation of which filter was applied for the export.
  2. the contents of the books.xml so the style of the book or website can be matched
  3. the ID format section of the gramps.ini so I am reminded to reconfigure Preferences to follow the same GrampsID pattern.

That part isn’t dangerous either… merely unrealistically optimistic. What are the chances of me remembering these Notes are there 10 years later?

But here’s the tricky part…

I set up those 3 Gramps working files as objects in the Media View. From there, I can pop them open in a text editor for inspection or copying into a Note. Of course, while they’re open for viewing by an external program, Gramps can’t update them and might crater if it tries.

Gramps fights allowing them to be Media objects. In the Windows version, you can’t browse to Media objects in hidden folders. Nor can you type in a path that can’t be browsed. But… you can edit a Media object to paste in a different path and filename. So I create a dummy Media object and paste in the fully qualified path.

Likewise, I’ve found it enlightening to inspect the add-ons list file occasionally. So that is my 4th faux Media object in my Tree.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.