From 1f72e809a4aea77750f387c78027aeb2e5597f98 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Thu, 19 Dec 2024 14:51:18 -0500 Subject: [PATCH] Move dbpedia to be with the notes --- gedcom | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/gedcom b/gedcom index 9f60cba..579154b 100755 --- a/gedcom +++ b/gedcom @@ -7469,6 +7469,17 @@ sub print_person } $notes =~ s/\.$//; $phrase = Data::Text->new($notes); + if($opts{'w'} && (my $dbpedia = dbpedia({ person => $person, birth_dt => $birth_dt, yob => $yob, yod => $yod, birth_country => $birth_country }))) { + if("$notes." !~ /\Q$dbpedia\E/) { # FIXME: improve this test + # FIXME: add citation + if($opts{'B'}) { + pdfprint(string => "\t$dbpedia\n\t", text => $text, pdfpage => $pdfpage); + } else { + $dbpedia =~ s/\.$//; + $phrase->append(" $dbpedia"); + } + } + } } if($opts{'C'}) { @@ -7872,14 +7883,6 @@ sub print_person } else { print $bio->rtrim()->as_string(); } - if($opts{'w'} && (my $dbpedia = dbpedia({ person => $person, birth_dt => $birth_dt, yob => $yob, yod => $yod, birth_country => $birth_country }))) { - # FIXME: add citation - if($opts{'B'}) { - pdfprint(string => "\t$dbpedia\n\t", text => $text, pdfpage => $pdfpage); - } else { - print "\n\t$dbpedia"; - } - } print "\n", '-' x 80, "\n"; } } else { @@ -13743,6 +13746,7 @@ sub dbpedia ($class->{'Label'}->{'text'} eq 'Event') || ($class->{'Label'}->{'text'} eq 'Holiday') || ($class->{'Label'}->{'text'} eq 'Plant') || + ($class->{'Label'}->{'text'} eq 'Organisation') || ($class->{'Label'}->{'text'} eq 'Artwork')) { next RESULT; } @@ -13842,6 +13846,7 @@ sub dbpedia ($uri =~ /Category:Events_in_/) || ($uri =~ /Category:.+Parades$/) || ($uri =~ /Category:Geology_of_/) || + ($uri =~ /Category:Hematology/) || ($uri =~ /Category:Seismological_observatories/)) { next RESULT; }