Changeset 28503
- Timestamp:
- 2013-10-21T20:57:25+13:00 (10 years ago)
- Location:
- main/trunk/greenstone2/bin/script
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/gti-process-spreadsheet.pl
r13318 r28503 83 83 $source_file_chunk =~ /^(\S+)\s+((.|\n)*)$/; 84 84 my $source_file_chunk_key = $1; 85 # print STDERR "******** key: |$source_file_chunk_key| "; 85 86 my $source_file_chunk_text = $2; 87 # print STDERR "******** text: |$source_file_chunk_text|\n"; 86 88 $target_file_chunk =~ /^(\S+)\s+((.|\n)*)$/; 87 89 my $target_file_chunk_key = $1; … … 90 92 # Remove the quotes around multiline chunks 91 93 if ($source_file_chunk_text =~ /^\"/ && $source_file_chunk_text =~ /\"$/) { 94 # print STDERR "******** source text: |$source_file_chunk_text| \n"; 92 95 $source_file_chunk_text =~ s/^\"//; 93 96 $source_file_chunk_text =~ s/\"$//; 94 97 } 95 98 if ($target_file_chunk_text =~ /^\"/ && $target_file_chunk_text =~ /\"$/) { 99 # print STDERR "******** target text: |$target_file_chunk_text| \n"; 96 100 $target_file_chunk_text =~ s/^\"//; 97 101 $target_file_chunk_text =~ s/\"$//; 98 102 } 103 # else { 104 # print STDERR "******** !target text: |$target_file_chunk_text| \n"; 105 # } 99 106 100 107 # Remove the blank space Excel adds at the start of each line … … 106 113 $target_file_chunk_text =~ s/\"\"/\"/g; 107 114 115 # ensure newline html entities in the unicode txt file version of the spreadsheet are replaced with newlines 116 $source_file_chunk_text =~ s/ /\n/g; 117 $target_file_chunk_text =~ s/ /\n/g; 118 108 119 print "<SourceFileText key=\"" . $source_file_chunk_key . "\">\n" . $source_file_chunk_text . "\n</SourceFileText>\n"; 109 120 print "<TargetFileText key=\"" . $target_file_chunk_key . "\">\n" . $target_file_chunk_text . "\n</TargetFileText>\n"; -
main/trunk/greenstone2/bin/script/gti.pl
r28337 r28503 669 669 670 670 # Make sure the submitted source chunk matches the source file chunk 671 if ($source_file_key_to_submission_mapping{$chunk_key} ne &unmake_text_xml_safe($source_file_key_to_text_mapping{$chunk_key})) { 671 if (&unmake_text_xml_safe($source_file_key_to_submission_mapping{$chunk_key}) ne &unmake_text_xml_safe($source_file_key_to_text_mapping{$chunk_key})) { 672 #print STDERR "**** $source_file_key_to_submission_mapping{$chunk_key}\n"; 673 #print STDERR "**** " . &unmake_text_xml_safe($source_file_key_to_text_mapping{$chunk_key}) ."\n"; 674 672 675 &log_message("Warning: Source chunk $chunk_key has changed (ignoring submission)."); 673 676 &log_message("Submission source: $source_file_key_to_submission_mapping{$chunk_key}");
Note:
See TracChangeset
for help on using the changeset viewer.