nigelhorne / ged2site

Create a family tree website from a Gedcom file
https://genealogy.nigelhorne.com
GNU General Public License v2.0
39 stars 4 forks source link

Linked NOTEs aren't resolved #114

Closed jhannah closed 3 months ago

jhannah commented 4 months ago

My GEDCOM reads:

0 @I4158@ INDI
1 NAME Robert Alexander Jr. /Hanna/
1 SEX M
...
1 NOTE @N518@
...
0 @N518@ NOTE
1 CONC Buried in West Fairfield Cemetery, Westmoreland, Pennsylvania.
1 REFN 1 JUN 2024 00:02:22
2 TYPE Creation Date
1 _GCID 1637A730-0EF6-40C7-B92B-C262F8AB850E
1 CHAN
2 DATE 1 JUN 2024
3 TIME 00:03:04

But static-site/Robert-Alexander-Hanna-Jr-1695-1758.html just reads

Note

N518.

Far better if it would follow the NOTE link and display the contents of the linked NOTE?

Gedcom.pm has a resolve() method for this. Here's an example of resolve():

use 5.38.0;
use Gedcom;

my $ged = Gedcom->new("/Users/jhannah/Desktop/jay_new.ged");
my $me = $ged->get_individual("I1265");
say $me->note;
say "---";
say $me->resolve($me->note)->full_value;

N493
---
Homepage: http://jays.net
There you will find more info about me than you ever wanted. :)
jhannah commented 4 months ago

Oh, you know about Gedcom.pm resolve_xref() you're already using it twice. I didn't mean to imply you didn't know, I was just trying to be helpful. I apparently just want it used more (for INDI NOTEs). Thank so much! 😄

nigelhorne commented 4 months ago

I don't think I have some sample data that's needed for this. Will the sample Gedcom snippet you've given suffice to reproduce the issue?

Or a patch would be great.

jhannah commented 3 months ago

Looks like this is fixed in master (e430b501a2b34d592be7386c58e7aa134919ec72) thanks!!

nigelhorne commented 3 months ago

Thanks for testing the fix, and for the initial bug report.