aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/open311-populate-service-list16
1 files changed, 15 insertions, 1 deletions
diff --git a/bin/open311-populate-service-list b/bin/open311-populate-service-list
index 30a55c178..7a91c2c05 100755
--- a/bin/open311-populate-service-list
+++ b/bin/open311-populate-service-list
@@ -11,10 +11,24 @@ use Data::Dumper;
my $council = shift;
my $end_point = shift;
-die "require council id and end point\n" unless $council and $end_point;
+die <<"EOT"
+You need to provide a council id and an end point url
+
+Usage:
+
+ $0 council_id end_point_url
+
+ council_id: the mapit id of the council as used in the contacts table
+ end_point_url: the location of the open311 service list xml
+
+EOT
+ unless $council and $end_point;
my $service_list = get( $end_point );
+die "Invalid council id: $council\n" unless $council =~ /^\d+$/;
+die "No service list found at $end_point\n" unless $service_list;
+
my $xml = XML::Simple->new();
my $list = $xml->XMLin( $service_list );
my @found_contacts;