aboutsummaryrefslogtreecommitdiffstats
path: root/bin/open311-populate-service-list
diff options
context:
space:
mode:
Diffstat (limited to 'bin/open311-populate-service-list')
-rwxr-xr-xbin/open311-populate-service-list13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/open311-populate-service-list b/bin/open311-populate-service-list
index 9588e4360..232b0a6d4 100755
--- a/bin/open311-populate-service-list
+++ b/bin/open311-populate-service-list
@@ -4,11 +4,22 @@ use strict;
use warnings;
use FixMyStreet::App;
use Open311::PopulateServiceList;
+use Getopt::Long::Descriptive;
+my ($opt, $usage) = describe_options(
+ '%c %o',
+ ['verbose|v', "print out all services as they are found"],
+ ['warn|w', "output warnings about any issues"],
+ ['help', "print usage message and exit" ],
+);
+print($usage->text), exit if $opt->help;
my $council_list = FixMyStreet::App->model('DB::Open311conf')->search( {
send_method => 'Open311'
} );
-my $p = Open311::PopulateServiceList->new( council_list => $council_list );
+my $verbose = 0;
+$verbose = 1 if $opt->warn;
+$verbose = 2 if $opt->verbose;
+my $p = Open311::PopulateServiceList->new( council_list => $council_list, verbose => $verbose );
$p->process_councils;