Lines 40-45
my $help;
Link Here
|
40 |
my @preserve_fields; |
40 |
my @preserve_fields; |
41 |
my $update_dateexpiry; |
41 |
my $update_dateexpiry; |
42 |
my $update_dateexpiry_from_today; |
42 |
my $update_dateexpiry_from_today; |
|
|
43 |
my $update_dateexpiry_from_existing; |
43 |
|
44 |
|
44 |
my $command_line_options = join( " ", @ARGV ); |
45 |
my $command_line_options = join( " ", @ARGV ); |
45 |
|
46 |
|
Lines 52-57
GetOptions(
Link Here
|
52 |
'op|overwrite_passwords' => \$overwrite_passwords, |
53 |
'op|overwrite_passwords' => \$overwrite_passwords, |
53 |
'ue|update-expiration' => \$update_dateexpiry, |
54 |
'ue|update-expiration' => \$update_dateexpiry, |
54 |
'et|expiration-from-today' => \$update_dateexpiry_from_today, |
55 |
'et|expiration-from-today' => \$update_dateexpiry_from_today, |
|
|
56 |
'ee|expiration-from-existing' => \$update_dateexpiry_from_existing, |
55 |
'en|email-new' => \$welcome_new, |
57 |
'en|email-new' => \$welcome_new, |
56 |
'p|preserve-extended-attributes' => \$ext_preserve, |
58 |
'p|preserve-extended-attributes' => \$ext_preserve, |
57 |
'pf|preserve-field=s' => \@preserve_fields, |
59 |
'pf|preserve-field=s' => \@preserve_fields, |
Lines 60-65
GetOptions(
Link Here
|
60 |
) or pod2usage(2); |
62 |
) or pod2usage(2); |
61 |
|
63 |
|
62 |
pod2usage(1) if $help; |
64 |
pod2usage(1) if $help; |
|
|
65 |
pod2usage(q|--ee and --et are mutually exclusive|) if $update_dateexpiry_from_today && $update_dateexpiry_from_existing; |
63 |
pod2usage(q|--file is required|) unless $csv_file; |
66 |
pod2usage(q|--file is required|) unless $csv_file; |
64 |
pod2usage(q|--matchpoint is required|) unless $matchpoint; |
67 |
pod2usage(q|--matchpoint is required|) unless $matchpoint; |
65 |
|
68 |
|
Lines 74-90
open( $handle, "<", $csv_file ) or die $!;
Link Here
|
74 |
|
77 |
|
75 |
my $return = $Import->import_patrons( |
78 |
my $return = $Import->import_patrons( |
76 |
{ |
79 |
{ |
77 |
file => $handle, |
80 |
file => $handle, |
78 |
defaults => \%defaults, |
81 |
defaults => \%defaults, |
79 |
matchpoint => $matchpoint, |
82 |
matchpoint => $matchpoint, |
80 |
overwrite_cardnumber => $overwrite_cardnumber, |
83 |
overwrite_cardnumber => $overwrite_cardnumber, |
81 |
overwrite_passwords => $overwrite_passwords, |
84 |
overwrite_passwords => $overwrite_passwords, |
82 |
preserve_extended_attributes => $ext_preserve, |
85 |
preserve_extended_attributes => $ext_preserve, |
83 |
preserve_fields => \@preserve_fields, |
86 |
preserve_fields => \@preserve_fields, |
84 |
update_dateexpiry => $update_dateexpiry, |
87 |
update_dateexpiry => $update_dateexpiry, |
85 |
update_dateexpiry_from_today => $update_dateexpiry_from_today, |
88 |
update_dateexpiry_from_today => $update_dateexpiry_from_today, |
86 |
send_welcome => $welcome_new, |
89 |
update_dateexpiry_from_existing => $update_dateexpiry_from_existing, |
87 |
dry_run => !$confirm, |
90 |
send_welcome => $welcome_new, |
|
|
91 |
dry_run => !$confirm, |
88 |
} |
92 |
} |
89 |
); |
93 |
); |
90 |
|
94 |
|
Lines 189-194
If a matching patron is found, extend the expiration date of their account using
Link Here
|
189 |
=item B<-et|--expiration-from-today> |
193 |
=item B<-et|--expiration-from-today> |
190 |
|
194 |
|
191 |
If a matching patron is found, extend the expiration date of their account using today's date as the base |
195 |
If a matching patron is found, extend the expiration date of their account using today's date as the base |
|
|
196 |
Cannot by used in conjunction with --expiration-from-existing |
197 |
|
198 |
=item B<-ee|--expiration-from-existing> |
199 |
|
200 |
If a matching patron is found, extend the expiration date of their account using the patron's current expiration date as the base |
201 |
Cannot by used in conjunction with --expiration-from-today |
192 |
|
202 |
|
193 |
=item B<-v|--verbose> |
203 |
=item B<-v|--verbose> |
194 |
|
204 |
|