Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Cross committed Jan 16, 2015
2 parents 4749587 + e6610c8 commit 9db9dea
Show file tree
Hide file tree
Showing 679 changed files with 668,219 additions and 40 deletions.
15 changes: 11 additions & 4 deletions bin/get_cands
Expand Up @@ -9,10 +9,14 @@ use open IO => ':encoding(utf8)';
use JSON;
use LWP::Simple;
use DateTime;
use Getopt::Long;

use lib 'lib';
use TwittElection::Schema;

my $verbose;
GetOptions(verbose => \$verbose);

my $sch = TwittElection::Schema->get_schema;

my $cons_rs;
Expand Down Expand Up @@ -84,7 +88,7 @@ foreach my $con ($cons_rs->all) {
} else {
say "* No change $cand->{name} / ",
$cand->{party_memberships}{2015}{name},
" / \@$cand->{twitter_username}";
" / \@$cand->{twitter_username}" if $verbose;
}
} else {
say "* Adding $cand->{name} / ",
Expand All @@ -103,9 +107,12 @@ foreach my $con ($cons_rs->all) {

# Any candidates left in %curr_cands need to be deleted
foreach (keys %curr_cands) {
$can_rs->search({
yournextmp_id => $_,
})->delete;
my $curr_cand = $curr_cands{$_};
say '* Deleting ', $curr_cand->name, ' / ',
$curr_cand->party->name,
' / ', $curr_cand->twitter;
$curr_cand->delete;
$changed = 1;
}

if ($changed) {
Expand Down
3 changes: 2 additions & 1 deletion c/aberavon.html
Expand Up @@ -81,10 +81,11 @@ <h1>Aberavon</h1>
<li>Jonathan Tier (Green)</li>
<li>Stephen Kinnock (Labour)<br><a href="https://twitter.com/SKinnock">@SKinnock</a></li>
<li>Helen Ceri Clarke (Liberal Democrat)<br><a href="https://twitter.com/helenceri">@helenceri</a></li>
<li>Captain Beany (Independent)</li>
<li>Captain Beany (Independent)<br><a href="https://twitter.com/captainbeany">@captainbeany</a></li>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/66101">Aberavon page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/aberconwy.html
Expand Up @@ -84,6 +84,7 @@ <h1>Aberconwy</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/66085">Aberconwy page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/aberdeen-north.html
Expand Up @@ -83,6 +83,7 @@ <h1>Aberdeen North</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/14398">Aberdeen North page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/aberdeen-south.html
Expand Up @@ -83,6 +83,7 @@ <h1>Aberdeen South</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/14399">Aberdeen South page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/airdrie-and-shotts.html
Expand Up @@ -82,6 +82,7 @@ <h1>Airdrie and Shotts</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/14400">Airdrie and Shotts page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/aldershot.html
Expand Up @@ -85,6 +85,7 @@ <h1>Aldershot</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65730">Aldershot page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/aldridge-brownhills.html
Expand Up @@ -83,6 +83,7 @@ <h1>Aldridge-Brownhills</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65773">Aldridge-Brownhills page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/altrincham-and-sale-west.html
Expand Up @@ -85,6 +85,7 @@ <h1>Altrincham and Sale West</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65892">Altrincham and Sale West page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/alyn-and-deeside.html
Expand Up @@ -86,6 +86,7 @@ <h1>Alyn and Deeside</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/66103">Alyn and Deeside page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/amber-valley.html
Expand Up @@ -85,6 +85,7 @@ <h1>Amber Valley</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65809">Amber Valley page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/angus.html
Expand Up @@ -84,6 +84,7 @@ <h1>Angus</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/14401">Angus page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/arfon.html
Expand Up @@ -84,6 +84,7 @@ <h1>Arfon</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/66108">Arfon page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/argyll-and-bute.html
Expand Up @@ -85,6 +85,7 @@ <h1>Argyll and Bute</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/14402">Argyll and Bute page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/arundel-and-south-downs.html
Expand Up @@ -84,6 +84,7 @@ <h1>Arundel and South Downs</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65784">Arundel and South Downs page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/ashfield.html
Expand Up @@ -84,6 +84,7 @@ <h1>Ashfield</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65895">Ashfield page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/ashford.html
Expand Up @@ -83,6 +83,7 @@ <h1>Ashford</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65811">Ashford page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/ashton-under-lyne.html
Expand Up @@ -82,6 +82,7 @@ <h1>Ashton-under-Lyne</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/66056">Ashton-under-Lyne page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/aylesbury.html
Expand Up @@ -83,6 +83,7 @@ <h1>Aylesbury</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65739">Aylesbury page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/ayr-carrick-and-cumnock.html
Expand Up @@ -82,6 +82,7 @@ <h1>Ayr, Carrick and Cumnock</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/14403">Ayr, Carrick and Cumnock page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/banbury-2.html
Expand Up @@ -86,6 +86,7 @@ <h1>Banbury</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/66008">Banbury page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/banff-and-buchan.html
Expand Up @@ -82,6 +82,7 @@ <h1>Banff and Buchan</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/14404">Banff and Buchan page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/barking.html
Expand Up @@ -85,6 +85,7 @@ <h1>Barking</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65662">Barking page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/barnsley-central-2.html
Expand Up @@ -83,6 +83,7 @@ <h1>Barnsley Central</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65665">Barnsley Central page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/barnsley-east.html
Expand Up @@ -82,6 +82,7 @@ <h1>Barnsley East</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/66012">Barnsley East page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/barrow-and-furness-2.html
Expand Up @@ -86,6 +86,7 @@ <h1>Barrow and Furness</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/66006">Barrow and Furness page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/basildon-and-billericay.html
Expand Up @@ -83,6 +83,7 @@ <h1>Basildon and Billericay</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65898">Basildon and Billericay page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/basingstoke.html
Expand Up @@ -83,6 +83,7 @@ <h1>Basingstoke</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65623">Basingstoke page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions c/bassetlaw.html
Expand Up @@ -83,6 +83,7 @@ <h1>Bassetlaw</h1>
</ul>
<p><small>If you wish to make any corrections to this list, please see the
<a href="https://yournextmp.com/constituency/65711">Bassetlaw page</a> on <a href="https://yournextmp.com/">YourNextMP</a>.</small></p>
<p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script></p>
</div>
</div>
</div>
Expand Down

0 comments on commit 9db9dea

Please sign in to comment.