Changeset 9570
- Timestamp:
- 2005-04-07T11:54:37+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/importfrom.pl
r9543 r9570 32 32 # Currently only designed for OAI exporting 33 33 34 35 34 BEGIN { 36 35 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'}; … … 44 43 use FileHandle; 45 44 45 my $wgetopt = ""; 46 46 47 47 sub print_usage { … … 82 82 print $out "Requesting list of identifiers ...\n"; 83 83 84 open (OAIIN,"wget -q -O - \"$base_url?verb=ListIdentifiers&metadataPrefix=oai_dc\" |")84 open (OAIIN,"wget $wgetopt -q -O - \"$base_url?verb=ListIdentifiers&metadataPrefix=oai_dc\" |") 85 85 || die "wget request failed: $!\n"; 86 86 … … 144 144 my $full_id_fname = &util::filename_cat($srcdocs_dir,$id_fname); 145 145 146 my $wget_cmd = "wget -q -O $full_id_fname \"$doc_url\"";146 my $wget_cmd = "wget $wgetopt -q -O $full_id_fname \"$doc_url\""; 147 147 148 148 (system($wget_cmd)==0) … … 165 165 print $out "Downloading metadata record for $i\n"; 166 166 167 my $file_i_url = "$output_dir/$i.oai"; 168 $file_i_url =~ s/:/\//g; 167 my $i_url = $i; #convert OAI set separators (:) to directory sep 168 $i_url =~ s/:/\//g; 169 my $file_i_url = "$output_dir/$i_url.oai"; 169 170 170 171 my $ds = &util::get_dirsep(); 171 my $file_i = &util::filename_cat($output_dir,"$i.oai"); 172 $file_i =~ s/:/$ds/g; 172 my $i_os = $i; #convert OAI set separators (:) to OS dir sep 173 $i_os =~ s/:/$ds/g; 174 my $file_i = &util::filename_cat($output_dir,"$i_os.oai"); 173 175 174 176 # obtain record 175 my $wget_cmd = "wget -q -O - \"$url\"";177 my $wget_cmd = "wget $wgetopt -q -O - \"$url\""; 176 178 177 179 open (OAIIN,"$wget_cmd|") … … 189 191 # prepare subdirectory for record (if needed) 190 192 my ($i_dir,$unused) = dir_file_split($file_i_url); 193 191 194 &util::mk_all_dir($i_dir); 192 195
Note:
See TracChangeset
for help on using the changeset viewer.