Changeset 9121
- Timestamp:
- 2005-02-21T15:45:29+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/explode_metadata_database.pl
r9119 r9121 11 11 use parsargv; 12 12 use printusage; 13 my $unicode_list = 14 [ { 'name' => "auto", 15 'desc' => "{BasPlug.input_encoding.auto}" }, 16 { 'name' => "ascii", 17 'desc' => "{BasPlug.input_encoding.ascii}" }, 18 { 'name' => "utf8", 19 'desc' => "{BasPlug.input_encoding.utf8}" }, 20 { 'name' => "unicode", 21 'desc' => "{BasPlug.input_encoding.unicode}" } ]; 13 22 14 23 my $arguments = 15 [ { 'name' => " encoding",24 [ { 'name' => "input_encoding", 16 25 'desc' => "{explode.encoding}", 17 'type' => " string",26 'type' => "enum", 18 27 'deft' => "iso_8859_1", 28 'list' => $unicode_list, 19 29 'reqd' => "no" } , 20 30 { 'name' => "metadata_set", … … 44 54 # Parse command line arguments 45 55 if (!parsargv::parse(\@ARGV, 46 ' encoding/.*/iso_8859_1', \$encoding,56 'input_encoding/.*/auto', \$encoding, 47 57 'metadata_set/.*/', \$metadata_set, 48 58 'plugin/.*/', \$plugin, … … 87 97 # ...and initialize it 88 98 $plugobj->init(1, "STDERR", "STDERR"); 89 99 100 if ($encoding eq "auto") { 101 $plugobj->{'input_encoding'} = $encoding; 102 (my $language, $encoding) = $plugobj->textcat_get_language_encoding ($filename); 103 } 90 104 # Use the plugin's read_file function to avoid duplicating code 91 105 $plugobj->read_file($filename, $encoding, undef, \$text);
Note:
See TracChangeset
for help on using the changeset viewer.