# HG changeset patch # User bgruening # Date 1733755000 0 # Node ID 10ef1bf99074e3546720e176fb2b1d1f7ebc3394 # Parent 156d0908e232bd67c4e8256eb984f40c195c7c1a planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/diff commit 1a6c4a793ef68a43de93316523c1cd9196d80b73 diff -r 156d0908e232 -r 10ef1bf99074 diff.xml --- a/diff.xml Fri Mar 12 16:22:44 2021 +0000 +++ b/diff.xml Mon Dec 09 14:36:40 2024 +0000 @@ -1,7 +1,7 @@ - + analyzes two files and generates an unidiff text file with information about the differences and an optional Html report - 3.7 + 3.10 0 @@ -13,10 +13,18 @@ '$diff_file'; - #if $generate_report: + diff + #if $report_format.report_format_select == 'txt_lines' or $report_format.report_format_select == 'html' + ## the -u option is needed to convert the output later to HTML + --unified=$report_format.unified + #else if $report_format.report_format_select == 'txt_columns' + -y + #end if + ## If the compared input files differ the diff command returns exit-code 1 + '$input1' '$input2' > '$diff_file' || [ \$? -eq 1 ]; + #if $report_format.report_format_select == 'html' sed -e 's/@@title@@/Diff report for "$input1.element_identifier" and "$input2.element_identifier"/g' - -e 's/@@outputformat@@/'$output_format'/g' + -e 's/@@outputformat@@/'$report_format.output_format'/g' -e '/@@diffoutput@@/{r'$diff_file'' -e ';d}' '$__tool_directory__/template.html' > '$html_file' #end if @@ -25,33 +33,50 @@ - - - - - + + + + + + + + + + + + + + + + + + - generate_report is True + report_format['report_format_select'] == 'html' - + + + - + - + + + @@ -63,7 +88,9 @@ - + + + @@ -73,8 +100,10 @@ - - + + + + @@ -85,8 +114,10 @@ - - + + + + @@ -95,9 +126,12 @@ - - - + + + + + + @@ -169,4 +203,4 @@ } - + \ No newline at end of file diff -r 156d0908e232 -r 10ef1bf99074 test-data/file 3.txt --- a/test-data/file 3.txt Fri Mar 12 16:22:44 2021 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -c diff -r 156d0908e232 -r 10ef1bf99074 test-data/file3.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/file3.txt Mon Dec 09 14:36:40 2024 +0000 @@ -0,0 +1,1 @@ +c diff -r 156d0908e232 -r 10ef1bf99074 test-data/output_test4.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_test4.txt Mon Dec 09 14:36:40 2024 +0000 @@ -0,0 +1,2 @@ +a a + > b