Ignore:
Timestamp:
2002-08-13T12:28:15+12:00 (22 years ago)
Author:
sjboddie
Message:

Added -use_strings option to ConvertToPlug. The default behaviour for
plugins derived from ConvertToPlug (WordPlug, PDFPlug etc) is now to
exclude documents that can't be converted correctly. They won't use the
perl strings stuff to extract text unless the -use_strings option is
specified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/gsConvert.pl

    r3246 r3350  
    5757my $is_winnt_2000=eval {require Win32; return (Win32::IsWinNT()); return 0;};
    5858if (!defined($is_winnt_2000)) {$is_winnt_2000=0;}
     59
     60my $use_strings;
    5961
    6062sub print_usage
     
    6870    print STDERR "\t-output\thtml|text\n";
    6971    print STDERR "\t-timeout\t<max cpu seconds>\t(ulimit on unix systems)\n";
     72    print STDERR "\t-use_strings\t(use strnigs to extract text if conversion fails)\n";
    7073    exit(1);
    7174}
     
    8588             'output/(html|text)/', \$output_type,
    8689             'timeout/\d+/0',\$timeout,
    87              'verbose/\d+/0',   \$verbose))
     90             'verbose/\d+/0',   \$verbose,
     91             'use_strings', \$use_strings))
    8892    {
    8993    print_usage();
     
    469473        close FAILLOG if ($write_to_fail_log);
    470474    }
    471     print STDERR "Continuing...\n";
    472475    return 0; # we can try any_to_text
    473476    }
     
    954957    ($input_filename, $output_filestem) = @_;
    955958
     959    if (!$use_strings) {
     960      return 0;
     961    }
     962
    956963    open(IN, "<$input_filename") || return 0;
    957964    binmode(IN);
Note: See TracChangeset for help on using the changeset viewer.