blob: f1e9af2eb17ea6a36f319f81638a030c04b4f38a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#!/usr/bin/env perl
use v5.14;
use warnings;
BEGIN {
use File::Basename qw(dirname);
use File::Spec;
my $d = dirname(File::Spec->rel2abs($0));
require "$d/../setenv.pl";
}
use Getopt::Long;
use FixMyStreet::Script::Inactive;
use Pod::Usage;
my %h;
GetOptions(\%h, 'anonymize=i', 'close=i', 'delete=i', 'cobrand=s', 'verbose|v', 'help|h', 'dry-run|n');
pod2usage(0) if $h{help};
pod2usage(1) unless $h{anonymize} || $h{close} || $h{delete};
FixMyStreet::Script::Inactive->new(%h)->reports;
__END__
=head1 NAME
process-inactive-reports - deal with anonymizing inactive non-open reports
=head1 SYNOPSIS
process-inactive-reports [--anonymize N] [--close N] [--delete N] [--cobrand COBRAND]
Options:
--anonymize Anonymize non-open reports (and related) inactive longer than this time (months)
--close Close comments on non-open reports inactive longer than this time (months)
--delete Delete non-open reports inactive longer than this time (months)
--cobrand Only act upon reports made on this cobrand
--dry-run Don't actually anonymize anything or send any emails
--verbose Output as to which reports are being affected
--help This help message
=cut
|