1 files changed, 11 insertions(+), 1 deletions(-)

M bin/overham/ccimport.pl
M bin/overham/ccimport.pl +11 -1
@@ 30,7 30,8 @@ sub main {
 		my $successCount = processLines(\@lines, \%info);
 		if ($successCount == scalar(@lines)) {
 			printf(STDERR "Success! %d entities processed\n", scalar(@lines));
-			print Dumper \%info;
+			#print Dumper \%info;
+			makeInserts(\%info);
 			return 0;
 		} elsif ($successCount < scalar(@lines)) {
 			printf(STDERR "Only %d of %d entries were great success\n",

          
@@ 48,6 49,15 @@ sub main {
 
 }
 
+sub makeInserts {
+	my ($info) = @_;
+
+	while (my ($ident, $hash) = each(%$info)) {
+		printf("INSERT INTO cc (cc, en, type) VALUES('%s', '%s', '%s');\n",
+		    $ident, $info->{$ident}->{fullDesc}, $info->{$ident}->{fullDesc});
+	}
+}
+
 sub processLines {
 	my ($lines, $info) = @_;
 	my $lineCount = 0;