(Please include your Gramps version and Operating System)
Gramps v5.1.5
OS: Linux
Desktop: Cinnamon 5.4.12 tk: GTK 3.24.24 wm: Mutter dm: LightDM Distro: LMDE 5 Elsie base: Debian 11.2 bullseye
Citations of people matching the
we currently have
Active Person
Descendants of
I need the next step to give the Citations of those people.
I think you are right, I need the events of the people first. Plus the events of the Families where those people are in the Primary Role.
Then the citations of all those events. Parents and children would be included in the original People list if required.
Iām trying to get to the list of Citations as given in the Detailed Descendant Report.
If you are looking at this from a coding point of view, the export module might be the best example of what data to gather.
For the Selected set of people, it exports EVERYTHING related to those people, including secondary objects and the Family containers where they were a member. (Although it correctly omits the spouses, parents, siblings and offspring if those people were not part of the filter.)
You just need the subset of Citations and Sources within the tree cutting that the Export grabs. (I had not considered the Place and Enclosing Place citations in my previous posting. Or the Repositories. But this would include those too.)
Iāve wrote a SuperTool script which find events with a specific role in persons or families records (STF_participant_role). But Iām not sure it cover all types @emyoulation enumerates.
@kku if itās easy to call a Citation filter from SuperTool running in Citations, do you think it is possible from SuperTool running in Citations to call an Event filter to obtain citations from events it finds? Some kind of filter proxy.
If itās possible it could be easy to call my first filter from a Citations SuperTool filter to find Citations used in events with a specific role in persons or families records.
The export builds a comprehensive set of objects & recursive secondary objects for a filter of persons.
Maybe there could be a generalized filter that gathers that leverages the code already done for export and delivers just the active categoryās objects from that subset?
@PLegoux, I hope I understood correctly. This was not possible until now - but now SuperTool is updated to support accessing custom filters from another namespace. The syntax is like
f1 = filter(āevent-filternameā, namespace=āEventā)
Hi @kku
I have been able to get a filter in another namespace to work, but I cannot get it to work when that filter calls another filter. Is it me or is this a problem.?
You could post the SuperTool script here along with the custom_filters.xml file from your Gramps User Directory. (Use the ācodeā markup control. (An example capture and filter below. @kku these are NOT examples of his issue. They are examples of what kind of data would be provided.)
Or if youāve installed his experimental FilterParams addon, you could post a visualization of how one filter calls the other(s):
[Gramps SuperTool script file]
version=1
[title]
SuperTool-CitationsforActivePersonDesc
[category]
Citations
[initial_statements]
# takes Event filter eventsofactivedescent as its input and outputs a list of Citations used in those Events
# George Baynes
events_list = filter("eventsofactivedescent", namespace = "Event")
[statements]
[filter]
[expressions]
citation
[scope]
filtered
[unwind_lists]
False
[commit_changes]
False
[summary_only]
False
and my custom_filters.xml is here - only the relevant bits (I hope)
Iām still trying to get it to work in display mode but I just get the full set of Citations. The Events filter works in Gramps. And Iāve tried using a simple Events filter with Supertool and that works fine.
Thanks for your time.
Iāve always run the filter in the Filter Gramplet of the Category view. Then applied the SuperTool script on the āFiltered Objectsā. But since youāre using this to mock up finding the Citation List for to add to a Report, you wonāt have that SuperTool shell simplifying things.
PS: @kku Could you make namespace property available in Initial statements? If so it could be possible to test it there (In my case I could set my authorized variable to false there without need to test it every time in Statements)