diff options
Diffstat (limited to 'bin/open311-populate-service-list')
-rwxr-xr-x | bin/open311-populate-service-list | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/open311-populate-service-list b/bin/open311-populate-service-list index 33be61af7..dc8fa3f7b 100755 --- a/bin/open311-populate-service-list +++ b/bin/open311-populate-service-list @@ -1,14 +1,26 @@ -#!/usr/bin/perl +#!/usr/bin/env perl 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( { + area_id => { '!=', 2237 }, # XXX Until Oxfordshire does do so 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; |