Unicorn TSV-maker can now handle bill.data and charge.data too.
[migration-tools.git] / unicorn / unicorn_patrons_to_tsv.pl
index 7c3ca59..6960d49 100755 (executable)
@@ -13,7 +13,7 @@ my %unique_fields;
 
 # Load each record
 while (<>) {
-
+    s/\r\n/\n/g;
 # print STDERR "Loaded this line: " . $_;
 
        # Is this the start of a new record?
@@ -25,6 +25,11 @@ while (<>) {
                next;
        }
 
+       # Is this a FORM= line (which can be ignored)?
+       if ( /^FORM=/ ) {
+               next;
+       }
+
        # If this isn't the start of the new record, it's a new line in the present record.
        $line++;