Changeset 619 in quafit
- Timestamp:
- Feb 13, 2016, 10:45:20 PM (6 years ago)
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
genapp_modifier/parser_gennap_modifier.pl
r616 r619 5 5 6 6 7 my $file = '/home/alexey/ QuaFit/Commented/quatest_commented.dat';7 my $file = '/home/alexey/genapptest/quafit/module_generator/quatest_tags.dat'; 8 8 9 9 if ( !@ARGV ) … … 35 35 while (my $line = <$fh>) { 36 36 my $line_copy = $line; 37 chomp $line; 38 #print OUT $line; 39 40 if ($line =~ /:/ && $line !~ m/:$/) 37 #chomp $line; 38 39 if ($line_copy =~ m/#TAG/) 41 40 { 41 $line =~ s/#TAG//; 42 chomp $line; 43 42 44 my $id = (split(/[:]/, $line))[0]; 43 45 my $dval = (split(/[:]/, $line))[-1]; 44 46 47 #print OUT "TAG: $id : $dval \n\n"; 48 45 49 $dval =~ s/\s+$//; 46 50 $dval =~ s/^\s*(.*?)\s*$/$1/; # remove whitespace from both ends … … 56 60 57 61 58 59 62 if ( length $id_key ) 60 63 { … … 62 65 $label_key =~ tr/a-zA-Z0-9_(\/)[] //cd; 63 66 $label_key =~ s/^\s*(.*?)\s*$/$1/; 64 if ( $label_key =~ m/(1\/0)/ )67 if ( $label_key =~ m/(1\/0)/ ) 65 68 { 66 69 $id_key =~ s/_10//ig; 67 70 if ($dval == 0 && !(exists $ref->{$id_key})) # Solved problem with checkboxes!! 68 71 { 69 print OUT $line_copy; 72 $line_copy =~ s/#TAG//; 73 chomp $line_copy; 74 $line_copy =~ s/\s+$//; 75 print OUT $line_copy ."\n"; 76 } 77 if ($dval == 1 && !(exists $ref->{$id_key})) # Solved problem with checkboxes!! 78 { 79 print OUT "$id:0\n"; 70 80 } 71 81 … … 97 107 98 108 close OUT; 109 close OUT1; 110 99 111 100 112 print encode_json( $res ); -
module_generator/parser_mod_sorted.pl
r618 r619 5 5 6 6 7 #my $file = 'qua last_cut.dat';7 #my $file = 'quatest_tags.dat'; 8 8 9 9 if ( !@ARGV ) … … 19 19 open(my $fh, '<', $file) or die "Can't read file '$file' [$!]\n"; 20 20 while (my $line = <$fh>) { 21 chomp $line;22 if ($line =~ /:/ && $line !~ m/:$/)21 #chomp $line; 22 if ($line =~ m/#TAG/) 23 23 { 24 $line =~ s/#TAG//; 25 chomp $line; 26 27 #if ($line =~ /:/ && $line !~ m/:$/) 28 #{ 24 29 ++$num; 25 30 my $id = (split(/[:]/, $line))[0]; … … 58 63 print "\# this is a module file, any module specific info belongs here 59 64 { 60 \"moduleid\" : \"quafit_ module\",65 \"moduleid\" : \"quafit_test\", 61 66 \"label\" : \"QuaFit\", 62 67 \"help\" : \"help_module\", … … 105 110 \"required\" : \"true\", 106 111 \"help\" : \"\" 107 } "112 }," 108 113 ; 109 if ( $a < $size)110 {111 print ",";112 }113 114 # if ( $a < $size) 115 # { 116 # print ","; 117 # } 118 } 114 119 else 115 120 { 116 print "117 118 121 print " 122 { 123 \"role\" : \"input\", 119 124 \"id\" : \"$id_key\", 120 125 \"label\" : \"$label_key\", 121 126 \"type\" : \"text\", 122 127 \"default\" : \"$value\", 123 \"required\" : \"true\",124 \"help\" : \"\"125 }"126 ;127 if ( $a < $size)128 {129 print ",";130 }128 \"required\" : \"true\", 129 \"help\" : \"\" 130 }," 131 ; 132 # if ( $a < $size) 133 # { 134 # print ","; 135 # } 131 136 } 132 137 } 138 print " 139 { 140 \"role\" : \"output\", 141 \"id\" : \"outputfile\", 142 \"label\" : \"Quafit Output\", 143 \"type\" : \"file\" 144 }" 145 ; 146 147 133 148 print " 134 149 ], \n 135 \"executable\" : \" your_executable\",150 \"executable\" : \"parser_gennap_modifier.pl\", 136 151 \"submitpolicy\" : \"all\" 137 152 }\n"
Note: See TracChangeset
for help on using the changeset viewer.