|
@@ -20,16 +20,16 @@ |
|
|
|
|
|
$wil = new WikidataItemList ; |
|
|
|
|
|
$sparql = "SELECT ?q { wd:$work_qid wdt:P50 ?q }" ; |
|
|
$items_authors = getSPARQLitems ( $sparql ) ; |
|
|
$article_entry = generate_article_entries( [$work_qid] ) [ $work_qid ]; |
|
|
|
|
|
// Load items |
|
|
$to_load = array() ; |
|
|
$to_load[] = $work_qid ; |
|
|
|
|
|
foreach ( $items_authors AS $auth ) { |
|
|
$to_load[] = $auth ; |
|
|
} |
|
|
foreach ( $article_entry->authors AS $auth) $to_load[] = $auth ; |
|
|
foreach ( $article_entry->published_in AS $pub ) $to_load[] = $pub ; |
|
|
foreach ( $article_entry->topics AS $topic ) $to_load[] = $topic ; |
|
|
|
|
|
$to_load = array_unique( $to_load ); |
|
|
$wil->loadItems ( $to_load ) ; |
|
|
|
|
@@ -40,22 +40,41 @@ |
|
|
exit ( 0 ) ; |
|
|
} |
|
|
|
|
|
$article_entry = generate_article_entries( [$work_qid] ) [ $work_qid ]; |
|
|
|
|
|
print "<h2>" . $work_item->getLabel() . "</h2>" ; |
|
|
print "<div>" ; |
|
|
print wikidata_link($work_qid, "Wikidata Item", '') ; |
|
|
print ' | ' ; |
|
|
print "<a target='_blank' href='https://tools.wmflabs.org/scholia/work/$work_qid'>Scholia Work Page</a>" ; |
|
|
print ' | ' ; |
|
|
print "<a target='_blank' href='https://tools.wmflabs.org/reasonator/?q=$work_qid'>Reasonator</a>" ; |
|
|
print '</div>' ; |
|
|
print '</div><div>' ; |
|
|
print "Published: " . $article_entry->formattedPublicationDate () . "; " ; |
|
|
if ( $article_entry->doi != '' ) { |
|
|
print "DOI: <a target='_blank' href='https://doi.org/$article_entry->doi'>$article_entry->doi</a><br/>" ; |
|
|
print "DOI: <a target='_blank' href='https://doi.org/$article_entry->doi'>$article_entry->doi</a>; " ; |
|
|
} |
|
|
if ($article_entry->pmid != '' ) { |
|
|
print "PubMed: <a target='_blank' href='https://www.ncbi.nlm.nih.gov/pubmed/?term=$article_entry->pmid'>$article_entry->pmid</a>" ; |
|
|
} |
|
|
print '</div><div>' ; |
|
|
|
|
|
$published_in = array() ; |
|
|
foreach ( $article_entry->published_in AS $qt ) { |
|
|
$i2 = $wil->getItem ( $qt ) ; |
|
|
if ( isset($i2) ) $published_in[] = wikidata_link($i2->getQ(), $i2->getLabel(), 'black') . " [<a href='https://tools.wmflabs.org/scholia/venue/" . $i2->getQ() . "/missing' target='_blank'>missing</a>]" ; |
|
|
} |
|
|
$published_in_list = implode ( ', ', $published_in ) ; |
|
|
print "Journal(s): $published_in_list" ; |
|
|
if ( count($article_entry->topics) > 0 ) { |
|
|
print "Main subject(s): "; |
|
|
$topics = [] ; |
|
|
foreach ( $article_entry->topics AS $qt ) { |
|
|
$i2 = $wil->getItem($qt) ; |
|
|
if ( !isset($i2) ) continue ; |
|
|
$topics[] = wikidata_link($i2->getQ(), $i2->getLabel(), 'brown') . " [<a href='https://tools.wmflabs.org/scholia/topic/" . $i2->getQ() . "/missing' target='_blank'>missing</a>]" ; |
|
|
} |
|
|
print implode ( '; ' , $topics ) ; |
|
|
} |
|
|
print "</div>" ; |
|
|
|
|
|
// Author list |
|
|
$name_counter = array() ; |
|
|
0 comments on commit
a68b058