- Timestamp:
- 2013-10-21T20:57:25+13:00 (11 years ago)
- File:
-
- 1 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";
Note:
See TracChangeset
for help on using the changeset viewer.