aboutsummaryrefslogtreecommitdiffstats
path: root/bin/open311-populate-service-list
blob: 99f8502a7eab5b0792637faf492e2050fe25b113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/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"],
    ['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, verbose => $opt->verbose? 1:0 );

$p->process_councils;