X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=blobdiff_plain;f=bin%2Fparse_ward_data;h=2a5848e56720362a92a8d089d7bfffca2ed5218b;hb=ea8cefec49ed49ffb2f9d08885368daca684abec;hp=aeca0223e920ab0cfc12c90e1fef0c74f839e09e;hpb=b569f0e85df791ecd13ed18a9378424bbd570558;p=eq%2F.git diff --git a/bin/parse_ward_data b/bin/parse_ward_data index aeca022..2a5848e 100755 --- a/bin/parse_ward_data +++ b/bin/parse_ward_data @@ -10,20 +10,7 @@ else { require "db_config"; } %hometeaching_data = (); %membership_data = (); -getopts('vsn:o:b'); - -$monthname2num{'Jan'} = '01'; -$monthname2num{'Feb'} = '02'; -$monthname2num{'Mar'} = '03'; -$monthname2num{'Apr'} = '04'; -$monthname2num{'May'} = '05'; -$monthname2num{'Jun'} = '06'; -$monthname2num{'Jul'} = '07'; -$monthname2num{'Aug'} = '08'; -$monthname2num{'Sep'} = '09'; -$monthname2num{'Oct'} = '10'; -$monthname2num{'Nov'} = '11'; -$monthname2num{'Dec'} = '12'; +getopts('vsn:o'); ###################################################################### # SUBROUTINES @@ -68,22 +55,6 @@ sub print_hash } } -###################################################################### -sub print_birthdays -{ - my ($hashref) = @_; - - foreach $key (sort {$a <=> $b} keys %$hashref) { - $name = ""; - $birthday = ""; - foreach $field (keys %{$hashref->{$key}}) { - if($field =~ /Full Name/) { $name = $hashref->{$key}{$field}; } - if($field =~ /Birth/) { $birthday = $hashref->{$key}{$field}; } - } - if($name ne "" && $birthday ne "") { printf "%-30s %-10s\n",$name,$birthday; } - } -} - ###################################################################### # MAIN ###################################################################### @@ -112,8 +83,6 @@ if($opt_v) { &print_hash(\%hometeaching_data); } -if($opt_b) { &print_birthdays(\%membership_data); } - if($opt_s) { $dbh->disconnect(); exit; } ###################################################