Changeset 32147 for main/trunk/model-sites-dev/pei-jones/collect/written-works/perllib/plugins/PJPlugin.pm
- Timestamp:
- 2018-02-20T09:48:21+13:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-sites-dev/pei-jones/collect/written-works/perllib/plugins/PJPlugin.pm
r31940 r32147 18 18 'inherits' => "yes", 19 19 'args' => $arguments }; 20 21 my $files_dir ="/nzdl-storage/other-projects/pei-jones/Jones_Collection/"; 22 23 sub begin { 24 my $self = shift (@_); 25 my ($pluginfo, $base_dir, $processor, $maxdocs) = @_; 26 27 # Save base_dir for use in file cache 28 $self->{'base_dir'} = $files_dir; 29 } 30 20 31 21 32 sub new { … … 82 93 $doc_obj->set_utf8_metadata_element($cursection, 'Title', $pagenum); 83 94 95 print STDERR "image file $files_dir$imgname\n"; 96 84 97 # process the image for this page if there is one 85 98 if (defined $imgname && $imgname ne "") { 86 my $result1 = $self->process_image($ dir.$imgname, $imgname, $doc_obj, $cursection, $rotate);99 my $result1 = $self->process_image($files_dir.$imgname, $imgname, $doc_obj, $cursection, $rotate); 87 100 if (!defined $result1) 88 101 { 89 print "PagedImagePlugin: couldn't process image \"$ dir$imgname\" for item \"$filename_full_path\"\n";102 print "PagedImagePlugin: couldn't process image \"$files_dir$imgname\" for item \"$filename_full_path\"\n"; 90 103 } 91 104 } 92 105 # process the text file if one is there 93 106 if (defined $txtname && $txtname ne "") { 94 my $result2 = $self->process_text ($ dir.$txtname, $txtname, $doc_obj, $cursection);107 my $result2 = $self->process_text ($files_dir.$txtname, $txtname, $doc_obj, $cursection); 95 108 96 109 if (!defined $result2) { 97 print "PagedImagePlugin: couldn't process text file \"$ dir.$txtname\" for item \"$filename_full_path\"\n";110 print "PagedImagePlugin: couldn't process text file \"$files_dir.$txtname\" for item \"$filename_full_path\"\n"; 98 111 $self->add_dummy_text($doc_obj, $cursection); 99 112 }
Note:
See TracChangeset
for help on using the changeset viewer.