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

new OJS jeacs nees special care; see #24292

parent 69a99b87
Branches
No related tags found
No related merge requests found
...@@ -159,7 +159,7 @@ sub register_url ...@@ -159,7 +159,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/(yis|kf|mp|oezg|rhy|wdr|aaj|lili)/article/view/(\d+)$# || $repo_url =~ m#https://(journals\.univie\.ac\.at)/index\.php/(aaj|jeacs|kf|lili|mp|oezg|rhy|wdr|yis)/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+)$#
...@@ -174,11 +174,16 @@ sub register_url ...@@ -174,11 +174,16 @@ sub register_url
my $pid; my $pid;
while (@parts) { $pid= pop (@parts); last if (defined($pid)) }; while (@parts) { $pid= pop (@parts); last if (defined($pid)) };
my $journal= (@parts == 1) ? $parts[0] : undef; # ugly hack!
print __LINE__, " repo=[$repo] pid=[$pid] parts=[",join('|',@parts),"]\n"; print __LINE__, " repo=[$repo] pid=[$pid] parts=[",join('|',@parts),"]\n";
usage ("unknown repo=[$repo]") unless (exists ($cnf->{repositories}->{$repo})); usage ("unknown repo=[$repo]") unless (exists ($cnf->{repositories}->{$repo}));
print __LINE__, " repo=[$repo]\n"; print __LINE__, " repo=[$repo]\n";
# TODO: factor the code below out!
# call do_register($cnf->{repositories}->{$repo}, $journal, ...);
my $repo_cnf= $cnf->{repositories}->{$repo}; my $repo_cnf= $cnf->{repositories}->{$repo};
my $t_reg_cnf= $cnf->{doi_registries}->{$repo_cnf->{t_registry}}; my $t_reg_cnf= $cnf->{doi_registries}->{$repo_cnf->{t_registry}};
...@@ -195,10 +200,12 @@ sub register_url ...@@ -195,10 +200,12 @@ sub register_url
return undef; return undef;
} }
my ($pfx, $ns, $nr)= split_doi_string ($prod_doi_string, $repo_cnf->{id_separator}); my $sep= $repo_cnf->{id_separator};
$sep= '.' if ($journal eq 'jeacs');
my ($pfx, $ns, $nr)= split_doi_string ($prod_doi_string, $sep);
# print __LINE__, " prod_doi_string=[$prod_doi_string] pfx=[$pfx] ns=[$ns] nr=[$nr]\n"; # print __LINE__, " prod_doi_string=[$prod_doi_string] pfx=[$pfx] ns=[$ns] nr=[$nr]\n";
my $dc_xml= join ('/', $na_path, 'metadata', $ns, join ($repo_cnf->{id_separator}, $ns, $nr) .'.xml'); my $dc_xml= join ('/', $na_path, 'metadata', $ns, join ($sep, $ns, $nr) .'.xml');
print __LINE__, " prod_doi_string=[$prod_doi_string] pfx=[$pfx] ns=[$ns] nr=[$nr] dc_xml=[$dc_xml]\n"; print __LINE__, " prod_doi_string=[$prod_doi_string] pfx=[$pfx] ns=[$ns] nr=[$nr] dc_xml=[$dc_xml]\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment