diff options
author | Marius Halden <marius.h@lden.org> | 2020-09-29 14:23:52 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2020-09-29 14:23:52 +0200 |
commit | a27ce1524d801d2742a2bdb6ec1da45126d64353 (patch) | |
tree | 64123c4e17dc1776aa0a7cd65ee01d49d3e7d978 /bin/open311-populate-service-list | |
parent | 377bd96aab7cad3434185c30eb908c9da447fe40 (diff) | |
parent | 2773c60226b9370fe8ee00f7b205b571bb87c3b5 (diff) |
Merge tag 'v3.0.1' into fiksgatami-dev
Diffstat (limited to 'bin/open311-populate-service-list')
-rwxr-xr-x | bin/open311-populate-service-list | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/open311-populate-service-list b/bin/open311-populate-service-list index 9c05055c6..d81df9321 100755 --- a/bin/open311-populate-service-list +++ b/bin/open311-populate-service-list @@ -16,17 +16,22 @@ use Getopt::Long::Descriptive; my ($opt, $usage) = describe_options( '%c %o', + ['body|b:s', "body name to only fetch this body"], ['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; +$usage->die if $opt->help; my $bodies = FixMyStreet::DB->resultset('Body')->search( { # Until Oxfordshire does name => { -not_in => [ 'Oxfordshire County Council' ] }, send_method => 'Open311' } ); +if ($opt->body) { + $bodies = $bodies->search({ name => $opt->body }); +} + my $verbose = 0; $verbose = 1 if $opt->warn; $verbose = 2 if $opt->verbose; |