Changeset 87 for trunk/gsdl/perllib/plugins
- Timestamp:
- 1998-12-21T15:15:17+13:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ArcPlug.pm
r70 r87 46 46 47 47 # process each file 48 foreach $subfile ( sort alphabetically@$file_list) {48 foreach $subfile (@$file_list) { 49 49 # note: metadata is not carried on to the next level 50 50 my $tmp = &util::filename_cat ($file, $subfile->[0]); … … 55 55 # all books have been processed so need to output classifications 56 56 # to infodb - note that at present you have to import before building 57 if ( $processor->{'mode'} eq 'infodb') {57 if (defined $processor->{'mode'} && $processor->{'mode'} eq 'infodb') { 58 58 print STDERR "ArcPlug: Adding classifications to infodb\n"; 59 59 $processor->process('classifications'); … … 73 73 open (B, &util::filename_cat($base_dir, $file, $b->[0])) || 74 74 die "couldn't open " . &util::filename_cat($base_dir, $file, $b->[0]) . "\n"; 75 my ($atitle, $btitle); 75 my $atitle = "untitled"; 76 my $btitle = "untitled"; 76 77 my $line = ""; 77 while (defined ($line .= <A>)) { 78 if ($line =~ /Title=\"([^\"]*)\"/) {$atitle = $1; last;} 78 my $text = ""; 79 while (defined ($line = <A>)) { 80 $text .= $line; 81 if ($text =~ /Title=\"([^\"]*)\"/) {$atitle = $1; last;} 79 82 } 80 $line = ""; 81 while (defined ($line .= <B>)) { 82 if ($line =~ /Title=\"([^\"]*)\"/) {$btitle = $1; last;} 83 $text = ""; 84 while (defined ($line = <B>)) { 85 $text .= $line; 86 if ($text =~ /Title=\"([^\"]*)\"/) {$btitle = $1; last;} 83 87 } 84 88 close A;
Note:
See TracChangeset
for help on using the changeset viewer.