Skip to content

Commit

Permalink
Added dbpedia citation
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jul 28, 2024
1 parent fc48520 commit f3e111c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -7866,6 +7866,7 @@ sub print_person
if($opts{'l'} || !$is_alive) {
# Output the citations field
if($opts{'c'} && $citationcount) {
# TODO: add cititions from dbpedia
print "Create $citationcount citations\n" if($opts{'v'});
print $html '<h2>Citations</h2><ol>';
print $xml "\n\t\t<citations>";
Expand Down Expand Up @@ -8103,7 +8104,7 @@ sub print_person
# $printed_notes = 1;
# }

# if($opts{'w'} && (my $dbpedia = dbpedia({ person => $person, birth_dt => $birth_dt, yob => $yob, yod => $yod }))) {
# if($opts{'w'} && (my $dbpedia = dbpedia({ person => $person, birth_dt => $birth_dt, yob => $yob, yod => $yod, birth_country => $birth_country }))) {
# }

if(($person->get_value('note')) &&
Expand Down Expand Up @@ -14826,6 +14827,7 @@ sub dbpedia
my $yod = $params{'yod'};
my $birth_dt = $params{'birth_dt'};
my $yob = $params{'yob'};
my $birth_country = $params{'birth_country'};

if(defined($birth_dt)) {
if(!ref($birth_dt)) {
Expand Down Expand Up @@ -14967,6 +14969,11 @@ sub dbpedia
($uri =~ /Category:Seismological_observatories/)) {
next RESULT;
}
if(defined($birth_country)) {
if($uri =~ /of_Switzerland$/) {
next RESULT if($birth_country ne 'Switzerland');
}
}
if(defined($yod)) {
if($uri =~ /Living_people$/) {
# dbpedia person is alive, ours is not
Expand Down Expand Up @@ -15021,6 +15028,10 @@ sub dbpedia
}
$Data::Dumper::Maxdepth = 0;
print STDERR Data::Dumper->new([\$result])->Dump();
if($opts{'c'}) {
$t =~ s/\.$//;
return "$t ($url).";
}
return $t;
}
}
Expand Down

0 comments on commit f3e111c

Please sign in to comment.