use 5.012; use String::Diff; use strict; use warnings; my $aff_print; my $aff_print1; my $outpath; my $data; my $source; my $mismatch_aff; my $nomismatch_aff; my $outpath1; my $prooftxt; my $proftxt; my $jnl; my $artno; my $aidno; my $xmlpath; my $xml_miss; my $xmltxt; my $xmtxt; my $filename; my $diff; ###### OUT PATH DETAILS ######$jnl=$ARGV[0]; $artno=$ARGV[1]; $outpath=$ARGV[2]; $proftxt=$ARGV[3]; $outpath=~s#T:/PGN/#G:/FROM_3B2/#gi; $outpath=~s#(.+\/.+\)\/)(.+)#$1#gi; $outpath1= $outpath; mkdir "$outpath1"; $outpath= $outpath1; $outpath .= 'affprint.html'; if ($proftxt=~m#)#$2#g; $aff_print=$2; }else {if (!-e $outpath){$data="
| ARTICLE ID<\/th> | FILE MISSING IN PATH<\/th> | S100 OUTPUT<\/th> | F300 OUTPUT<\/th> | DIFFERENCES<\/th><\/tr><\/thead> | ||
|---|---|---|---|---|---|---|
| $jnl$artno | NO AFF_PRINT IN 3D | |||||
| $jnl$artno | NO AFF_PRINT IN 3D |
| ARTICLE ID<\/th> | FILE MISSING IN PATH<\/th> | S100 OUTPUT<\/th> | F300 OUTPUT<\/th> | DIFFERENCES<\/th><\/tr><\/thead> | ||
|---|---|---|---|---|---|---|
| $jnl$artno | XML FILE MISSING | |||||
| $jnl$artno | XML FILES MISSING |
| ARTICLE ID<\/th> | FILE MISSING IN PATH<\/th> | S100 OUTPUT<\/th> | F300 OUTPUT<\/th> | DIFFERENCES<\/th><\/tr><\/thead> | ||
|---|---|---|---|---|---|---|
| $jnl$artno | NO MISMATCH FOUND | |||||
| $jnl$artno | NO MISMATCH FOUND |
| ARTICLE ID<\/th> | FILE MISSING IN PATH<\/th> | S100 OUTPUT<\/th> | F300 OUTPUT<\/th> | DIFFERENCES<\/th><\/tr><\/thead> | ||
|---|---|---|---|---|---|---|
| $jnl$artno | $aff_print1<\/td> | $aff_print<\/td> | <\/td><\/tr>"; my $diff = String::Diff::diff_merge("$aff_print1", "$aff_print", remove_open => '', remove_close => '', append_open => '', append_close => '', ); $mismatch_aff=~s#( | <\/td>)# | $diff<\/td>#g; $data=~s#(<\/tbody><\/table>)#$mismatch_aff$1#g; &print_outpath(); } else { $mismatch_aff=" | |
| $jnl$artno | $aff_print1<\/td> | $aff_print<\/td> | <\/td><\/tr>"; my $diff = String::Diff::diff_merge("$aff_print1", "$aff_print", remove_open => '', remove_close => '', append_open => '', append_close => '', ); $mismatch_aff=~s#( | <\/td>)# | $diff<\/td>#g; &read_outpath(); $data=~s#(<\/tbody><\/table>)#$mismatch_aff$1#g; &print_outpath(); }}}else {}}else {}sub read_outpath{open FILE, "<$outpath"; read FILE, $data, 100000000; close FILE; }sub print_outpath{open FILE, ">$outpath"; print FILE $data; close FILE; }exit; |