summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/csvconv.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/csvconv.pl b/bin/csvconv.pl
index 5741f54..55b2d36 100755
--- a/bin/csvconv.pl
+++ b/bin/csvconv.pl
@@ -91,12 +91,17 @@ sub read_csv($) {
@header = split(',', $line);
my $n = 0;
my $nline = 0;
+ my $nblank = 0;
while (defined($line = <$csv>)) {
chomp $line;
$nline++;
my @dline = split(',', $line);
$dline[0] =~ s/^\[\'(.*)\'\]$/\1/;
- if ($dline[1] ne $global_id) {
+ if ($dline[1] eq 'None' && $dline[0] eq 'None' &&
+ $dline[2]) {
+ # Blank page
+ $nblank++;
+ } elsif ($dline[1] ne $global_id) {
error("$file:$nline: Not counting incorrect survey ID: $dline[1]\n");
next;
} elsif (!defined($valid_ids{$dline[0]})) {
@@ -115,6 +120,9 @@ sub read_csv($) {
}
}
close($csv);
+ if ($nblank) {
+ error("$file: $nblank blank pages ignored\n");
+ }
}
($proj) = @ARGV;