scripting a filter parameter rather than making many filters

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

scripting a filter parameter rather than making many filters

brian fitzgerald
Does anybody know of a way to change a parameter of a filter using a bash script? Actually any technique would do.
That's a generic question for a specific use case I have.

The use case I am looking at would be a relative of mine who wants to know/see what the relationship path is between him and a set of arbitrary other individuals in the database. I have the list of arbitrary target individuals which might be considered fairly constant, so I can loop through them if I know how, but for every relative who wants this graph every "relationship path between two people" filter would be different.

Maybe it could be scripted if there was a way to programatically access and change the filter-person IDs inside a filter.

Any ideas?

Thanks in advance.

brian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: scripting a filter parameter rather than making many filters

Nick Hall
On 25/03/17 21:14, brian fitzgerald wrote:

> Does anybody know of a way to change a parameter of a filter using a
> bash script? Actually any technique would do.
> That's a generic question for a specific use case I have.
>
> The use case I am looking at would be a relative of mine who wants to
> know/see what the relationship path is between him and a set of
> arbitrary other individuals in the database. I have the list of
> arbitrary target individuals which might be considered fairly
> constant, so I can loop through them if I know how, but for every
> relative who wants this graph every "relationship path between two
> people" filter would be different.
>
> Maybe it could be scripted if there was a way to programatically
> access and change the filter-person IDs inside a filter.
>
> Any ideas?

 From within a bash script, it would be fairly easy to modify the
custom_filters.xml file.

 From within python code, you could create a GenericFilter and then add
a Rule to it.  Calling the apply method will loop through the results.

Nick.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: scripting a filter parameter rather than making many filters

brian fitzgerald
Thanks.

On Mon, Mar 27, 2017 at 12:20 PM, Nick Hall <[hidden email]> wrote:
On 25/03/17 21:14, brian fitzgerald wrote:
> Does anybody know of a way to change a parameter of a filter using a
> bash script? Actually any technique would do.
> That's a generic question for a specific use case I have.
>
> The use case I am looking at would be a relative of mine who wants to
> know/see what the relationship path is between him and a set of
> arbitrary other individuals in the database. I have the list of
> arbitrary target individuals which might be considered fairly
> constant, so I can loop through them if I know how, but for every
> relative who wants this graph every "relationship path between two
> people" filter would be different.
>
> Maybe it could be scripted if there was a way to programatically
> access and change the filter-person IDs inside a filter.
>
> Any ideas?

 From within a bash script, it would be fairly easy to modify the
custom_filters.xml file.

 From within python code, you could create a GenericFilter and then add
a Rule to it.  Calling the apply method will loop through the results.

Nick.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Loading...