diff options
Diffstat (limited to 'bin/councils-no-contact')
-rwxr-xr-x | bin/councils-no-contact | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/bin/councils-no-contact b/bin/councils-no-contact deleted file mode 100755 index 22855aaf0..000000000 --- a/bin/councils-no-contact +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/perl -w - -# councils-no-contact: -# Given list of councils without email, generate list of MaPit area IDs. -# -# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. -# Email: matthew@mysociety.org. WWW: http://www.mysociety.org -# -# $Id: councils-no-contact,v 1.2 2006-10-07 21:06:31 matthew Exp $ - -use strict; -require 5.8.0; - -# Horrible boilerplate to set up appropriate library paths. -use FindBin; -use lib "$FindBin::Bin/../perllib"; -use lib "$FindBin::Bin/../../perllib"; - -use mySociety::Config; -use mySociety::MaPit; -use mySociety::VotingArea; - -BEGIN { - mySociety::Config::set_file("$FindBin::Bin/../conf/general"); - mySociety::MaPit::configure(); -} - -my @councils_no_email = ( -'Aberdeenshire', -'Antrim', -'Ashford', -'Blaenau Gwent', -'Bradford', -'Breckland', -'Castlereagh', -'Charnwood', -'Cherwell', -'Chesterfield', -'Corporation of London', -'Congleton', -'Derwentside', -'Dorset', -'Durham County', -'E. Ayrshire', -'E. Dorset', -'E. Hampshire', -'E. Lothian', -'E. Sussex', -'Enfield', -'Essex', -'Halton', -'Harborough', -'Inverclyde', -'Kingston upon Hull', -'Magherafelt', -'Melton', -'Middlesbrough', -'Mole Valley', -'Newham', -'N. Devon', -'North Norfolk', -'N. Tyneside', -'N. Yorkshire', -'Northumberland', -'Nottinghamshire', -'Oadby & Wigston', -'Oldham', -'Purbeck', -'Reading', -'Rhondda Cynon Taff', -'Scottish Borders', -'S. Bedfordshire', -'S. Ribble', -'South Somerset', -'Southend on Sea', -'Surrey', -'Tendring', -'Thurrock', -'Tonbridge & Malling', -'Wakefield', -'Wansbeck', -'W. Devon', -'W. Sussex', -'Westminster', -'Weymouth & Portland', -'Worcestershire' -); - -my $types = $mySociety::VotingArea::council_parent_types; -my @out; -foreach my $type (@$types) { - my $areas = mySociety::MaPit::get_areas_by_type($type); - my $areas_info = mySociety::MaPit::get_voting_areas_info($areas); - foreach my $id (keys %$areas_info) { - my $area_info = $areas_info->{$id}; - my $name = $area_info->{name}; - foreach my $council (@councils_no_email) { - if ($name =~ /^$council( ((Borough|City|District|County) )*Council)?$/) { - push(@out, $id); - } - } - } -} - -print join(',', @out); - |