Changeset 36481


Ignore:
Timestamp:
2022-08-25T09:13:34+12:00 (20 months ago)
Author:
kjdon
Message:

now fixed up the files to use the new names

Location:
main/trunk/greenstone2/perllib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/CSVDeprecatedPlugin.pm

    r36479 r36481  
    11###########################################################################
    22#
    3 # CSVPlugin.pm -- A plugin for files in comma-separated value format
     3# CSVDeprecatedPlugin.pm -- A plugin for files in comma-separated value format
    44#
    55# A component of the Greenstone digital library software
     
    2525###########################################################################
    2626
    27 package CSVPlugin;
     27package CSVDeprecatedPlugin;
    2828
    2929use SplitTextFile;
     
    3636use Text::CSV;
    3737
    38 # CSVPlugin is a sub-class of SplitTextFile.
     38# CSVDeprecatedPlugin is a sub-class of SplitTextFile.
    3939sub BEGIN {
    40     @CSVPlugin::ISA = ('MetadataRead', 'SplitTextFile', 'CSVFieldSeparator');
     40    @CSVDeprecatedPlugin::ISA = ('MetadataRead', 'SplitTextFile', 'CSVFieldSeparator');
    4141}
    4242
     
    5858
    5959
    60 my $options = { 'name'     => "CSVPlugin",
    61         'desc'     => "{CSVPlugin.desc}",
     60my $options = { 'name'     => "CSVDeprecatedPlugin",
     61        'desc'     => "{CSVDeprecatedPlugin.desc}",
    6262        'abstract' => "no",
    6363        'inherits' => "yes",
  • main/trunk/greenstone2/perllib/plugins/CSVPlugin.pm

    r36480 r36481  
    2525###########################################################################
    2626
    27 package NewCSVPlugin;
     27package CSVPlugin;
    2828
    2929use extrametautil;
     
    4040
    4141sub BEGIN {
    42     @NewCSVPlugin::ISA = ('MetadataRead', 'ReadTextFile', 'CSVFieldSeparator');
     42    @CSVPlugin::ISA = ('MetadataRead', 'ReadTextFile', 'CSVFieldSeparator');
    4343    binmode(STDERR, ":utf8");
    4444
     
    6161
    6262
    63 my $options = { 'name'     => "NewCSVPlugin",
     63my $options = { 'name'     => "CSVPlugin",
    6464        'desc'     => "{CSVPlugin.desc}",
    6565        'abstract' => "no",
     
    133133    return undef unless $self->can_process_this_file_for_metadata($filename_full_path);
    134134   
    135     print STDERR "\n<Processing n='$file' p='NewCSVPlugin'>\n" if ($gli);
    136     print STDERR "NewCSVPlugin: processing $file\n" if ($self->{'verbosity'}) > 1;
     135    print STDERR "\n<Processing n='$file' p='CSVPlugin'>\n" if ($gli);
     136    print STDERR "CSVPlugin: processing $file\n" if ($self->{'verbosity'}) > 1;
    137137
    138138    my $outhandle = $self->{'outhandle'};
     
    145145    my ($language, $content_encoding) = $self->textcat_get_language_encoding ($filename_full_path);
    146146    if ($self->{'verbosity'} > 2) {
    147     print $outhandle "NewCSVPlugin: reading $file as ($content_encoding,$language)\n";
     147    print $outhandle "CSVPlugin: reading $file as ($content_encoding,$language)\n";
    148148    }
    149149    # store these values for read
     
    391391    my ($outhandle, $failhandle, $gli, $file, $error) = @_;
    392392
    393     print $outhandle "NewCSVPlugin Error: $file: $error\n";
    394     print $failhandle "NewCSVPlugin Error: $file: $error\n";
     393    print $outhandle "CSVPlugin Error: $file: $error\n";
     394    print $failhandle "CSVPlugin Error: $file: $error\n";
    395395    print STDERR "<ProcessingError n='$file' r='$error'/>\n" if ($gli);
    396396}
  • main/trunk/greenstone2/perllib/plugins/MetadataCSVDeprecatedPlugin.pm

    r36479 r36481  
    11###########################################################################
    22#
    3 # MetadataCSVPlugin.pm -- A plugin for metadata in comma-separated value format
     3# MetadataCSVDeprecatedPlugin.pm -- A plugin for metadata in comma-separated value format
    44#
    55# A component of the Greenstone digital library software
     
    2525###########################################################################
    2626
    27 package MetadataCSVPlugin;
     27package MetadataCSVDeprecatedPlugin;
    2828
    2929
     
    4343# methods with identical signatures take precedence in the order given in the ISA list.
    4444sub BEGIN {
    45     @MetadataCSVPlugin::ISA = ('MetadataRead', 'BaseImporter', 'CSVFieldSeparator');
     45    @MetadataCSVDeprecatedPlugin::ISA = ('MetadataRead', 'BaseImporter', 'CSVFieldSeparator');
    4646}
    4747
     
    5858
    5959
    60 my $options = { 'name'     => "MetadataCSVPlugin",
    61         'desc'     => "{MetadataCSVPlugin.desc}",
     60my $options = { 'name'     => "MetadataCSVDeprecatedPlugin",
     61        'desc'     => "{MetadataCSVDeprecatedPlugin.desc}",
    6262        'abstract' => "no",
    6363        'inherits' => "yes",
     
    115115    return undef unless $self->can_process_this_file_for_metadata($filename_full_path);
    116116   
    117     print STDERR "\n<Processing n='$file' p='MetadataCSVPlugin'>\n" if ($gli);
    118     print STDERR "MetadataCSVPlugin: processing $file\n" if ($self->{'verbosity'}) > 1;
     117    print STDERR "\n<Processing n='$file' p='MetadataCSVDeprecatedPlugin'>\n" if ($gli);
     118    print STDERR "MetadataCSVDeprecatedPlugin: processing $file\n" if ($self->{'verbosity'}) > 1;
    119119
    120120    my $outhandle = $self->{'outhandle'};
     
    129129    open(CSV_FILE, "$filename_full_path");
    130130    my $csv_file_reader = new multiread();
    131     $csv_file_reader->set_handle('MetadataCSVPlugin::CSV_FILE');
     131    $csv_file_reader->set_handle('MetadataCSVDeprecatedPlugin::CSV_FILE');
    132132    $csv_file_reader->read_file(\$csv_file_content);
    133133
    134     # Would be nice if MetadataCSVPlugin was extended to support a minus
     134    # Would be nice if MetadataCSVDeprecatedPlugin was extended to support a minus
    135135    # option to choose the character encoding the CSV file is in
    136136    # For now we will assume it is always in UTF8
     
    280280    my ($outhandle, $failhandle, $gli, $file, $error) = @_;
    281281
    282     print $outhandle "MetadataCSVPlugin Error: $file: $error\n";
    283     print $failhandle "MetadataCSVPlugin Error: $file: $error\n";
     282    print $outhandle "MetadataCSVDeprecatedPlugin Error: $file: $error\n";
     283    print $failhandle "MetadataCSVDeprecatedPlugin Error: $file: $error\n";
    284284    print STDERR "<ProcessingError n='$file' r='$error'/>\n" if ($gli);
    285285}
  • main/trunk/greenstone2/perllib/strings.properties

    r35401 r36481  
    882882CSVFieldSeparator.metadata_value_separator: The character you've consistently used to separate multiple metadata values for a single metadata field within a cell of the csv spreadsheet. If you used the vertical bar as the separator character, then set metadata_value_separator to \| (backslash vertical bar).
    883883
    884 CSVPlugin.desc:A plugin for files in comma-separated value format. A new document will be created for each line of the file.
     884CSVPlugin.desc:A plugin for files in comma-separated value format. Metadata can be assigned to source documents (specified in the Filename field), or new documents created for each line of the file.
     885
     886CSVDeprecatedPlugin.desc:An old plugin for files in comma-separated value format. A new document will be created for each line of the file.
    885887
    886888DateExtractor.desc:Helper extractor plugin for extracting historical date information from text.
     
    11401142MediaWikiPlugin.remove_title_suffix_exp:A Perl regular expression to trim the extracted title. For example, \\s-(.+) will trim title contents after "-".
    11411143
    1142 MetadataCSVPlugin.desc:A plugin for metadata in comma-separated value format. The Filename field in the CSV file is used to determine which document the metadata belongs to.
     1144MetadataCSVDeprecatedPlugin.desc:An old plugin for metadata in comma-separated value format. The Filename field in the CSV file is used to determine which document the metadata belongs to.
    11431145
    11441146MetadataPass.desc:On-the-side base class to BaseImporter that supports metadata plugins utilise metadata_read pass of import.pl
Note: See TracChangeset for help on using the changeset viewer.