changeset 0:58f2fb2b8794 draft

"planemo upload for repository https://forge.inrae.fr/dairyfit/lot2/dairyfit-toolbox commit 95eac72b74db1401ea6c60705beb66f35ba03b22"
author siwaa
date Mon, 23 Feb 2026 14:12:21 +0000
parents
children 6622d8503a60
files mergeclim.xml
diffstat 1 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mergeclim.xml	Mon Feb 23 14:12:21 2026 +0000
@@ -0,0 +1,38 @@
+<tool id="mergeClim" name="mergeClim" version="1.0.0">
+    <description>
+        to merge Stics climate files archives tgz to a single zip, and choose meshes to keep
+    </description>
+    <command detect_errors="exit_code">
+      mkdir toArchive;
+      #for $i, $input in enumerate($inputData)
+      echo '${input}'; echo '${input.name}';
+      cp '${input}' 'tmp_${i}.tgz';
+      mkdir toArchive/climDir${i};
+      tar -xvf 'tmp_${i}.tgz' -C 'toArchive/climDir${i}';
+      #end for
+      tree;
+      mkdir Clim;
+      cat ${listOfMesh} | xargs -t -i find . -type f -name {}* | xargs -t -i cp {} Clim; 
+      zip -r Clim Clim;
+      mv Clim.zip ${output};
+    </command>
+    <inputs>
+      <param name="inputData" type="data" format="tgz" multiple="true" label="a tgz archive of Stics Climate files"/>
+      <param name="listOfMesh" type="data" format="txt" label="list of mesh"/>
+    </inputs>
+    <outputs>
+        <data format="zip" name="output" label="SticsClimateFiles"/>
+    </outputs>
+    <tests>
+    </tests>
+    <help>
+the mergeClim Tool
+==================
+
+credits
+-------
+-  Wrapper Maintainer: Patrick Chabrier patrick.chabrier@inrae.fr
+-  Tool Site: https://forgemia.inra.fr/dairyfit/lot2/dairyfit-toolbox
+-  Copyright: INRAE
+    </help>
+</tool>