diff --git a/dcd.pl b/dcd.pl index c597770cf9fcf4714cc4926712bb9f3eaced3958..ae52e38a0354b629c5ec33f50e918728aaba218c 100755 --- a/dcd.pl +++ b/dcd.pl @@ -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://(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://(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://(chronotopos\.eu)/index\.php/(cts)/article/view/(\d+)$# || $repo_url =~ m#https://(viennalawreview\.com)/index\.php/(vlr)/article/view/(\d+)$# @@ -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://(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://(exfonte\.org)/index\.php/(exf)/article/view/(\d+)$# # Othes || $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; 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 # 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 - 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 @@ -334,9 +335,10 @@ print __LINE__, " prod_doi_string=[$prod_doi_string] pfx=[$pfx] ns=[$ns] nr=[$nr if ($register_live) { 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; } print "DOI registered: ", get_ts(), "\n";