[BACK]Return to pta_import.pl CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / pta

Diff for /pta/pta_import.pl between version 1.3 and 1.4

version 1.3, 2020/11/02 19:36:53 version 1.4, 2020/11/03 09:14:03
Line 31  sub import_chase_credit_card {
Line 31  sub import_chase_credit_card {
                 s/^(.*),\s+(\d+)\s+(\S+)// or                  s/^(.*),\s+(\d+)\s+(\S+)// or
                     die "$fn import parse error: $line";                      die "$fn import parse error: $line";
                 my ($reg, $account, $booking) = ($1, $2, $3);                  my ($reg, $account, $booking) = ($1, $2, $3);
                 $reg =~ s/,,/,.*?/g;                  $reg =~ s/(?:^|(?<=,))(?:$|(?=,))/[^,]*/g;
                 $reg = qr/$reg/;                  $reg = qr/$reg/;
                 push @compiled, $reg;                  push @compiled, $reg;
                 $bookings{$reg} = $booking;                  $bookings{$reg} = $booking;
Line 52  sub import_chase_credit_card {
Line 52  sub import_chase_credit_card {
                         if ($line =~ /$regex/) {                          if ($line =~ /$regex/) {
                                 $account = $accounts{$regex};                                  $account = $accounts{$regex};
                                 $booking = $bookings{$regex};                                  $booking = $bookings{$regex};
                                 next;                                  last;
                         }                          }
                 }                  }
                 if ($booking eq "" || $account eq "") {                  if ($booking eq "" || $account eq "") {
Line 80  chomp($firstLine = <>);
Line 80  chomp($firstLine = <>);
 if ($firstLine eq $chase_credit_card_header) {  if ($firstLine eq $chase_credit_card_header) {
         import_chase_credit_card;          import_chase_credit_card;
 } else {  } else {
         print "Undefined header\n";          die "Undefined header: $firstLine";
 }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

CVSweb