I have had a problem with one of my AppleScipt outputs: I have noticed that
an individual whose parents are cousins was printed twice in the list. I
first thought that it came from a bug in my script, but it doesn't. If you
look at the attached PDF, you'll see that the same descendant (Pierre
Jacques Brossier) shows twice but is not marked as being the same
individual.
GEDitCOM II doesn't consider this individual as being the same, so when I
output the descendants list either in the outline list or via an
AppleScript, it is shown twice, which gives wrong results and causes
numbering problems, for instance. Is there a way to solve this within
GEDitCOM II itself other than modifying the scripts?
Thank you very much.
--
Stéphane LELAURE
This will probably need to be addressed by new coding within the scripts you have but will let John handle that part.
Sparkgapper
> <Brossier.pdf>
le 22/10/11 17:58, John Nairn à jo...@geditcom.com a écrit :
Yes, I understand that, because it's something I have already come across in
other parts of my gedcom file.
>
> I can't recall exactly why I did by this method. I am sure this method catches
> all trees duplicate branches and makes sure no one is mistakenly left of the
> tree. I think if duplicates were checked one level higher (i.e., at the spouse
> level) it was possible to lose connections to additional spouses for certain
> individuals. I can't think of example now and maybe it can be improved, but
> the current version does work as intended.
>
> Now, in scripts, you can be sure no one will appear too many times, but
> individuals may appear more than once.
Without being mentioned as appearing somewhere else. That's the problem.
> One of the best ways to find ancestors
> or descendants in trees is to "show ancestors" or "show descendants" and then
> use the "listed records" property of that window to get a list of ancestors or
> descendants. For duplicate individuals, their entry will have a third item
> with the cross reference number. For a duplicate like Pierre Jacques BROSSIER,
> however, it may not have the cross reference number (I would have to check).
No, it doesn't. I did check. That's why this indi appears twice in my list
output after running my script.
> If is not there, I will see if it can be added.
Would be nice.
> Otherwise, if it is important,
> you script would have to check (but would only have to check those have no
> further ancestors of descendants). I would need to know about the script to
> see how to do that.
The script I used is the EGT report that you already have. I have updated
that script a bit, but only for a more "cosmetic" and personal output. The
way it finds all descendants hasn't been changed and was based on the
descendants report, I think.
> One thing I do (more commonly in python) is to create a
> dictionary variable and add an entry for each individual processed using their
> id property as a key. For each individual, you then check first if the key is
> already in the dictionary before proceeding. Checking keys in dictionaries is
> much faster than other ways to check for duplicates.
Yes, that's exactly what I was thinking of doing to solve my problem. I'll
see how I'll implement this.
> If your script manually
> builds trees by following connections, it has to have its own method to check
> for duplicates.
>
> John
Thanks anyway.
--
Stéphane LELAURE