Changeset 2484
- Timestamp:
- 2001-05-29T23:52:32+12:00 (23 years ago)
- Location:
- trunk/gsdl/perllib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/doc.pm
r2327 r2484 358 358 } 359 359 } 360 361 360 $self->set_metadata_element ($self->get_top_section(), "Identifier", $OID); 362 361 } -
trunk/gsdl/perllib/plugins/BibTexPlug.pm
r1711 r2484 57 57 } 58 58 59 60 59 # The process function reads a single bibliographic record and stores 61 60 # it as a new document. … … 65 64 my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj) = @_; 66 65 my $outhandle = $self->{'outhandle'}; 66 67 $self->{'key'} = "default"; 67 68 68 69 # Check that we're dealing with a valid BibTex record … … 125 126 $text .= "$line\n"; 126 127 128 127 129 # The first line is special, it contains the reference type and OID 128 if ($line =~ /\@(\w+)\ {([\w\d]*),/) {130 if ($line =~ /\@(\w+)\W*\{\W*([\*\.\w\d:-]+)\W*$/) { 129 131 $EntryType = $1; 130 132 $EntryID = $2; 131 print "** $EntryType - $EntryID \n"; 133 print "** $EntryType - \"$EntryID\" \n" 134 if ($verbosity >= 4); 135 $self->{'key'} = $EntryID; 132 136 next; 137 } 138 if ($line =~ /\@/) { 139 print "bibtexplug: suspect line in bibtex file: $line\n" 140 if ($verbosity >= 2); 141 print "bibtexplug: if that's the start of a new bibtex record ammend regexp in bibtexplug::process()\n" 142 if ($verbosity >= 2); 133 143 } 134 144 … … 227 237 } 228 238 229 1;230 231 239 232 240 # Convert a text string into HTML. … … 269 277 } 270 278 271 279 sub set_OID { 280 my $self = shift (@_); 281 my ($doc_obj, $id, $segment_number) = @_; 282 283 if ( $self->{'key'} eq "default") { 284 $doc_obj->set_OID(); 285 } else { 286 $doc_obj->set_OID($self->{'key'}); 287 } 288 } 289 290 1; -
trunk/gsdl/perllib/plugins/SplitPlug.pm
r2327 r2484 193 193 194 194 # add an OID 195 $doc_obj->set_OID($id . "s" . $segment); 195 $self->set_OID($doc_obj, $id, $segment); 196 196 197 197 198 # process the document … … 203 204 } 204 205 206 sub set_OID { 207 my $self = shift (@_); 208 my ($doc_obj, $id, $segment_number) = @_; 209 210 $doc_obj->set_OID($id . "s" . $segment); 211 212 } 205 213 206 214 1;
Note:
See TracChangeset
for help on using the changeset viewer.