# HG changeset patch # User imgteam # Date 1681498961 0 # Node ID 57f0914ddb7b281b40983264709b8e9b685ace7b # Parent 38eec75fbe9b73f4151da73a3ef034dd19324013 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/unzip/ commit a8d89b9ebc13951944dcec84323464692837bba7 diff -r 38eec75fbe9b -r 57f0914ddb7b test-data/input_binary.zip Binary file test-data/input_binary.zip has changed diff -r 38eec75fbe9b -r 57f0914ddb7b test-data/subfolders.zip Binary file test-data/subfolders.zip has changed diff -r 38eec75fbe9b -r 57f0914ddb7b test-data/yelp Binary file test-data/yelp has changed diff -r 38eec75fbe9b -r 57f0914ddb7b test-data/yes Binary file test-data/yes has changed diff -r 38eec75fbe9b -r 57f0914ddb7b unzip.xml --- a/unzip.xml Fri Aug 02 07:21:01 2019 -0400 +++ b/unzip.xml Fri Apr 14 19:02:41 2023 +0000 @@ -1,88 +1,125 @@ - - Unzip file - - unzip - tar - - - + Unzip a file + + 6.0 + 0 + 22.01 + + + unzip + tar + + + out.data - #else - "$input_file" -d out/ - #end if + unzip + #if $extract_options['extract_all'] == 'False' + -p '$input_file' '$extract_options["pathtofile"]' > out.data + #else + '$input_file' -d out/ + #end if #end if #if $input_file.is_of_type("tar"): - tar - #if $extract_options['extract_all'] == 'False' - xfO "$input_file" "$extract_options['pathtofile']" > out.data - #else - -xf "$input_file" -C ./out/ - #end if + tar + #if $extract_options['extract_all'] == 'False' + xfO '$input_file' '$extract_options["pathtofile"]' > out.data + #else + -xf '$input_file' -C ./out/ + #end if #end if - ]]> - - - - - - - - - - - - '..' not in value - ',' not in value - '*' not in value - str(value)[0] != '/' - - - - - - - extract_options['extract_all'] == 'False' + && + + ## Flatten any potential directory structure, e.g. + ## out/sub1/subsub2/fileA.ext -> out/sub1_subsub2_fileA.ext + find out -type f | cut -d '/' -f 2- | grep '/' | xargs -I % sh -c "mv out/% out/\\$(echo % | tr / _)" + ]]> + + + + + + + + + + + + '..' not in value + ',' not in value + '*' not in value + str(value)[0] != '/' + + + + + + + extract_options['extract_all'] == 'False' - - - extract_options['extract_all'] == 'True' + + + + extract_options['extract_all'] == 'True' - - - + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - **What it does** - - Unzip folder to collection. - - - 10.1016/j.jbiotec.2017.07.019 - + + + **What it does** + + Unzip a folder containing file(s) of various types. If multiple files are asked to be retained, the output will be a collection containing all files within the zip or tar archive. + + + 10.1016/j.jbiotec.2017.07.019 +