Repository 'compress_file'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/compress_file

Changeset 0:09ea79f9f260 (2022-02-04)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/compress_file commit f987c41d41d5df8021f6a8d52012d1bee374d6a7"
added:
compress_file.xml
test-data/1.csv
test-data/1.csv.gz
b
diff -r 000000000000 -r 09ea79f9f260 compress_file.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compress_file.xml Fri Feb 04 21:22:36 2022 +0000
[
@@ -0,0 +1,29 @@
+<tool id="compress_file" name="Compress file(s)" version="0.1.0">
+    <requirements>
+        <requirement type="package" version="1.11">gzip</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        gzip -cf ${input} > output_file.gz
+    ]]></command>
+    <inputs>
+        <param name="input" type="data" format="data" label="Select data to compress"/>
+    </inputs>
+    <outputs>
+        <data name="output_file" format="gz" from_work_dir="output_file.gz" label="GZIP compression on ${on_string}"/>
+    </outputs>
+    <tests>
+        <!-- Single input -->
+        <test expect_num_outputs="1">
+            <param name="input" value="1.csv"/>
+            <output name="output_file" file="1.csv.gz" compare="sim_size"/>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input" value="1.csv"/>
+            <output name="output_file" file="1.csv" decompress="true"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+        Compress files with gzip. If compressing a collection, all elements within that collection will be compressed, but the collection itself will not be.
+    ]]></help>
+    <citations/>
+</tool>
\ No newline at end of file
b
diff -r 000000000000 -r 09ea79f9f260 test-data/1.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/1.csv Fri Feb 04 21:22:36 2022 +0000
b
b'@@ -0,0 +1,1 @@\n+Transaction_date,Product,Price,Payment_Type,Name,City,State,Country,Account_Created,Last_Login,Latitude,Longitude\r1/2/09 6:17,Product1,1200,Mastercard,carolina,Basildon,England,United Kingdom,1/2/09 6:00,1/2/09 6:08,51.5,-1.1166667\r1/2/09 4:53,Product1,1200,Visa,Betina,Parkville                   ,MO,United States,1/2/09 4:42,1/2/09 7:49,39.195,-94.68194\r1/2/09 13:08,Product1,1200,Mastercard,Federica e Andrea,Astoria                     ,OR,United States,1/1/09 16:21,1/3/09 12:32,46.18806,-123.83\r1/3/09 14:44,Product1,1200,Visa,Gouya,Echuca,Victoria,Australia,9/25/05 21:13,1/3/09 14:22,-36.1333333,144.75\r1/4/09 12:56,Product2,3600,Visa,Gerd W ,Cahaba Heights              ,AL,United States,11/15/08 15:47,1/4/09 12:45,33.52056,-86.8025\r1/4/09 13:19,Product1,1200,Visa,LAURENCE,Mickleton                   ,NJ,United States,9/24/08 15:19,1/4/09 13:04,39.79,-75.23806\r1/4/09 20:11,Product1,1200,Mastercard,Fleur,Peoria                      ,IL,United States,1/3/09 9:38,1/4/09 19:45,40.69361,-89.58889\r1/2/09 20:09,Product1,1200,Mastercard,adam,Martin                      ,TN,United States,1/2/09 17:43,1/4/09 20:01,36.34333,-88.85028\r1/4/09 13:17,Product1,1200,Mastercard,Renee Elisabeth,Tel Aviv,Tel Aviv,Israel,1/4/09 13:03,1/4/09 22:10,32.0666667,34.7666667\r1/4/09 14:11,Product1,1200,Visa,Aidan,Chatou,Ile-de-France,France,6/3/08 4:22,1/5/09 1:17,48.8833333,2.15\r1/5/09 2:42,Product1,1200,Diners,Stacy,New York                    ,NY,United States,1/5/09 2:23,1/5/09 4:59,40.71417,-74.00639\r1/5/09 5:39,Product1,1200,Amex,Heidi,Eindhoven,Noord-Brabant,Netherlands,1/5/09 4:55,1/5/09 8:15,51.45,5.4666667\r1/2/09 9:16,Product1,1200,Mastercard,Sean ,Shavano Park                ,TX,United States,1/2/09 8:32,1/5/09 9:05,29.42389,-98.49333\r1/5/09 10:08,Product1,1200,Visa,Georgia,Eagle                       ,ID,United States,11/11/08 15:53,1/5/09 10:05,43.69556,-116.35306\r1/2/09 14:18,Product1,1200,Visa,Richard,Riverside                   ,NJ,United States,12/9/08 12:07,1/5/09 11:01,40.03222,-74.95778\r1/25/09 17:58,Product2,3600,Visa,carol,Ann Arbor                   ,MI,United States,7/5/08 9:20,2/7/09 18:51,42.27083,-83.72639\r1/9/09 14:37,Product1,1200,Visa,Nona,South Jordan                ,UT,United States,1/8/09 15:14,2/7/09 19:11,40.56222,-111.92889\r1/25/09 2:46,Product2,3600,Visa,Family,Dubai,Dubayy,United Arab Emirates,1/8/09 1:19,2/8/09 2:06,25.2522222,55.28\r1/17/09 20:46,Product2,3600,Visa,Michelle,Dubai,Dubayy,United Arab Emirates,4/13/08 2:36,2/8/09 2:12,25.2522222,55.28\r1/24/09 7:18,Product2,3600,Visa,Kathryn,Kirriemuir,Scotland,United Kingdom,1/23/09 10:31,2/8/09 2:52,56.6666667,-3\r1/11/09 7:09,Product1,1200,Visa,Oswald,Tramore,Waterford,Ireland,10/13/08 16:43,2/8/09 3:02,52.1588889,-7.1463889\r1/8/09 4:15,Product1,1200,Visa,Elyssa,Gdansk,Pomorskie,Poland,1/7/09 15:00,2/8/09 3:50,54.35,18.6666667\r1/22/09 10:47,Product1,1200,Visa,michelle,Arklow,Wicklow,Ireland,11/18/08 1:32,2/8/09 5:07,52.7930556,-6.1413889\r1/26/09 20:47,Product1,1200,Mastercard,Alicia,Lincoln                     ,NE,United States,6/24/08 8:05,2/8/09 7:29,40.8,-96.66667\r1/12/09 12:22,Product1,1200,Mastercard,JP,Tierp,Uppsala,Sweden,1/6/09 11:34,2/8/09 11:15,60.3333333,17.5\r1/26/09 1:44,Product2,3600,Visa,Geraldine,Brussels,Brussels (Bruxelles),Belgium,1/31/08 13:28,2/8/09 14:39,50.8333333,4.3333333\r1/18/09 12:57,Product1,1200,Mastercard,sandra,Burr Oak                    ,IA,United States,1/24/08 16:11,2/8/09 15:30,43.45889,-91.86528\r1/24/09 21:26,Product1,1200,Visa,Olivia,Wheaton                     ,IL,United States,5/8/08 16:02,2/8/09 16:00,41.86611,-88.10694\r1/26/09 12:26,Product2,3600,Mastercard,Tom,Killeen                     ,TX,United States,1/26/09 5:23,2/8/09 17:33,31.11694,-97.7275\r1/5/09 7:37,Product1,1200,Visa,Annette ,Manhattan                   ,NY,United States,9/26/08 4:29,2/8/09 18:42,40.71417,-74.00639\r1/14/09 12:33,Product1,1200,Visa,SUSAN,Oxford,England,United Kingdom,9/11/08 23:23,2/8/09 23:00,51.75,-1.25\r1/14/09 0:15,Product2,3600'..b'verpool,England,United Kingdom,12/22/08 1:41,2/9/09 14:06,53.4166667,-3\r1/12/09 13:23,Product2,3600,Amex,Leila,Ponte San Nicolo,Veneto,Italy,9/13/05 8:42,2/9/09 14:09,45.3666667,11.6166667\r1/19/09 9:34,Product1,1200,Amex,amanda,Las Vegas                   ,NV,United States,5/10/08 8:56,2/9/09 16:44,36.175,-115.13639\r1/9/09 7:49,Product1,1200,Visa,Stacy,Rochester Hills             ,MI,United States,7/28/08 7:18,2/9/09 17:41,42.68056,-83.13389\r1/15/09 5:27,Product2,3600,Visa,Derrick,North Bay,Ontario,Canada,1/6/09 17:42,2/9/09 18:22,46.3,-79.45\r1/8/09 23:40,Product1,1200,Visa,Jacob,Lindfield,New South Wales,Australia,1/8/09 17:52,2/9/09 18:31,-33.7833333,151.1666667\r1/27/09 11:02,Product1,1200,Mastercard,DOREEN,Madrid,Madrid,Spain,1/24/09 8:21,2/9/09 18:42,40.4,-3.6833333\r1/14/09 13:23,Product1,1200,Diners,eugenia,Wisconsin Rapids            ,WI,United States,11/15/08 13:57,2/9/09 18:44,44.38361,-89.81722\r1/7/09 20:01,Product1,1200,Visa,Karen,Austin                      ,TX,United States,1/6/09 19:16,2/9/09 19:56,30.26694,-97.74278\r1/20/09 12:32,Product1,1200,Visa,Bea,Chicago                     ,IL,United States,1/16/09 19:08,2/9/09 20:42,41.85,-87.65\r1/6/09 14:35,Product1,1200,Diners,Hilde Karin,Las Vegas                   ,NV,United States,12/17/08 11:59,2/9/09 22:59,36.175,-115.13639\r1/4/09 6:51,Product1,1200,Visa,Rima,Mullingar,Westmeath,Ireland,1/3/09 12:34,2/10/09 0:59,53.5333333,-7.35\r1/24/09 18:30,Product1,1200,Visa,Ruangrote,Melbourne,Victoria,Australia,7/17/08 5:19,2/10/09 2:12,-37.8166667,144.9666667\r1/25/09 5:57,Product1,1200,Amex,pamela,Ayacucho,Buenos Aires,Argentina,1/24/09 9:29,2/10/09 6:38,-37.15,-58.4833333\r1/5/09 10:02,Product2,3600,Visa,Emillie,Eagan                       ,MN,United States,1/5/09 9:03,2/10/09 7:29,44.80417,-93.16667\r1/13/09 9:14,Product1,1200,Visa,sangeeta,Vossevangen,Hordaland,Norway,1/9/09 9:31,2/10/09 9:04,60.6333333,6.4333333\r1/22/09 7:35,Product1,1200,Visa,Anja,Ferney-Voltaire,Rhone-Alpes,France,1/22/09 6:51,2/10/09 9:18,46.25,6.1166667\r1/2/09 11:06,Product1,1200,Mastercard,Andrew,Sevilla,Andalucia,Spain,3/12/06 15:02,2/10/09 10:04,37.3772222,-5.9869444\r1/11/09 9:50,Product1,1200,Visa,Bato,Munchengosserstadt,Thuringia,Germany,1/7/09 11:45,2/10/09 10:28,51.05,11.65\r1/21/09 20:44,Product1,1200,Mastercard,Ailsa ,Lindenhurst                 ,NY,United States,1/21/09 7:47,2/10/09 10:51,40.68667,-73.37389\r1/5/09 9:09,Product1,1200,Visa,Sophie,Bloomfield                  ,MI,United States,10/23/06 6:52,2/10/09 10:58,42.53778,-83.23306\r1/5/09 12:41,Product1,1200,Visa,Katrin,Calgary,Alberta,Canada,12/3/08 14:49,2/10/09 11:45,51.0833333,-114.0833333\r1/28/09 12:54,Product2,3600,Mastercard,Kelly ,Vancouver,British Columbia,Canada,1/27/09 21:04,2/10/09 12:09,49.25,-123.1333333\r1/21/09 4:46,Product1,1200,Visa,Tomasz,Klampenborg,Kobenhavn,Denmark,6/10/08 11:25,2/10/09 12:22,55.7666667,12.6\r1/7/09 13:28,Product1,1200,Visa,Elizabeth,Calne,England,United Kingdom,1/4/09 13:07,2/10/09 12:39,51.4333333,-2\r1/27/09 11:18,Product2,3600,Amex,Michael,Los Angeles                 ,CA,United States,1/23/09 11:47,2/10/09 13:09,34.05222,-118.24278\r1/7/09 12:39,Product2,3600,Visa,Natasha,Milano,Lombardy,Italy,6/2/06 13:01,2/10/09 13:19,45.4666667,9.2\r1/24/09 13:54,Product2,3600,Mastercard,Meredith,Kloten,Zurich,Switzerland,1/24/09 12:30,2/10/09 13:47,47.45,8.5833333\r1/30/09 6:48,Product1,1200,Mastercard,Nicole,Fayetteville                ,NC,United States,1/30/09 4:51,2/10/09 14:41,35.0525,-78.87861\r1/22/09 18:07,Product1,1200,Visa,Ryan,Simpsonville                ,SC,United States,1/6/09 16:59,2/10/09 15:30,34.73694,-82.25444\r1/29/09 15:03,Product1,1200,Visa,Mary ,Auckland,Auckland,New Zealand,2/9/06 11:14,2/10/09 16:31,-36.8666667,174.7666667\r1/2/09 14:14,Product1,1200,Diners,Aaron,Reading,England,United Kingdom,11/16/08 15:49,2/10/09 16:38,51.4333333,-1\r1/19/09 11:05,Product1,1200,Visa,Bertrand,North Caldwell              ,NJ,United States,10/3/08 5:55,2/10/09 18:16,40.83972,-74.27694\r\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 09ea79f9f260 test-data/1.csv.gz
b
Binary file test-data/1.csv.gz has changed