Changeset 2342


Ignore:
Timestamp:
2001-04-30T09:31:14+12:00 (23 years ago)
Author:
sjboddie
Message:

renamed HTMLPlug's w3mir option to file_is_url

File:
1 edited

Legend:

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

    r2219 r2342  
    6464    print STDERR "   -hunt_creator_metadata Find as much metadata as possible on authorship and place it in the\n ";
    6565    print STDERR "                          'Creator' field. Requires the -metadata_fields flag.\n ";
    66     print STDERR "   -w3mir                 Set if w3mir was used to generate input file structure.\n";
     66    print STDERR "   -file_is_url           Set if input filenames make up url of original source documents\n";
     67    print STDERR "                          e.g. if a web mirroring tool was used to create the import\n";
     68    print STDERR "                          directory structure\n";
    6769    print STDERR "   -assoc_files           Perl regular expression of file extensions to associate with\n";
    6870    print STDERR "                          html documents. Defaults to '(?i)\.(jpe?g|gif|png|css)\$'\n";
     
    8688             q^hunt_creator_metadata^, \$self->{'hunt_creator_metadata'},
    8789             q^w3mir^, \$self->{'w3mir'},
     90             q^file_is_url^, \$self->{'file_is_url'},
    8891             q^assoc_files/.*/(?i)\.(jpe?g|gif|png|css)$^, \$self->{'assoc_files'},
    8992             q^rename_assoc_files^, \$self->{'rename_assoc_files'},
     
    9497    &print_usage();
    9598    die "\n";
     99    }
     100
     101    # retain this for backward compatibility (w3mir option was replaced by
     102    # file_is_url)
     103    if ($self->{'w3mir'}) {
     104    $self->{'file_is_url'} = 1;
    96105    }
    97106   
     
    302311    if ($before_hash =~ s/^\/// || $before_hash =~ /\\/) {
    303312
    304         # the first directory will be the domain name if w3mir was used
     313        # the first directory will be the domain name if file_is_url
    305314        # to generate archives, otherwise we'll assume all files are
    306315        # from the same site and base_dir is the root
    307316            # This is not called in Windows
    308         if ($self->{'w3mir'}) {
     317        if ($self->{'file_is_url'}) {
    309318        my @dirs = split /[\/\\]/, $file;
    310319        my $domname = shift (@dirs);
Note: See TracChangeset for help on using the changeset viewer.