changeset 323:74e0675300de misc

Remove useless utility, the functionality has been integrated into parsematerial.pl
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 31 Dec 2015 00:05:35 +0200
parents 1f3fd2d0831b
children b4f34ae41008
files materials/csv2transtab.pl
diffstat 1 files changed, 0 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/materials/csv2transtab.pl	Wed Dec 30 23:17:46 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Generate translation table from CSV format material data
-# Developed by Matti Hämäläinen (Ggr Pupunen) <ccr@tnsp.org>
-# (C) Copyright 2006-2010 Tecnic Software productions (TNSP)
-#
-# The generated table needs to be manually sorted in "sane" way,
-# the different adjectives cannot be heuristically sorted here.
-#
-use strict;
-
-my %data = ();
-
-while (<STDIN>) {
-  chomp;
-  if (my @tmp = /^([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z ]+);([a-z -]+);([a-z ]+);([a-zA-Z ]+);(Yes|No);([A-Z][a-z]+);([a-z, ]+);([a-z, ]+);$/) {
-    my $n = 2;
-    for (my $i = 1; $i <= 17; $i++, $n++) {
-      $data{$n}{$tmp[$i]}=1;
-    }
-    for (my $i = 18; $i <= 19; $i++, $n++) {
-      foreach my $t (split(/, */, $tmp[$i])) {
-        $data{$n}{$t} = 1;
-      }
-    }
-  } else {
-    print STDERR "$0: ERROR: $_\n";
-  }
-}
-
-print "my %matTransTable = (\n";
-
-foreach my $a (sort { $a <=> $b } keys %data) {
-  print "  $a => {\n";
-  my $i = 0;
-  foreach my $b (keys %{$data{$a}}) {
-    print "    \"$b\" => $i,\n";
-    $i++;
-  }
-  print "  },\n";
-}
-print ");\n";