Skip to content

Commit

Permalink
Move dbpedia to be with the notes
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Dec 19, 2024
1 parent 93ea261 commit 1f72e80
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -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'}) {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1f72e80

Please sign in to comment.