Skip to content
Snippets Groups Projects
Commit c5b2557e authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

added OJS mpzd, see #30012

parent 855d140b
Branches
No related tags found
No related merge requests found
...@@ -168,7 +168,7 @@ sub register_url ...@@ -168,7 +168,7 @@ sub register_url
|| $repo_url =~ m#https://(ojs3test\.univie\.ac\.at)/index\.php/wks/article/view/(\d+)$# || $repo_url =~ m#https://(ojs3test\.univie\.ac\.at)/index\.php/wks/article/view/(\d+)$#
|| $repo_url =~ m#https://(wbagon\.univie\.ac\.at)/index\.php/(wbagon)/article/view/(\d+)$# || $repo_url =~ m#https://(wbagon\.univie\.ac\.at)/index\.php/(wbagon)/article/view/(\d+)$#
|| $repo_url =~ m#https://(rezenstfm\.univie\.ac\.at)/index\.php/(tfm)/article/view/(\d+)$# || $repo_url =~ m#https://(rezenstfm\.univie\.ac\.at)/index\.php/(tfm)/article/view/(\d+)$#
|| $repo_url =~ m#https://(journals\.univie\.ac\.at)/index\.php/(aaj|integ|jeacs|kf|lili|mp|oezg|rhy|wdr|yis)/article/view/(\d+)$# || $repo_url =~ m#https://(journals\.univie\.ac\.at)/index\.php/(aaj|integ|jeacs|kf|lili|mp|mpzd|oezg|rhy|wdr|yis)/(issue|article)/view/(\d+)$#
|| $repo_url =~ m#https://(yis\.univie\.ac\.at)/index\.php/(yis)/article/view/(\d+)$# || $repo_url =~ m#https://(yis\.univie\.ac\.at)/index\.php/(yis)/article/view/(\d+)$#
|| $repo_url =~ m#https://(chronotopos\.eu)/index\.php/(cts)/article/view/(\d+)$# || $repo_url =~ m#https://(chronotopos\.eu)/index\.php/(cts)/article/view/(\d+)$#
|| $repo_url =~ m#https://(viennalawreview\.com)/index\.php/(vlr)/article/view/(\d+)$# || $repo_url =~ m#https://(viennalawreview\.com)/index\.php/(vlr)/article/view/(\d+)$#
...@@ -176,11 +176,12 @@ sub register_url ...@@ -176,11 +176,12 @@ sub register_url
|| $repo_url =~ m#https://(tyche\.univie\.ac\.at)/index\.php/(tyche)/article/view/(\d+)$# || $repo_url =~ m#https://(tyche\.univie\.ac\.at)/index\.php/(tyche)/article/view/(\d+)$#
|| $repo_url =~ m#https://(www\.protokollezurbibel\.at)/index\.php/(pzb)/article/view/(\d+)$# || $repo_url =~ m#https://(www\.protokollezurbibel\.at)/index\.php/(pzb)/article/view/(\d+)$#
|| $repo_url =~ m#https://(www\.tde-journal\.org)/index\.php/(tde)/article/view/(\d+)$# || $repo_url =~ m#https://(www\.tde-journal\.org)/index\.php/(tde)/article/view/(\d+)$#
|| $repo_url =~ m#https://(exfonte\.org)/index\.php/(exf)/article/view/(\d+)$#
# Othes # Othes
|| $repo_url =~ m#https://(othes\.univie\.ac\.at)/(\d+)/$# || $repo_url =~ m#https://(othes\.univie\.ac\.at)/(\d+)/$#
) )
{ {
my ($repo, @parts)= ($1, $2, $3, $4, $5, $6, $7); my ($repo, @parts)= ($1, $2, $3, $4, $5, $6, $7, $8);
my $pid; my $pid;
while (@parts) { $pid= pop (@parts); last if (defined($pid)) }; while (@parts) { $pid= pop (@parts); last if (defined($pid)) };
...@@ -295,7 +296,7 @@ print __LINE__, " prod_doi_string=[$prod_doi_string] pfx=[$pfx] ns=[$ns] nr=[$nr ...@@ -295,7 +296,7 @@ print __LINE__, " prod_doi_string=[$prod_doi_string] pfx=[$pfx] ns=[$ns] nr=[$nr
# TODO: interact with the IRMA database to find out if the DOI string is really unique and register in there # TODO: interact with the IRMA database to find out if the DOI string is really unique and register in there
# TODO: interact with DataCite API to register the DOI with the metadata # TODO: interact with DataCite API to register the DOI with the metadata
my $t_reg_result= $t_reg_obj->register_doi ($doi_string, $xml_new, $repo_url); my ($t_reg_result, $t_reg_msg1, $t_reg_msg2)= $t_reg_obj->register_doi ($doi_string, $xml_new, $repo_url);
$doi_element->{value}= $prod_doi_string; # overwrite test DOI string with real DOI string $doi_element->{value}= $prod_doi_string; # overwrite test DOI string with real DOI string
...@@ -334,9 +335,10 @@ print __LINE__, " prod_doi_string=[$prod_doi_string] pfx=[$pfx] ns=[$ns] nr=[$nr ...@@ -334,9 +335,10 @@ print __LINE__, " prod_doi_string=[$prod_doi_string] pfx=[$pfx] ns=[$ns] nr=[$nr
if ($register_live) if ($register_live)
{ {
my $reg_obj= new DataCite::API (config => $reg_cnf, xmode => 'test'); my $reg_obj= new DataCite::API (config => $reg_cnf, xmode => 'test');
unless ($reg_obj->register_doi ($prod_doi_string, $prod_xml_new, $repo_url)) my ($reg_res, $reg_msg1, $reg_msg2)= $reg_obj->register_doi ($prod_doi_string, $prod_xml_new, $repo_url);
unless ($reg_res)
{ {
print "ATTN: register_doi doi=[$prod_doi_string] was not ok\n"; print "ATTN: register_doi doi=[$prod_doi_string] was not ok; reg_msg1=[$reg_msg1] reg_msg2=[$reg_msg2]\n";
return undef; return undef;
} }
print "DOI registered: ", get_ts(), "\n"; print "DOI registered: ", get_ts(), "\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment