Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First attempt at adding support for zbMATH Author ID #193

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
4 changes: 3 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
print "<input type='hidden' name='openpage' value='1' />" ;
$orcid_author = trim ( get_request ( 'orcid_author' , '' ) ) ;
$viaf_author = trim ( get_request ( 'viaf_author' , '' ) ) ;
$zbmath_author = trim ( get_request ( 'zbmath_author' , '' ) ) ;
$researchgate_author = trim ( get_request ( 'researchgate_author' , '' ) ) ;
$author_match = trim ( get_request ( 'author_match' , '' ) ) ;
$author_q = $author_match ;
Expand All @@ -78,7 +79,7 @@

if ( $author_match == 'new' ) {
print "</div></div><div>Quickstatements V1 commands for creating new author item:" ;
$commands = new_author_qs_commands ( $name, $orcid_author, $viaf_author, $researchgate_author ) ;
$commands = new_author_qs_commands ( $name, $orcid_author, $viaf_author, $researchgate_author, $zbmath_author ) ;
print "<textarea name='data' rows=5>" . implode("\n",$commands) . "</textarea>" ;
print "<input type='submit' class='btn btn-primary' name='qs' value='Send to Quickstatements' /><br/>" ;
print "Run these and then use the resulting author item ID (Qxx) in further work." ;
Expand Down Expand Up @@ -383,6 +384,7 @@
print "<div><a href='" . getORCIDurl($name) . "' target='_blank'>Check ORCID for $name</a> | Author has ORCID ID: <input type='text' name='orcid_author' placeholder='xxxx-xxxx-xxxx-xxxx' /></div>" ;
print "<div><a href='https://viaf.org/viaf/search?query=local.personalNames%20all%20%22$name' target='_blank'>Check VIAF for $name</a> | Author has VIAF ID: <input type='text' name='viaf_author' placeholder='xxxxxxxxxxxxxxxxxxxx' /></div>" ;
print "<div><a href='https://www.researchgate.net/search/researcher?q=$name' target='_blank'>Check ResearchGate for $name</a> | Author has ResearchGate Profile ID: <input type='text' name='researchgate_author' placeholder='Xxxxxxx_Xxxxxx' /></div>" ;
print "<div><a href='https://zbmath.org/authors/?q=ai%3A$name' target='_blank'>Check zbMATH for $name</a> | Author has zbMATH Author ID: <input type='text' name='zbmath_author' placeholder='xxxxxxxxx.xxxxx-xxxxxx' /></div>" ;
print "<div style='margin:20px'><input type='submit' name='doit' value='Quickstatements to create author item' class='btn btn-primary' /></div>" ;
print "</form>" ;
print '<div>After creating the new author item, enter the Wikidata ID in the "Other Q number of this author" field above to link to their works.</div>' ;
Expand Down
3 changes: 2 additions & 1 deletion lib/qs_commands.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?PHP

// Quickstatements V1 commands for creating new author item:
function new_author_qs_commands ( $name, $orcid_author, $viaf_author, $researchgate_author ) {
function new_author_qs_commands ( $name, $orcid_author, $viaf_author, $researchgate_author, $zbmath_author ) {
global $human_qid;
global $instance_prop_id;
global $occupation_prop_id;
Expand All @@ -14,6 +14,7 @@ function new_author_qs_commands ( $name, $orcid_author, $viaf_author, $researchg
if ( $orcid_author != '' ) $commands[] = "LAST\tP496\t\"$orcid_author\"" ;
if ( $viaf_author != '' ) $commands[] = "LAST\tP214\t\"$viaf_author\"" ;
if ( $researchgate_author != '' ) $commands[] = "LAST\tP2038\t\"$researchgate_author\"" ;
if ( $zbmath_author != '' ) $commands[] = "LAST\tP1556\t\"$zbmath_author\"" ;
return $commands ;
}

Expand Down
3 changes: 2 additions & 1 deletion lib/wikibase_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
$doi_prop_id = 'P356';
$pubmed_prop_id = 'P698';
$occupation_prop_id = 'P106';
$identifier_prop_ids = ['P496','P213','P1053','P214','P2038'];
$identifier_prop_ids = ['P496','P213','P1053','P214','P1556','P2038'];
$identifier_details = [
'P213' => ['label' => 'ISNI', 'url_prefix' => 'http://isni.org/'],
'P214' => ['label' => 'VIAF ID', 'url_prefix' => 'https://viaf.org/viaf/'],
'P496' => ['label' => 'ORCID', 'url_prefix' => 'https://orcid.org/'],
'P1053' => ['label' => 'Researcher ID', 'url_prefix' => 'https://www.researcherid.com/rid/'],
'P1556' => ['label' => 'zbMATH Author ID', 'url_prefix' => 'https://zbmath.org/authors/'],
'P2038' => ['label' => 'ResearchGate Profile', 'url_prefix' => 'https://www.researchgate.net/profile/']
];
$affiliation_prop_ids = ['P108','P1416','P69'];
Expand Down
4 changes: 3 additions & 1 deletion names_oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
$orcid_author = trim ( get_request ( 'orcid_author' , '' ) ) ;
$viaf_author = trim ( get_request ( 'viaf_author' , '' ) ) ;
$researchgate_author = trim ( get_request ( 'researchgate_author' , '' ) ) ;
$zbmath_author = trim ( get_request ( '$zbmath_author' , '' ) ) ;
print "</div></div><div>Quickstatements V1 commands for creating new author item:" ;
$commands = new_author_qs_commands ( $name, $orcid_author, $viaf_author, $researchgate_author ) ;
$commands = new_author_qs_commands ( $name, $orcid_author, $viaf_author, $researchgate_author, $$zbmath_author ) ;
print "<textarea name='data' rows=5>" . implode("\n",$commands) . "</textarea>" ;
print "<input type='submit' class='btn btn-primary' name='qs' value='Send to Quickstatements' /><br/>" ;
print "Run these and then use the resulting author item ID (Qxx) in further work." ;
Expand Down Expand Up @@ -457,6 +458,7 @@
print "<div><a href='" . getORCIDurl($name) . "' target='_blank'>Check ORCID for $name</a> | Author has ORCID ID: <input type='text' name='orcid_author' placeholder='xxxx-xxxx-xxxx-xxxx' /></div>" ;
print "<div><a href='https://viaf.org/viaf/search?query=local.personalNames%20all%20%22$name' target='_blank'>Check VIAF for $name</a> | Author has VIAF ID: <input type='text' name='viaf_author' placeholder='xxxxxxxxxxxxxxxxxxxx' /></div>" ;
print "<div><a href='https://www.researchgate.net/search/researcher?q=$name' target='_blank'>Check ResearchGate for $name</a> | Author has ResearchGate Profile ID: <input type='text' name='researchgate_author' placeholder='Xxxxxxx_Xxxxxx' /></div>" ;
print "<div><a href='https://zbmath.org/authors/?q=ai%3A$name' target='_blank'>Check zbMATH for $name</a> | Author has zbMATH Author ID: <input type='text' name='zbmath_author' placeholder='xxxxxxxxx.xxxxx-xxxxxx' /></div>" ;
print "<div style='margin:20px'><input type='submit' name='doit' value='Quickstatements to create author item' class='btn btn-primary' /></div>" ;
print "</form>" ;
print '<div>After creating the new author item, enter the Wikidata ID in the "Other Q number of this author" field above to link to their works.</div>' ;
Expand Down
4 changes: 3 additions & 1 deletion precise_cluster.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
$orcid_author = trim ( get_request ( 'orcid_author' , '' ) ) ;
$viaf_author = trim ( get_request ( 'viaf_author' , '' ) ) ;
$researchgate_author = trim ( get_request ( 'researchgate_author' , '' ) ) ;
$zbmath_author = trim ( get_request ( 'zbmath_author' , '' ) ) ;
$author_match = trim ( get_request ( 'author_match' , '' ) ) ;
$author_q = $author_match ;
if ( $author_match == 'manual' ) {
Expand All @@ -80,7 +81,7 @@

if ( $author_match == 'new' ) {
print "<br/>Quickstatements V1 commands for creating new author item:" ;
$commands = new_author_qs_commands ( $name, $orcid_author, $viaf_author, $researchgate_author ) ;
$commands = new_author_qs_commands ( $name, $orcid_author, $viaf_author, $researchgate_author, $zbmath_author ) ;
print "<textarea name='data' rows=5>" . implode("\n",$commands) . "</textarea>" ;
print "<input type='submit' class='btn btn-primary' name='qs' value='Send to Quickstatements' /><br/>" ;
print "Run these and then use the resulting author item ID (Qxx) in further work." ;
Expand Down Expand Up @@ -384,6 +385,7 @@
print "<div><a href='" . getORCIDurl($name) . "' target='_blank'>Check ORCID for $name</a> | Author has ORCID ID: <input type='text' name='orcid_author' placeholder='xxxx-xxxx-xxxx-xxxx' /></div>" ;
print "<div><a href='https://viaf.org/viaf/search?query=local.personalNames%20all%20%22$name' target='_blank'>Check VIAF for $name</a> | Author has VIAF ID: <input type='text' name='viaf_author' placeholder='xxxxxxxxxxxxxxxxxxxx' /></div>" ;
print "<div><a href='https://www.researchgate.net/search/researcher?q=$name' target='_blank'>Check ResearchGate for $name</a> | Author has ResearchGate Profile ID: <input type='text' name='researchgate_author' placeholder='Xxxxxxx_Xxxxxx' /></div>" ;
print "<div><a href='https://zbmath.org/authors/?q=ai%3A$name' target='_blank'>Check zbMATH for $name</a> | Author has zbMATH Author ID: <input type='text' name='zbmath_author' placeholder='xxxxxxxxx.xxxxx-xxxxxx' /></div>" ;
print "<div style='margin:20px'><input type='submit' name='doit' value='Quickstatements to create author item' class='btn btn-primary' /></div>" ;
print "</form>" ;
print '<div>After creating the new author item, enter the Wikidata ID in the "Other Q number of this author" field above to link to their works.</div>' ;
Expand Down