Changeset 1269 for trunk/gsdl
- Timestamp:
- 2000-07-04T16:03:49+12:00 (24 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/import.pl
r1243 r1269 56 56 print STDERR " directory -- use with care\n"; 57 57 print STDERR " -gzip Use gzip to compress resulting gml documents\n"; 58 print STDERR " (don't forget to include ZIPPlug in your plugin\n"; 59 print STDERR " list when building from compressed documents)\n"; 58 60 print STDERR " -maxdocs number Maximum number of documents to import\n"; 59 61 print STDERR " -groupsize number Number of GML documents to group into one file\n"; -
trunk/gsdl/perllib/plugins/GMLPlug.pm
r1244 r1269 49 49 my $self = shift (@_); 50 50 51 return q^(?i)\.gml (\.gz)?$^;51 return q^(?i)\.gml?$^; 52 52 } 53 53 … … 72 72 $parent_dir = &util::filename_cat ($base_dir, $parent_dir); 73 73 74 # all this gzip stuff should one day be replaced by a gzip/bzip/zip/tar 75 # handling plugin 76 my $gz = 0; 77 if ($file =~ /\.gz$/i) { 78 $gz = 1; 79 } 80 81 # read in the document - input is assumed throughout this plugin to already be utf8 82 if ($gz) { 83 if (!open (INFILE, "zcat $filename |")) { 84 print STDERR "GMLPlug::read - zcat couldn't read $filename\n"; 85 return 0; 86 } 87 } else { 88 if (!open (INFILE, $filename)) { 89 print STDERR "GMLPlug::read - couldn't read $filename\n"; 90 return 0; 91 } 74 if (!open (INFILE, $filename)) { 75 print STDERR "GMLPlug::read - couldn't read $filename\n"; 76 return 0; 92 77 } 93 78
Note:
See TracChangeset
for help on using the changeset viewer.