Changeset 27499 for main


Ignore:
Timestamp:
2013-05-28T11:47:42+12:00 (11 years ago)
Author:
jmt12
Message:

New configuration options to control the creation of directories in the Archives directory... controlling the length of each split, and whether the string HASH should count against that limit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm

    r27352 r27499  
    8282     'type' => "flag",
    8383     'reqd' => "no",
    84      'hiddengli' => "yes"}
     84     'hiddengli' => "yes"},
     85       { 'name' => "subdir_split_length",
     86     'desc' => "{BasPlugout.subdir_split_length}",
     87     'type' => "int",
     88     'reqd' => "no",
     89         'deft' => "8",
     90     'hiddengli' => "no"},
     91       { 'name' => "subdir_hash_prefix",
     92     'desc' => "{BasPlugout.subdir_hash_prefix}",
     93     'type' => "flag",
     94     'reqd' => "no",
     95         'deft' => "no",
     96     'hiddengli' => "no"}
    8597];
    8698
     
    615627   do {
    616628       $doc_dir .= "/" if $doc_dir_num > 0;
    617        if ($doc_dir_rest =~ s/^(.{1,8})//) {
     629       my $pattern = '^(.{1,' . $self->{'subdir_split_length'} . '})';
     630       if ($self->{'subdir_hash_prefix'})
     631       {
     632         $pattern = '^((HASH)?.{1,' . $self->{'subdir_split_length'} . '})';
     633       }
     634       #if ($doc_dir_rest =~ s/^(.{1,$limit})//) {
     635       if ($doc_dir_rest =~ s/$pattern//i)
     636       {
    618637       $doc_dir .= $1;
    619638       $doc_dir_num++;
Note: See TracChangeset for help on using the changeset viewer.