Re: Need help using Gedcom.pm
[email protected] (Jutta Wrage) Thu, 8 Jun 2017 21:55:57 +0200
| Newsgroups | perl.gedcom |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_EC9B108A-5CC1-46EE-9B43-75507D1A37A5
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=iso-8859-1
Hi!
Am 07.05.2017 um 02:56 schrieb Ron Savage:
>>=20
>> I have this code snippet included for testing purposes now:
>>=20
>> my $surname;
>> if(my $husband =3D $i->husband()) {
>> $surname =3D $husband->get_value(["name", 1], "surn");
>> } else {
>> $surname =3D "";
>> }
>>=20
>> I get a surname now for married people there. But if there are more =
than one partners it is always the very first one taken there, it seems, =
even if a loose partnership without marriage.
>=20
> I suspect the reason you get 1 is that you have my $husband in scalar =
context. Try storing the return value in an array and see if you get the =
others.
I still do not get anything useful working.
For now I am near to parse the gedcom file myself to get what I want for =
my table.
What I really want is:
(a) either get all surnames of a person
(b) or get all parnter names
(c) or get all names of married partners (wich is the same als the =
Family names in (a) - if my entries have been made correctly
Here an example of an individual:
0 @I48949664@ INDI
1 NAME Anna Margareta/H=FCttmann/
2 GIVN Anna Margareta
2 SURN H=FCttmann
1 SEX F
1 NAME Anna Margaretha/H=FCttmann/
2 TYPE 6
2 GIVN Anna Margaretha
2 SURN H=FCttmann
1 NAME /Wrage/
2 TYPE 3
2 SURN Wrage
1 NAME /Kruse/
2 TYPE 3
2 SURN Kruse
She has been married first to Wrage and got that Name until second =
marriage with Kruse.
Her name when she died was in short:
Anna Margareta Kruse, geb. (born) H=FCttmann
long:
Anna Margareta Kruse, geb. H=FCttmann, gesch. (divorced) Wrage.
Whatever I do can be a workaround only:
- Sometimes I may forget to add the new mariage name instead of adding =
it.
- MacStammbaum (MacFamilytree now I guess) produces a Gedcom file where =
each Family has a husband. It does not have families with a man just =
being father of a so called child.
In the table I will mark things like "have birth record =
church/administration" "have marriage record 1 2 3" and so on.
Maybe I will move the marriage record overview to a second tage just =
with all families but for now I need the marriage names added anyway.
Regards,
Jutta
--
http://www.witch.westfalen.de
--Apple-Mail=_EC9B108A-5CC1-46EE-9B43-75507D1A37A5
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.28
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAlk5q9MACgkQOgZ5N97kHkckiQCgsUEm5agtkE4DQ3LbMUAiWRg6
uHQAn3WVb3RZAIjnHKlxvosDQklR9jcj
=kLgg
-----END PGP SIGNATURE-----
--Apple-Mail=_EC9B108A-5CC1-46EE-9B43-75507D1A37A5--