Ignore:
Timestamp:
2006-01-24T10:29:34+13:00 (18 years ago)
Author:
kjdon
Message:

made all plugins that implement read() call read_block to check process_exp, block_exp, smart blocking, cover image blocking etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/FOXPlug.pm

    r10254 r11090  
    6969}
    7070
    71 sub is_recursive {
    72     my $self = shift (@_);
    73 
    74     return 0; # this is not a recursive plugin
    75 }
    76 
     71sub get_default_process_exp {
     72    my $self = shift (@_);
     73
     74    return q^(?i)\.dbf$^;
     75}
     76
     77#dbt files are processed at the same time as dbf files
     78sub get_default_block_exp {
     79    my $self = shift (@_);
     80
     81    return q^(?i)\.dbt$^;
     82}
    7783
    7884# return number of files processed, undef if can't process
     
    8288    my $self = shift (@_);
    8389    my ($pluginfo, $base_dir, $file, $metadata, $processor, $maxdocs, $total_count, $gli) = @_;
    84     my $fullname = &util::filename_cat ($base_dir, $file);
    85 
    86     # dbt files are processed at the same time as dbf files
    87     return 0 if ($fullname =~ /\.dbt$/i);
    88 
    89     # see if this is a foxbase database
    90     return undef unless (-f $fullname && $fullname =~ /\.dbf$/i);
     90 
     91    #check for associate_ext, blocking etc, are we processing this file?
     92    my ($block_status,$fullname) = $self->read_block(@_);   
     93    return $block_status if ((!defined $block_status) || ($block_status==0));
     94
     95    print STDERR "<Processing n='$file' p='FOXPlug'>\n" if ($gli);
     96    print STDERR "FOXPlug: processing $file\n" if $self->{'verbosity'} > 1;
    9197
    9298    my ($parent_dir) = $fullname =~ /^(.*)\/[^\/]+\.dbf$/i;
     
    100106    return -1; # error in processing
    101107    }
    102 
    103     print STDERR "<Processing n='$file' p='FOXPlug'>\n" if ($gli);
    104    
    105     print STDERR "FOXPlug: processing $file\n";
    106108
    107109    # read in the database header
Note: See TracChangeset for help on using the changeset viewer.