Changeset 36706 for trunk/ippToPsps/config/parse_vot.pl
- Timestamp:
- Apr 30, 2014, 11:43:09 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/config/parse_vot.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/config/parse_vot.pl
r36697 r36706 3 3 # this thing will just parse the votables and print out in 'ken schema style' 4 4 5 $wiki=1;6 5 #$wiki=1; 6 $csv = 1; 7 7 $infield = 0; 8 8 $intable = 0; … … 33 33 if($datatype eq "long") {$datatype1 = "BIGINT 8";} 34 34 35 35 if ($csv) { 36 $datatype1 =~ s/ .//; 37 38 } 36 39 37 40 if ($_ =~ /.*default=\"/) { … … 49 52 if ($wiki) { 50 53 printf("||%-17s|| %-15s|| %-15s || %-5s||",$name, $unit, $datatype1, $default); 51 } els e{52 printf("%-17s %-15s %-15s %-5s",$name, $unit, $datatype1, $default);54 } elsif ($csv) { 55 printf("%s,%s,%s,%s,\"",$name, $unit, $datatype1, $default); 53 56 } 54 57 55 58 56 59 $infield = 1; … … 68 71 if ($_ =~ /\<\/FIELD/) { 69 72 if ($wiki) { print "||";} 73 if ($csv) {print "\"";} 70 74 print "\n"; 71 75 $infield = 0; 72 76 } 73 77 74 78 } else { 75 79 #not in field something new … … 80 84 $name =~ s/\".*//g; 81 85 $intable = 1; 82 print "---------------------------\n"; 83 printf ("%-16s ", $name); 86 if ($csv) { 87 print "$name\n"; 88 } else { 89 print "---------------------------\n"; 90 printf ("%-16s ", $name); 91 } 84 92 } else { 85 93 if ($intable) { 86 if ($_ =~ /\<\/DESCRIPTION/) { 87 $t = $_; 88 chomp $t; 89 $t =~ s/\s+\<DESCRIPTION\>//; 90 $t =~ s/\<\/DESCRIPTION\>//; 91 print "$t\n"; 92 print "---------------------------\n"; 93 $intable = 1; 94 if ($_ =~ /\<\/DESCRIPTION/) { 95 $t = $_; 96 chomp $t; 97 $t =~ s/\s+\<DESCRIPTION\>//; 98 $t =~ s/\<\/DESCRIPTION\>//; 99 if ($csv) { 100 $dostuff = 1; 101 } else { 102 print "$t\n"; 103 print "---------------------------\n"; 104 } 105 $intable = 1; 106 107 } 108 109 } 110 } 111 if ($_ =~ /\<\/TABLE\>/) { 112 $intable = 0; 94 113 } 95 114 96 } 97 if ($_ =~ /\<\/TABLE\>/) { 98 $intable = 0; 99 } 100 } 101 115 102 116 } 103 117 }
Note:
See TracChangeset
for help on using the changeset viewer.
