Changeset 5919
- Timestamp:
- 2003-11-20T13:48:25+13:00 (20 years ago)
- Location:
- trunk/gsdl/perllib/plugins
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/BasPlug.pm
r5681 r5919 364 364 my $plugin_name = shift (@_); 365 365 my $self = {}; 366 366 $self->{'plugin_type'} = "Bas"; 367 367 my $enc = "^("; 368 368 map {$enc .= "$_|";} keys %$encodings::encodings; … … 518 518 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Language", $language); 519 519 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Encoding", $encoding); 520 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 520 521 my ($filemeta) = $file =~ /([^\\\/]+)$/; 521 522 # how do we know what encoding the filename is in? -
trunk/gsdl/perllib/plugins/BibTexPlug.pm
r5680 r5919 75 75 my $class = shift (@_); 76 76 my $self = new SplitPlug ($class, @_); 77 $self->{'plugin_type'} = "BibTex"; 77 78 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 78 79 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/BookPlug.pm
r5680 r5919 80 80 my ($class) = @_; 81 81 my $self = new BasPlug ("BookPlug", @_); 82 82 $self->{'plugin_type'} = "Book"; 83 83 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 84 84 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/ConvertToPlug.pm
r5680 r5919 326 326 $self->associate_cover_image($doc_obj, $filename); 327 327 } 328 328 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 329 329 # include any metadata passed in from previous plugins 330 330 # note that this metadata is associated with the top level section … … 381 381 $doc_obj->add_utf8_metadata ($cursection, "srcicon", "_icon".$doc_ext."_"); 382 382 $doc_obj->add_utf8_metadata ($cursection, "/srclink", "</a>"); 383 383 384 return $ret_val; 384 385 } -
trunk/gsdl/perllib/plugins/ConvertToRogPlug.pm
r5680 r5919 85 85 $self->{'convert_to'} = "Rog"; 86 86 $self->{'convert_to_ext'} = "rog"; 87 87 $self->{'plugin_type'} = "ConvertToRog"; 88 88 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 89 89 my $option_list = $self->{'option_list'}; … … 388 388 $self->associate_cover_image($doc_obj, $filename); 389 389 } 390 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 390 391 391 392 -
trunk/gsdl/perllib/plugins/DBPlug.pm
r5680 r5919 59 59 my ($class) = @_; 60 60 my $self = new BasPlug ($class, @_); 61 61 $self->{'plugin_type'} = "DB"; 62 62 my $option_list = $self->{'option_list'}; 63 63 push( @{$option_list}, $options ); … … 203 203 $self->associate_cover_image($doc_obj, $filename); 204 204 } 205 205 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 206 206 207 207 208 # include any metadata passed in from previous plugins -
trunk/gsdl/perllib/plugins/EMAILPlug.pm
r5680 r5919 115 115 my ($class) = @_; 116 116 my $self = new BasPlug ($class, @_); 117 117 $self->{'plugin_type'} = "EMAIL"; 118 118 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 119 119 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/ExcelPlug.pm
r5680 r5919 42 42 43 43 my $self = new ConvertToPlug ($class, @_); 44 44 $self->{'plugin_type'} = "Excel"; 45 45 # I'm not sure what encoding xlhtml produces - I think it puts it 46 46 # into the Content-Type meta tag in the header of the HTML file. -
trunk/gsdl/perllib/plugins/FOXPlug.pm
r5680 r5919 52 52 my ($class) = @_; 53 53 $self = new BasPlug (); 54 54 $self->{'plugin_type'} = "FOX"; 55 55 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 56 56 my $option_list = $self->{'option_list'}; … … 240 240 my $doc_obj = new doc ($file, "indexed_doc"); 241 241 $doc_obj->set_OIDtype ($processor->{'OIDtype'}); 242 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 243 242 244 my $section = $doc_obj->get_top_section(); 243 245 -
trunk/gsdl/perllib/plugins/HBPlug.pm
r5680 r5919 60 60 my ($class) = @_; 61 61 my $self = new BasPlug ("HBPlug", @_); 62 62 $self->{'plugin_type'} = "HB"; 63 63 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 64 64 my $option_list = $self->{'option_list'}; … … 253 253 my $bookcover = &util::filename_cat($base_dir, $file, "$jobnumber.jpg"); 254 254 $doc_obj->associate_file($bookcover, "cover.jpg", "image/jpeg"); 255 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 255 256 256 257 my $cursection = $doc_obj->get_top_section(); -
trunk/gsdl/perllib/plugins/HTMLPlug.pm
r5680 r5919 140 140 my $class = shift (@_); 141 141 my $self = new BasPlug ($class, @_); 142 142 $self->{'plugin_type'} = "HTML"; 143 143 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 144 144 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/ImagePlug.pm
r5845 r5919 109 109 my $plugin_name = shift (@_); 110 110 my $self = new BasPlug ("ImagePlug", @_); 111 111 $self->{'plugin_type'} = "Image"; 112 112 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 113 113 my $option_list = $self->{'option_list'}; … … 382 382 my $doc_obj = new doc ($filename, "indexed_doc"); 383 383 $doc_obj->set_OIDtype ($processor->{'OIDtype'}); 384 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 384 385 385 386 #run convert to get the thumbnail and extract size and type info -
trunk/gsdl/perllib/plugins/IndexPlug.pm
r5680 r5919 71 71 my ($class) = @_; 72 72 my $self = new BasPlug ("IndexPlug", @_); 73 74 73 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 75 74 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/MARCPlug.pm
r5878 r5919 65 65 my $class = shift (@_); 66 66 my $self = new SplitPlug ($class, @_); 67 67 $self->{'plugin_type'} = "MARC"; 68 68 my $metadata_mapping; 69 69 -
trunk/gsdl/perllib/plugins/OAIPlug.pm
r5680 r5919 48 48 my $class = shift (@_); 49 49 my $self = new BasPlug ($class, @_); 50 50 $self->{'plugin_type'} = "OAI"; 51 51 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 52 52 my $option_list = $self->{'option_list'}; … … 135 135 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Language", $language); 136 136 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Encoding", $encoding); 137 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 137 138 138 139 # include any metadata passed in from previous plugins 139 140 # note that this metadata is associated with the top level section 140 141 $self->extra_metadata ($doc_obj, $doc_obj->get_top_section(), $metadata); 142 141 143 142 144 # do plugin specific processing of doc_obj -
trunk/gsdl/perllib/plugins/PDFPlug.pm
r5680 r5919 95 95 96 96 my $self = new ConvertToPlug ($class, @args, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?'); 97 97 $self->{'plugin_type'} = "PDF"; 98 98 if ($use_sections) { 99 99 $self->{'use_sections'}=1; -
trunk/gsdl/perllib/plugins/PPTPlug.pm
r5680 r5919 42 42 43 43 my $self = new ConvertToPlug ($class, @_); 44 44 $self->{'plugin_type'} = "PPT"; 45 45 # ppthtml outputs utf-8 already. 46 46 if ($self->{'input_encoding'} eq "auto") { -
trunk/gsdl/perllib/plugins/PSPlug.pm
r5680 r5919 66 66 67 67 my $self = new ConvertToPlug ($class, "-convert_to", "text", @_ , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?'); 68 68 $self->{'plugin_type'} = "PS"; 69 69 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 70 70 my $option_list = $self->{'option_list'}; … … 184 184 185 185 &extract_metadata_from_postscript($self,"$path/$file", $doc); 186 186 #$doc->add_utf8_metadata($doc->get_top_section(), "PSPlug", 1); 187 187 return ConvertToPlug::process_type($self,"ps",@_); 188 188 } -
trunk/gsdl/perllib/plugins/RTFPlug.pm
r5680 r5919 50 50 my $class = shift (@_); 51 51 my $self = new ConvertToPlug ($class, @_); 52 52 $self->{'plugin_type'}="RTF"; 53 53 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 54 54 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/ReferPlug.pm
r5680 r5919 97 97 my $class = shift (@_); 98 98 my $self = new SplitPlug ($class, @_); 99 99 $self->{'plugin_type'} = "Refer"; 100 100 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 101 101 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/RogPlug.pm
r5680 r5919 43 43 my ($class) = @_; 44 44 $self = new BasPlug (); 45 45 $self->{'plugin_type'} = "Rog"; 46 46 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 47 47 my $option_list = $self->{'option_list'}; … … 167 167 my $doc_obj = new doc ($file, "indexed_doc"); 168 168 my $cursection = $doc_obj->get_top_section(); 169 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 169 170 170 171 my $title = $song->{'title'}; -
trunk/gsdl/perllib/plugins/SRCPlug.pm
r5680 r5919 82 82 my ($class) = @_; 83 83 my $self = new BasPlug ($class, @_); 84 84 $self->{'plugin_type'} = "SRC"; 85 85 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 86 86 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/SplitPlug.pm
r5680 r5919 66 66 $self = new BasPlug($class, @_); 67 67 68 68 $self->{'plugin_type'} = "Split"; 69 69 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 70 70 my $option_list = $self->{'option_list'}; … … 179 179 $self->associate_cover_image($doc_obj, $filename); 180 180 } 181 181 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 182 182 # Calculate a "base" document ID. 183 183 if (!defined $id) { -
trunk/gsdl/perllib/plugins/TEXTPlug.pm
r5680 r5919 69 69 my ($class) = @_; 70 70 my $self = new BasPlug ($class, @_); 71 71 $self->{'plugin_type'} = "TEXT"; 72 72 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 73 73 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/UnknownPlug.pm
r5765 r5919 94 94 my ($class) = @_; 95 95 my $self = new BasPlug ($class, @_); 96 96 $self->{'plugin_type'} = "Unknown"; 97 97 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 98 98 my $option_list = $self->{'option_list'}; … … 184 184 my $doc_obj = new doc ($filename, "indexed_doc"); 185 185 $doc_obj->set_OIDtype ($processor->{'OIDtype'}); 186 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 186 187 187 188 # associate the file with the document -
trunk/gsdl/perllib/plugins/W3ImgPlug.pm
r5680 r5919 275 275 my $class = shift (@_); 276 276 my $self = new HTMLPlug ($class, @_); 277 277 $self->{'plugin_type'} = "W3Img"; 278 278 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 279 279 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/WordPlug.pm
r5680 r5919 48 48 sub new { 49 49 my $class = shift (@_); 50 50 51 51 my $self = new ConvertToPlug ($class, @_); 52 52 $self->{'plugin_type'} = "Word"; 53 53 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 54 54 my $option_list = $self->{'option_list'}; -
trunk/gsdl/perllib/plugins/XMLPlug.pm
r5680 r5919 55 55 # $self is global for use within subroutines called by XML::Parser 56 56 $self = new BasPlug ($class, @_); 57 57 $self->{'plugin_type'} = "XML"; 58 58 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 59 59 my $option_list = $self->{'option_list'}; … … 239 239 $self->{'doc_obj'}->set_OID(); 240 240 241 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "$self->{'plugin_type'}", "1"); 242 241 243 # process the document 242 244 $self->{'processor'}->process($self->{'doc_obj'});
Note:
See TracChangeset
for help on using the changeset viewer.