Lines 45-56
my $help;
Link Here
|
45 |
my $verbose; |
45 |
my $verbose; |
46 |
my $output_dir; |
46 |
my $output_dir; |
47 |
my $log; |
47 |
my $log; |
|
|
48 |
my $maxdays; |
48 |
|
49 |
|
49 |
GetOptions( |
50 |
GetOptions( |
50 |
'h|help' => \$help, |
51 |
'h|help' => \$help, |
51 |
'v|verbose' => \$verbose, |
52 |
'v|verbose' => \$verbose, |
52 |
'l|log' => \$log, |
53 |
'l|log' => \$log, |
53 |
'o|out:s' => \$output_dir, |
54 |
'o|out:s' => \$output_dir, |
|
|
55 |
'm|maxdays:i' => \$maxdays, |
54 |
); |
56 |
); |
55 |
my $usage = << 'ENDUSAGE'; |
57 |
my $usage = << 'ENDUSAGE'; |
56 |
|
58 |
|
Lines 64-69
This script has the following parameters :
Link Here
|
64 |
-l --log: log the output to a file (optional if the -o parameter is given) |
66 |
-l --log: log the output to a file (optional if the -o parameter is given) |
65 |
-o --out: ouput directory for logs (defaults to env or /tmp if !exist) |
67 |
-o --out: ouput directory for logs (defaults to env or /tmp if !exist) |
66 |
-v --verbose |
68 |
-v --verbose |
|
|
69 |
-m --maxdays: how many days back of overdues to process |
67 |
|
70 |
|
68 |
ENDUSAGE |
71 |
ENDUSAGE |
69 |
|
72 |
|
Lines 97-103
if ($filename) {
Link Here
|
97 |
print {$fh} "\n"; |
100 |
print {$fh} "\n"; |
98 |
} |
101 |
} |
99 |
my $counted = 0; |
102 |
my $counted = 0; |
100 |
my $overdues = Getoverdues(); |
103 |
my $params; |
|
|
104 |
$params->{maximumdays} = $maxdays if $maxdays; |
105 |
my $overdues = Getoverdues($params); |
101 |
for my $overdue ( @{$overdues} ) { |
106 |
for my $overdue ( @{$overdues} ) { |
102 |
next if $overdue->{itemlost}; |
107 |
next if $overdue->{itemlost}; |
103 |
|
108 |
|
104 |
- |
|
|