Update emailer.

This commit is contained in:
Timothy Allen 2018-10-11 10:28:05 +02:00
parent 354b5040a0
commit d8a28e60a1
5 changed files with 9592 additions and 9576 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -187,16 +187,16 @@
353,,,,"Eerste River",,"raphaeljm@12gmail.com","Raphael Manual","084 494 4525","21 & 10","06:57AM","08:30AM","Direct 21KM runners to turn left into Clarens Road."
354,,,,"Eerste River",,"raphaeljm@12gmail.com","Raphael Manual","084 494 4525","21 & 10","06:57AM","08:30AM","Direct 21KM runners to turn left into Clarens Road."
355,,,,"Eerste River",,"raphaeljm@12gmail.com","Raphael Manual","084 494 4525","21 & 10","06:57AM","08:30AM","Direct 21KM runners to turn left into Clarens Road."
356,,,"Wajdi Kader","Walmer AC","082 375 0395","kadcon.consultants@gmail.com",,,21,"07:20AM","09:30AM","Guide the 21KM runners around the construction work on the Promenade."
357,,,"Rashida Kader","Walmer AC","083 777 4747","Rashidakader1411@gmail.com",,,21,"07:20AM","09:30AM","Guide the 21KM runners around the construction work on the Promenade."
358,,,"Waseem Matthews","Walmer AC","O84 444 3817","waseemct@gmail.com",,,21,"07:20AM","09:30AM","Guide the 21KM runners around the construction work on the Promenade."
359,,,"Shaheedah Ismail","Walmer AC","072 629 3913","shaheedahismail@gmail.com",,,21,"07:20AM","09:30AM","Keep 21KM runners on the Promenade in the drection of the Lighthouse."
360,,,"Nafeesa Ismail","Walmer AC","O71 389 3062","nafeesaismail15@gmail.com",,,21,"07:20AM","09:30AM","Keep 21KM runners on the Promenade in the drection of the Lighthouse."
361,,,"Rayaan Williams","Walmer AC","076 085 9303","raywilliamsct@gmail.com",,,21,"07:20AM","09:30AM","Keep 21KM runners on the Promenade in the drection of the Lighthouse."
362,,,"Wedaad Adams","Walmer AC","082 575 5353","naj.physio@gmail.com",,,21,"07:20AM","09:30AM","Keep 21KM runners on the Promenade in the drection of the Lighthouse."
363,,,"Najmee Marlie","Walmer AC","082 831 2799","najmee.marlie@gmail.com",,,21,"07:20AM","09:30AM","Guide the 21KM runners onto Beach Road and pavement in the direction of the Lighthouse."
364,,,"Zaheer Jacobs","Walmer AC","O83 546 6802","zaheerjac@gmail.com",,,21,"07:20AM","09:30AM","Guide 21KM and 10KM runners down Beach Road towards Lghthouse. Control cars access to Bill Peters Drive next to Shell Garage."
365,,,"Imraan Kahaar","Walmer AC","826,673,195","imraankahaar@gmail.com",,,21,"07:20AM","09:30AM","Guide 21KM and 10KM runners down Beach Road towards Lghthouse. Control cars access to Bill Peters Drive next to Shell Garage."
356,,,"Wajdi Kader","Walmer AC","082 375 0395","kadcon.consultants@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Guide the 21KM runners around the construction work on the Promenade."
357,,,"Rashida Kader","Walmer AC","083 777 4747","Rashidakader1411@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Guide the 21KM runners around the construction work on the Promenade."
358,,,"Waseem Matthews","Walmer AC","084 444 3817","waseemct@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Guide the 21KM runners around the construction work on the Promenade."
359,,,"Shaheedah Ismail","Walmer AC","072 629 3913","shaheedahismail@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Keep 21KM runners on the Promenade in the drection of the Lighthouse."
360,,,"Nafeesa Ismail","Walmer AC","071 389 3062","nafeesaismail15@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Keep 21KM runners on the Promenade in the drection of the Lighthouse."
361,,,"Rayaan Williams","Walmer AC","076 085 9303","raywilliamsct@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Keep 21KM runners on the Promenade in the drection of the Lighthouse."
362,,,"Wedaad Adams","Walmer AC","082 575 5353","naj.physio@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Keep 21KM runners on the Promenade in the drection of the Lighthouse."
363,,,"Najmee Marlie","Walmer AC","082 831 2799","najmee.marlie@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Guide the 21KM runners onto Beach Road and pavement in the direction of the Lighthouse."
364,,,"Zaheer Jacobs","Walmer AC","083 546 6802","zaheerjac@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Guide 21KM and 10KM runners down Beach Road towards Lghthouse. Control cars access to Bill Peters Drive next to Shell Garage."
365,,,"Imraan Kahaar","Walmer AC","082 667 3195","imraankahaar@gmail.com","Wedaad Adams","082 575 5353",21,"07:20AM","09:30AM","Guide 21KM and 10KM runners down Beach Road towards Lghthouse. Control cars access to Bill Peters Drive next to Shell Garage."
401,,,,"Nantes",,"arendse.nikki@gmail.com","Nikki Arendse","067 018 2239",10,"7:30AM","09:06AM","Guide outgoing 10KM runners around the island to the mountain side of Beach Road towards Camps Bay."
402,,,,"Nantes",,"arendse.nikki@gmail.com","Nikki Arendse","067 018 2239",10,"7:30AM","09:06AM","Guide outgoing 10KM runners around the island to the mountain side of Beach Road towards Camps Bay."
403,,,,"Nantes",,"arendse.nikki@gmail.com","Nikki Arendse","067 018 2239",10,"7:30AM","09:06AM","Guide returning 10KM runners to the sea side lane closest to pools."
@ -364,16 +364,16 @@
575,,,,"Midas Spartans",,"midasspartansac@gmail.com","Racine Hendriks","072 709 6085",21,"07:06AM","09:06AM","Keep runners on the sea side lane of Kloof Road on inside of cones (especially on the bends); Kloof Road is open to traffic towards town."
576,,,,"Midas Spartans",,"midasspartansac@gmail.com","Racine Hendriks","072 709 6085",21,"07:06AM","09:06AM","Keep runners on the sea side lane of Kloof Road on inside of cones (especially on the bends); Kloof Road is open to traffic towards town."
577,,,,"Midas Spartans",,"midasspartansac@gmail.com","Racine Hendriks","072 709 6085",21,"07:06AM","09:06AM","Keep runners on the sea side lane of Kloof Road on inside of cones (especially on the bends); Kloof Road is open to traffic towards town."
"Ask Me",,,"Gouwa Hoosain","Walmer AC","084 586 7196","gouwahsn39@gmail.com",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Shawaal Barendse","Walmer AC","0828504393","shawaal.b@live.com",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Haniyah Isaacs","Walmer AC","076 660 6232","haniyahisaacs@gmail.com",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Mogamat Mia","Walmer AC","072 128 4600","faghmieda.mia@ebv.com",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Faghmieda Mia","Walmer AC","082 900 0886","faghmieda.mia@ebv.com",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Fatima Tayob","Walmer AC","083 566 1533","info@feelfabulash.co.za",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Firza Adams","Walmer AC","072 595 9832","Firzaadams18@gmail.com",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Ebrahim Kleinsmith","Walmer AC","083 271 4146","ebrahim.kleinsmith@libertyhealth.net",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Nafeesa Salie","Walmer AC","083 448 5991","nafeesas@taquanta.com",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Regana Salie","Walmer AC","084 706 2067","regana.salie@gmail.com",,,"Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Gouwa Hoosain","Walmer AC","084 586 7196","gouwahsn39@gmail.com","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Shawaal Barendse","Walmer AC","082 850 4393","shawaal.b@live.com","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Haniyah Isaacs","Walmer AC","076 660 6232","haniyahisaacs@gmail.com","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Mogamat Mia","Walmer AC","072 128 4600","faghmieda.mia@ebv.com","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Faghmieda Mia","Walmer AC","082 900 0886","faghmieda.mia@ebv.com","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Fatima Tayob","Walmer AC","083 566 1533","info@feelfabulash.co.za","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Firza Adams","Walmer AC","072 595 9832","Firzaadams18@gmail.com","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Ebrahim Kleinsmith","Walmer AC","083 271 4146","ebrahim.kleinsmith@libertyhealth.net","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Nafeesa Salie","Walmer AC","083 448 5991","nafeesas@taquanta.com","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Ask Me",,,"Regana Salie","Walmer AC","084 706 2067","regana.salie@gmail.com","Wedaad Adams","082 575 5353","Ask Me","05:00AM","08:30AM",
"Captain","William","van Dugteren","William Ruijsch van Dugteren","AAC","082 774 1980","willvand@iafrica.com",,,,,,
"Captain","Keith","Bake","Keith Bake","AAC","083 245 8757","bake@polka.co.za",,,,,,
"Captain","Graham","Westcott","Graham Westcott","AAC","078 423 6295","graham@junotecs.com",,,,,,

1 position firstname surname name club phone email captain captain_phone races first_runner last_runner instructions
187 353 Eerste River raphaeljm@12gmail.com Raphael Manual 084 494 4525 21 & 10 06:57AM 08:30AM Direct 21KM runners to turn left into Clarens Road.
188 354 Eerste River raphaeljm@12gmail.com Raphael Manual 084 494 4525 21 & 10 06:57AM 08:30AM Direct 21KM runners to turn left into Clarens Road.
189 355 Eerste River raphaeljm@12gmail.com Raphael Manual 084 494 4525 21 & 10 06:57AM 08:30AM Direct 21KM runners to turn left into Clarens Road.
190 356 Wajdi Kader Walmer AC 082 375 0395 kadcon.consultants@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Guide the 21KM runners around the construction work on the Promenade.
191 357 Rashida Kader Walmer AC 083 777 4747 Rashidakader1411@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Guide the 21KM runners around the construction work on the Promenade.
192 358 Waseem Matthews Walmer AC O84 444 3817 084 444 3817 waseemct@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Guide the 21KM runners around the construction work on the Promenade.
193 359 Shaheedah Ismail Walmer AC 072 629 3913 shaheedahismail@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Keep 21KM runners on the Promenade in the drection of the Lighthouse.
194 360 Nafeesa Ismail Walmer AC O71 389 3062 071 389 3062 nafeesaismail15@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Keep 21KM runners on the Promenade in the drection of the Lighthouse.
195 361 Rayaan Williams Walmer AC 076 085 9303 raywilliamsct@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Keep 21KM runners on the Promenade in the drection of the Lighthouse.
196 362 Wedaad Adams Walmer AC 082 575 5353 naj.physio@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Keep 21KM runners on the Promenade in the drection of the Lighthouse.
197 363 Najmee Marlie Walmer AC 082 831 2799 najmee.marlie@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Guide the 21KM runners onto Beach Road and pavement in the direction of the Lighthouse.
198 364 Zaheer Jacobs Walmer AC O83 546 6802 083 546 6802 zaheerjac@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Guide 21KM and 10KM runners down Beach Road towards Lghthouse. Control cars’ access to Bill Peters Drive next to Shell Garage.
199 365 Imraan Kahaar Walmer AC 826,673,195 082 667 3195 imraankahaar@gmail.com Wedaad Adams 082 575 5353 21 07:20AM 09:30AM Guide 21KM and 10KM runners down Beach Road towards Lghthouse. Control cars’ access to Bill Peters Drive next to Shell Garage.
200 401 Nantes arendse.nikki@gmail.com Nikki Arendse 067 018 2239 10 7:30AM 09:06AM Guide outgoing 10KM runners around the island to the mountain side of Beach Road towards Camps Bay.
201 402 Nantes arendse.nikki@gmail.com Nikki Arendse 067 018 2239 10 7:30AM 09:06AM Guide outgoing 10KM runners around the island to the mountain side of Beach Road towards Camps Bay.
202 403 Nantes arendse.nikki@gmail.com Nikki Arendse 067 018 2239 10 7:30AM 09:06AM Guide returning 10KM runners to the sea side lane closest to pools.
364 575 Midas Spartans midasspartansac@gmail.com Racine Hendriks 072 709 6085 21 07:06AM 09:06AM Keep runners on the sea side lane of Kloof Road on inside of cones (especially on the bends); Kloof Road is open to traffic towards town.
365 576 Midas Spartans midasspartansac@gmail.com Racine Hendriks 072 709 6085 21 07:06AM 09:06AM Keep runners on the sea side lane of Kloof Road on inside of cones (especially on the bends); Kloof Road is open to traffic towards town.
366 577 Midas Spartans midasspartansac@gmail.com Racine Hendriks 072 709 6085 21 07:06AM 09:06AM Keep runners on the sea side lane of Kloof Road on inside of cones (especially on the bends); Kloof Road is open to traffic towards town.
367 Ask Me Gouwa Hoosain Walmer AC 084 586 7196 gouwahsn39@gmail.com Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
368 Ask Me Shawaal Barendse Walmer AC 0828504393 082 850 4393 shawaal.b@live.com Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
369 Ask Me Haniyah Isaacs Walmer AC 076 660 6232 haniyahisaacs@gmail.com Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
370 Ask Me Mogamat Mia Walmer AC 072 128 4600 faghmieda.mia@ebv.com Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
371 Ask Me Faghmieda Mia Walmer AC 082 900 0886 faghmieda.mia@ebv.com Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
372 Ask Me Fatima Tayob Walmer AC 083 566 1533 info@feelfabulash.co.za Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
373 Ask Me Firza Adams Walmer AC 072 595 9832 Firzaadams18@gmail.com Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
374 Ask Me Ebrahim Kleinsmith Walmer AC 083 271 4146 ebrahim.kleinsmith@libertyhealth.net Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
375 Ask Me Nafeesa Salie Walmer AC 083 448 5991 nafeesas@taquanta.com Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
376 Ask Me Regana Salie Walmer AC 084 706 2067 regana.salie@gmail.com Wedaad Adams 082 575 5353 Ask Me 05:00AM 08:30AM
377 Captain William van Dugteren William Ruijsch van Dugteren AAC 082 774 1980 willvand@iafrica.com
378 Captain Keith Bake Keith Bake AAC 083 245 8757 bake@polka.co.za
379 Captain Graham Westcott Graham Westcott AAC 078 423 6295 graham@junotecs.com

View File

@ -1,5 +1,7 @@
#!/usr/bin/perl
#
# Tool to clean up marshal spreadsheet data, 2017
#
use strict;
use warnings;

View File

@ -16,8 +16,11 @@ use File::Basename;
use Try::Tiny;
use Data::Dumper;
my $email_csv = '/home/tim/Documents/Projects/2017/Gun Run/maps/GIS base files and routes/marshals_by_position.csv';
my $pdf_dir = '/home/tim/Documents/Projects/2017/Gun Run/maps/GIS base files and routes/marshals/';
print "Please type your email password: ";
my $password = <STDIN>;
my $email_csv = '/home/tim/Documents/Projects/2018/Gun Run/maps/GIS base files and routes/marshals_by_position.csv';
my $pdf_dir = '/home/tim/Documents/Projects/2018/Gun Run/maps/GIS base files and routes/Marshals/';
my $debug = 1;
my @emails;
@ -55,21 +58,26 @@ foreach my $person (@emails) {
my $salutation = $$person{"first_name"};
my $name = $$person{"name"};
my $email = $$person{"email"};
my $club = $$person{"club"};
next unless $email =~ /@/;
my $position = $$person{"position"};
#next if ($position =~ /^(68|306|302|74)$/i);
# if ($position =~ /^(26|27)$/i) {
# warn "NOTE: Skipped position $position";
# next;
# }
foreach my $m (split(/[, ]+/, $email)) {
$m = "$name <$m>";
printf "%-4s %-15s %15s\n", $$person{"position"}, $salutation, $m if ($debug <= 0);
printf "%-4s %-15s %15s\n", $$person{"position"}, $salutation, $m if ($debug >= 0);
$m = 'Timothy Allen <tim@allen.org.za>' if ($debug == 1);
my $pdf = $pdf_dir . $$person{"club"} . '_marshal_map_' . $position . '.pdf';
my $jpg = $pdf_dir . $$person{"club"} . '_marshal_map_' . $position . '.jpg';
my $pdf = $pdf_dir . $club . '_marshal_map_' . $position . '.pdf';
my $jpg = $pdf_dir . $club . '_marshal_map_' . $position . '.jpg';
my $pdf_filename = basename($pdf);
my $jpg_filename = basename($jpg);
die "No PDF at $pdf_filename" unless -e $pdf;
die "No JPG at $jpg_filename" unless -e $jpg;
my $html = qq(
<html><head>
@ -88,7 +96,7 @@ Attached to this email is a map that gives your marshalling position. <b>You are
</p>
<p>
If you have any trouble opening the attachment, the map is available online as a <a href="http://node.org.za/GunRun2017/AAC/$pdf_filename">PDF document</a> and a <a href="http://node.org.za/GunRun2017/AAC/$jpg_filename">JPEG image</a>.
If you have any trouble opening the attachment, the map is available online as a <a href="http://node.org.za/GunRun2018/$club/$pdf_filename">PDF document</a> and an <a href="http://node.org.za/GunRun2018/$club/$jpg_filename">image</a>.
</p>
<p>
@ -120,7 +128,7 @@ Thank you for helping out at this year's Gun Run!
Attached to this email is a map that gives your marshalling position. You are in position $position. It's important to be in place by 6AM on the day, as the police and traffic officials will be conducting spot checks at that point, and if any marshal is not in position, they may call off the race or delay it.
If you have any trouble opening the attachment, the map is available online as a PDF document at <http://node.org.za/GunRun2017/AAC/$pdf_filename> and as a JPG image at <http://node.org.za/GunRun2017/AAC/$jpg_filename>.
If you have any trouble opening the attachment, the map is available online as a PDF document at <http://node.org.za/GunRun2017/AAC/$pdf_filename> and as an image at <http://node.org.za/GunRun2017/AAC/$jpg_filename>.
In addition, there is a complete route map at <http://node.org.za/GunRun2017/Gun%20Run%202017%20-%20Routes.pdf> and a map of all marshal positions at <http://node.org.za/GunRun2017/Gun%20Run%202017%20-%20Marshal%20overview.pdf>.
@ -139,7 +147,7 @@ Tim
my $mail = Email::MIME->create_html(
header => [
From => 'Timothy Allen <tim@allen.org.za>',
Subject => 'Your Gun Run 2017 marshalling position',
Subject => 'Your Gun Run 2018 marshalling position',
To => $m,
],
body => $html,
@ -149,12 +157,12 @@ Tim
my $g_transport = Email::Sender::Transport::SMTP::TLS->new(
host => 'smtp.gmail.com',
username => 'trallen@gmail.com',
password => '',
password => $password,
);
my $t_transport = Email::Sender::Transport::SMTP::TLS->new(
host => 'mail.treehouse.org.za',
username => 'tim',
password => '',
password => $password,
);
try {
sendmail($mail, { transport => $g_transport }) if ($debug <= 1);
@ -164,8 +172,8 @@ Tim
warn $_;
};
}
sleep 2 if ($debug < 1);
sleep 2 if ($debug < 1);
last if ($debug == 1);
}
# vim: paste
# vim: set expandtab shiftwidth=4 softtabstop=4 :