Proposal: 2 New person filters

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Proposal: 2 New person filters

Robert Chéramy
Hello,

I'd like to add 2 more Person filters (patch to svn trunk attached) to
gramps:
- IsRelatedWith, which includes every person related (parents, children,
sibilings, mariage) to <person>. This is useful to export only one part
of the database.

- HasCommonAncestorOrSpouseWith, which returns people and their spouse
with a common ancestor with <Person>. This is useful for the
Relationship graph report, as the marriage is already displayed in the
graph, having the spouse makes the graph nicer. I used to create this
rule with two person filters (first = HasCommonAncestorOrSpouseWith;
second = Spouse of <first> or <first>), but gramps crashes a lot when
doing this to export data.

What do you think of these? Should/Can I improve something in the code?

Thanks,

Robert




------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel

filters.patch (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: 2 New person filters

jerome
Hello,


You generate two new rules, which seem to be already possible with
current rules addition, no ?

1. 'IsRelatedWith' should return the same thing as:
* 'HasIdOf' and
* 'IsParentOfFilterMatch' on 'HasIdOf'
* 'IsSiblingOfFilterMatch' on 'HasIdOf'
* 'IsSpouseOfFilterMatch' on 'HasIdOf'

2. 'HasCommonAncestorOrSpouseWith' should return the same thing as:
* 'HasCommonAncestorWith' and
* 'IsSpouseOfFilterMatch' on 'HasCommonAncestorWith'


Something different, Robert you are also contributing into a GTK
image/slide show program. I like it very much and I wonder if the
cropping (zoom like) is done by Cairo lib or GTK ?

Note, we are also able to generate some nice tutorial videos with
'imagination' ! ;)
I add this program to the screencast section:
http://www.gramps-project.org/wiki/index.php?title=How_you_can_help#But_what_if_I_don.27t_know_how_to_program.3F

There is some new feature into Gramps related to image management and
this type of zoom feature might help to improve the current
implementation (ie. thumbnails features, preview, region into image,
face capture, reports, etc ...)

Adam and Brian made possible a region support into textual file formats
for reports (trunk) : http://www.gramps-project.org/bugs/view.php?id=2513

Nick, Rob, Doug, etc ... made some gramplets related to image.

Maybe there is something for a simple zoom (scroll wheel and/or button)
which could add this feature into some 'image' gramplets (and/or
Media_reference editor) ?


Regards,
Jérôme


Robert Chéramy a écrit :

> Hello,
>
> I'd like to add 2 more Person filters (patch to svn trunk attached) to
> gramps:
> - IsRelatedWith, which includes every person related (parents, children,
> sibilings, mariage) to <person>. This is useful to export only one part
> of the database.
>
> - HasCommonAncestorOrSpouseWith, which returns people and their spouse
> with a common ancestor with <Person>. This is useful for the
> Relationship graph report, as the marriage is already displayed in the
> graph, having the spouse makes the graph nicer. I used to create this
> rule with two person filters (first = HasCommonAncestorOrSpouseWith;
> second = Spouse of <first> or <first>), but gramps crashes a lot when
> doing this to export data.
>
> What do you think of these? Should/Can I improve something in the code?
>
> Thanks,
>
> Robert
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Doing More with Less: The Next Generation Virtual Desktop
> What are the key obstacles that have prevented many mid-market businesses
> from deploying virtual desktops?   How do next-generation virtual desktops
> provide companies an easier-to-deploy, easier-to-manage and more affordable
> virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: 2 New person filters

Robert Chéramy
Hello,

Am 16.09.2011 08:38, schrieb Jérôme:
> You generate two new rules, which seem to be already possible with
> current rules addition, no ?
>
> 1. 'IsRelatedWith' should return the same thing as:
> * 'HasIdOf' and
> * 'IsParentOfFilterMatch' on 'HasIdOf'
> * 'IsSiblingOfFilterMatch' on 'HasIdOf'
> * 'IsSpouseOfFilterMatch' on 'HasIdOf'

I forgot to write that IsRelatedWith is recursive... If someone in the
database is somehow related to <person>, it will be included by the
filter. I don't think this can be done with current rules.

> 2. 'HasCommonAncestorOrSpouseWith' should return the same thing as:
> * 'HasCommonAncestorWith' and
> * 'IsSpouseOfFilterMatch' on 'HasCommonAncestorWith'

Yes, this is true, this is what I use in my "production" database.
I had problem with imbricated filters in the past (crash) but as I can
not reproduce, I'd say forget HasCommonAncestorOrSpouseWith, the name of
the filter is poorly choosed anyway ;-)

> Something different, Robert you are also contributing into a GTK
> image/slide show program. I like it very much and I wonder if the
> cropping (zoom like) is done by Cairo lib or GTK ?

You mean the transition called "Ken Burn effect" ? This is done by
cairo, the zoom and position is calculated slide for slide, so cairo
does only resize the picture, no dynamic zooming is done in cairo.

> There is some new feature into Gramps related to image management and
> this type of zoom feature might help to improve the current
> implementation (ie. thumbnails features, preview, region into image,
> face capture, reports, etc ...)
>
> Adam and Brian made possible a region support into textual file
> formats for reports (trunk) :
> http://www.gramps-project.org/bugs/view.php?id=2513
>
> Nick, Rob, Doug, etc ... made some gramplets related to image.
>
> Maybe there is something for a simple zoom (scroll wheel and/or
> button) which could add this feature into some 'image' gramplets
> (and/or Media_reference editor) ?

I'm not sure what you are trying to do. In the person editor, one can
choose a portion of the picture by giving its coordinates. You'd like to
have the possibility to do this directly in the picture with the mouse
wheel and draging the image to the right position ?

Robert

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: 2 New person filters

jerome
Hello Robert,

> I forgot to write that IsRelatedWith is recursive... If someone in the
> database is somehow related to <person>, it will be included by the
> filter. I don't think this can be done with current rules.

In this case, this is rather close to:

* Related Relatives gramplet
http://www.gramps-project.org/wiki/index.php?title=RelatedRelativesGramplet
http://www.gramps-project.org/wiki/index.php?title=File:RelatedRelativesGramplet.png

* Related person
http://www.gramps-project.org/wiki/index.php?title=RelatedPersons
http://www.jfchasse.fr/_RelatedPersons.py.zip

I am maybe not the best one for code review, but it seems that to add
this IsRelatedWith (recursive) is a good idea ! :)

If you want, we can add it as feature request (or planned for next major
release) on bug tracker !
http://www.gramps-project.org/wiki/index.php?title=Using_the_bug_tracker#Projects

And/or if advanced developpers say "it is OK", then I can commit your
patch !

> You mean the transition called "Ken Burn effect" ?

Yes, that's it !
http://upload.wikimedia.org/wikipedia/commons/a/a7/Ken_Burns_Effect_demonstration.ogg

> In the person editor, one can
> choose a portion of the picture by giving its coordinates. You'd like to
> have the possibility to do this directly in the picture with the mouse
> wheel and draging the image to the right position ?

Well, this means to skip the media reference editor! I just think on
something like a user-friendly alternative to current media_reference
editor.
http://www.gramps-project.org/wiki/index.php?title=Gramps_3.3_Wiki_Manual_-_Entering_and_Editing_Data:_Detailed_-_part_2#Editing_media_object_references

The coordinates/points were added/displayed (way 1), then Benny improved
the area selection by using the mouse pointer (way 2). But these
values/points might be also hidden for Aunt Martha and end users!

* Improve image subsection selection
http://www.gramps-project.org/bugs/view.php?id=3145

* Zoom needed for Image reference regions preview
http://www.gramps-project.org/bugs/view.php?id=2802

* improvement of rectangular selection in media reference dialog
http://www.gramps-project.org/bugs/view.php?id=2343

* To avoid inverted values on media_ref region
http://www.gramps-project.org/bugs/view.php?id=3842

etc ...


Regards,
Jérôme


Robert Chéramy a écrit :

> Hello,
>
> Am 16.09.2011 08:38, schrieb Jérôme:
>> You generate two new rules, which seem to be already possible with
>> current rules addition, no ?
>>
>> 1. 'IsRelatedWith' should return the same thing as:
>> * 'HasIdOf' and
>> * 'IsParentOfFilterMatch' on 'HasIdOf'
>> * 'IsSiblingOfFilterMatch' on 'HasIdOf'
>> * 'IsSpouseOfFilterMatch' on 'HasIdOf'
>
> I forgot to write that IsRelatedWith is recursive... If someone in the
> database is somehow related to <person>, it will be included by the
> filter. I don't think this can be done with current rules.
>
>> 2. 'HasCommonAncestorOrSpouseWith' should return the same thing as:
>> * 'HasCommonAncestorWith' and
>> * 'IsSpouseOfFilterMatch' on 'HasCommonAncestorWith'
>
> Yes, this is true, this is what I use in my "production" database.
> I had problem with imbricated filters in the past (crash) but as I can
> not reproduce, I'd say forget HasCommonAncestorOrSpouseWith, the name of
> the filter is poorly choosed anyway ;-)
>
>> Something different, Robert you are also contributing into a GTK
>> image/slide show program. I like it very much and I wonder if the
>> cropping (zoom like) is done by Cairo lib or GTK ?
>
> You mean the transition called "Ken Burn effect" ? This is done by
> cairo, the zoom and position is calculated slide for slide, so cairo
> does only resize the picture, no dynamic zooming is done in cairo.
>
>> There is some new feature into Gramps related to image management and
>> this type of zoom feature might help to improve the current
>> implementation (ie. thumbnails features, preview, region into image,
>> face capture, reports, etc ...)
>>
>> Adam and Brian made possible a region support into textual file
>> formats for reports (trunk) :
>> http://www.gramps-project.org/bugs/view.php?id=2513
>>
>> Nick, Rob, Doug, etc ... made some gramplets related to image.
>>
>> Maybe there is something for a simple zoom (scroll wheel and/or
>> button) which could add this feature into some 'image' gramplets
>> (and/or Media_reference editor) ?
>
> I'm not sure what you are trying to do. In the person editor, one can
> choose a portion of the picture by giving its coordinates. You'd like to
> have the possibility to do this directly in the picture with the mouse
> wheel and draging the image to the right position ?
>
> Robert
>
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> http://p.sf.net/sfu/rim-devcon-copy2
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: 2 New person filters

Robert Chéramy
Am 17.09.2011 10:58, schrieb Jérôme:

> * Related person
> http://www.gramps-project.org/wiki/index.php?title=RelatedPersons
> http://www.jfchasse.fr/_RelatedPersons.py.zip
>
> I am maybe not the best one for code review, but it seems that to add
> this IsRelatedWith (recursive) is a good idea ! :)
>
> If you want, we can add it as feature request (or planned for next
> major release) on bug tracker !
> http://www.gramps-project.org/wiki/index.php?title=Using_the_bug_tracker#Projects

Done: http://www.gramps-project.org/bugs/view.php?id=5244

I'll have a look at the media reference editor part and open a separate
thread or submit patches in the bug tracker.

Cheers,

tibob

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: 2 New person filters

jerome
OK, thank you.

Note, these patchs for implementation on wiki page (generic filter on export and reports) were for Gramps 3.2.x and previous versions.

Now (3.3.x and later), code seems to be the same for all export formats (XML, csv, GeneWeb, gedcom, etc ...)


Regards,
Jérôme


--- En date de : Sam 17.9.11, Robert Chéramy <[hidden email]> a écrit :

> De: Robert Chéramy <[hidden email]>
> Objet: Re: [Gramps-devel] Proposal: 2 New person filters
> À: "Gramps Development List" <[hidden email]>
> Date: Samedi 17 septembre 2011, 20h23
> Am 17.09.2011 10:58, schrieb
> Jérôme:
> > * Related person
> > http://www.gramps-project.org/wiki/index.php?title=RelatedPersons
> > http://www.jfchasse.fr/_RelatedPersons.py.zip
> >
> > I am maybe not the best one for code review, but it
> seems that to add
> > this IsRelatedWith (recursive) is a good idea ! :)
> >
> > If you want, we can add it as feature request (or
> planned for next
> > major release) on bug tracker !
> > http://www.gramps-project.org/wiki/index.php?title=Using_the_bug_tracker#Projects
>
> Done: http://www.gramps-project.org/bugs/view.php?id=5244
>
> I'll have a look at the media reference editor part and
> open a separate
> thread or submit patches in the bug tracker.
>
> Cheers,
>
> tibob
>
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San
> Francisco, CA
> http://p.sf.net/sfu/rim-devcon-copy2
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: 2 New person filters

jerome
In reply to this post by Robert Chéramy
Robert,

I added your filter rule to the trunk. It can be tested and reviewed by devs.

Note, there is a previous alternate patch !
See: http://www.gramps-project.org/bugs/view.php?id=4817

I cannot say what is the best way ...
Anyway, as it was already posted (and no one has reviewed its patch), I suppose we should also add it on the copyright and to look at the method used, memory use, etc ... ?

--- En date de : Sam 17.9.11, Robert Chéramy <[hidden email]> a écrit :

> De: Robert Chéramy <[hidden email]>
> Objet: Re: [Gramps-devel] Proposal: 2 New person filters
> À: "Gramps Development List" <[hidden email]>
> Date: Samedi 17 septembre 2011, 20h23
> Am 17.09.2011 10:58, schrieb
> Jérôme:
> > * Related person
> > http://www.gramps-project.org/wiki/index.php?title=RelatedPersons
> > http://www.jfchasse.fr/_RelatedPersons.py.zip
> >
> > I am maybe not the best one for code review, but it
> seems that to add
> > this IsRelatedWith (recursive) is a good idea ! :)
> >
> > If you want, we can add it as feature request (or
> planned for next
> > major release) on bug tracker !
> > http://www.gramps-project.org/wiki/index.php?title=Using_the_bug_tracker#Projects
>
> Done: http://www.gramps-project.org/bugs/view.php?id=5244
>
> I'll have a look at the media reference editor part and
> open a separate
> thread or submit patches in the bug tracker.
>
> Cheers,
>
> tibob
>
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San
> Francisco, CA
> http://p.sf.net/sfu/rim-devcon-copy2
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel