Lines 39-44
my $help;
Link Here
|
39 |
my @preserve_fields; |
39 |
my @preserve_fields; |
40 |
my $update_dateexpiry; |
40 |
my $update_dateexpiry; |
41 |
my $update_dateexpiry_from_today; |
41 |
my $update_dateexpiry_from_today; |
|
|
42 |
my $update_dateexpiry_from_existing; |
42 |
|
43 |
|
43 |
GetOptions( |
44 |
GetOptions( |
44 |
'c|confirm' => \$confirm, |
45 |
'c|confirm' => \$confirm, |
Lines 49-54
GetOptions(
Link Here
|
49 |
'op|overwrite_passwords' => \$overwrite_passwords, |
50 |
'op|overwrite_passwords' => \$overwrite_passwords, |
50 |
'ue|update-expiration' => \$update_dateexpiry, |
51 |
'ue|update-expiration' => \$update_dateexpiry, |
51 |
'et|expiration-from-today' => \$update_dateexpiry_from_today, |
52 |
'et|expiration-from-today' => \$update_dateexpiry_from_today, |
|
|
53 |
'ee|expiration-from-existing' => \$update_dateexpiry_from_existing, |
52 |
'en|email-new' => \$welcome_new, |
54 |
'en|email-new' => \$welcome_new, |
53 |
'p|preserve-extended-attributes' => \$ext_preserve, |
55 |
'p|preserve-extended-attributes' => \$ext_preserve, |
54 |
'pf|preserve-field=s' => \@preserve_fields, |
56 |
'pf|preserve-field=s' => \@preserve_fields, |
Lines 57-62
GetOptions(
Link Here
|
57 |
) or pod2usage(2); |
59 |
) or pod2usage(2); |
58 |
|
60 |
|
59 |
pod2usage(1) if $help; |
61 |
pod2usage(1) if $help; |
|
|
62 |
pod2usage(q|--ee and --et are mutually exclusive|) if $update_dateexpiry_from_today && $update_dateexpiry_from_existing; |
60 |
pod2usage(q|--file is required|) unless $csv_file; |
63 |
pod2usage(q|--file is required|) unless $csv_file; |
61 |
pod2usage(q|--matchpoint is required|) unless $matchpoint; |
64 |
pod2usage(q|--matchpoint is required|) unless $matchpoint; |
62 |
|
65 |
|
Lines 67-83
open( $handle, "<", $csv_file ) or die $!;
Link Here
|
67 |
|
70 |
|
68 |
my $return = $Import->import_patrons( |
71 |
my $return = $Import->import_patrons( |
69 |
{ |
72 |
{ |
70 |
file => $handle, |
73 |
file => $handle, |
71 |
defaults => \%defaults, |
74 |
defaults => \%defaults, |
72 |
matchpoint => $matchpoint, |
75 |
matchpoint => $matchpoint, |
73 |
overwrite_cardnumber => $overwrite_cardnumber, |
76 |
overwrite_cardnumber => $overwrite_cardnumber, |
74 |
overwrite_passwords => $overwrite_passwords, |
77 |
overwrite_passwords => $overwrite_passwords, |
75 |
preserve_extended_attributes => $ext_preserve, |
78 |
preserve_extended_attributes => $ext_preserve, |
76 |
preserve_fields => \@preserve_fields, |
79 |
preserve_fields => \@preserve_fields, |
77 |
update_dateexpiry => $update_dateexpiry, |
80 |
update_dateexpiry => $update_dateexpiry, |
78 |
update_dateexpiry_from_today => $update_dateexpiry_from_today, |
81 |
update_dateexpiry_from_today => $update_dateexpiry_from_today, |
79 |
send_welcome => $welcome_new, |
82 |
update_dateexpiry_from_existing => $update_dateexpiry_from_existing, |
80 |
dry_run => !$confirm, |
83 |
send_welcome => $welcome_new, |
|
|
84 |
dry_run => !$confirm, |
81 |
} |
85 |
} |
82 |
); |
86 |
); |
83 |
|
87 |
|
Lines 164-170
If a matching patron is found, extend the expiration date of their account using
Link Here
|
164 |
|
168 |
|
165 |
=item B<-et|--expiration-from-today> |
169 |
=item B<-et|--expiration-from-today> |
166 |
|
170 |
|
167 |
If a matching patron is found, extend the expiration date of their account using the patron's enrollment date as the base |
171 |
If a matching patron is found, extend the expiration date of their account using today as the base |
|
|
172 |
Cannot by used in conjunction with --expiration-from-existing |
173 |
|
174 |
=item B<-et|--expiration-from-existing> |
175 |
|
176 |
If a matching patron is found, extend the expiration date of their account using the patron's current expiration date as the base |
177 |
Cannot by used in conjunction with --expiration-from-today |
168 |
|
178 |
|
169 |
=item B<-v|--verbose> |
179 |
=item B<-v|--verbose> |
170 |
|
180 |
|