comparison bundle_collection.pl @ 2:705ebd286b57 draft default tip

"planemo upload commit 7761f1e59039279728185e751f1a51b56fe14cb0"
author nml
date Mon, 24 Aug 2020 12:14:15 -0400
parents bae199dc511f
children
comparison
equal deleted inserted replaced
1:cd6da887a5f4 2:705ebd286b57
1 #!/usr/bin/perl 1 #!/usr/bin/env perl
2 2
3 use strict; 3 use strict;
4 use warnings; 4 use warnings;
5 use File::Copy; 5 use File::Copy;
6 use File::Basename; 6 use File::Basename;
50 my $num_keys = scalar(keys %information); 50 my $num_keys = scalar(keys %information);
51 my $num_vals = scalar(@args); 51 my $num_vals = scalar(@args);
52 52
53 printf $out "<!DOCTYPE html> 53 printf $out "<!DOCTYPE html>
54 <html> 54 <html>
55 <style type=\"text/css\"> 55 <head>
56 <style type=\"text/css\">
57
58 body {
59 font-family: sans-serif;
60 color: #000;
61 }
62
63 table {
64 margin-left: 3em;
65 text-align: center;
66 }
67 th {
68 text-align:center;
69 background-color: #000080;
70 color: #FFF;
71 padding: 0.4em;
72 }
73 td {
74 font-family: monospace;
75 text-align: left;
76 background-color: #EEE;
77 color: #000;
78 padding: 0.4em;
79 }
80 h2 {
81 color: #800000;
82 padding-bottom: 0;
83 margin-bottom: 0;
84 clear: left;
85 }
86 </style>
87 </head>
56 88
57 body { 89 <body>
58 font-family: sans-serif;
59 color: #000;
60 }
61 90
62 table { 91 <h2 id=\"M0\">Bundle Collection Summary</h2><br><br>
63 margin-left: 3em;
64 text-align: center;
65 }
66 th {
67 text-align:center;
68 background-color: #000080;
69 color: #FFF;
70 padding: 0.4em;
71 }
72 td {
73 font-family: monospace;
74 text-align: left;
75 background-color: #EEE;
76 color: #000;
77 padding: 0.4em;
78 }
79 h2 {
80 color: #800000;
81 padding-bottom: 0;
82 margin-bottom: 0;
83 clear: left;
84 }
85 </style></head>
86 92
87 <body> 93 Number of keys: $num_keys<br>
94 Number of values: $num_vals<br><br>
88 95
89 <h2 id=\"M0\">Bundle Collection Summary</h2><br><br> 96 <table border=\"1\">
90 97 <tr><th>File name</th><th>File type</th></tr>\n";
91 Number of keys: $num_keys<br>
92 Number of values: $num_vals<br><br>
93
94 <table border=\"1\"><tr><th>File name</th><th>File type</th></tr>";
95 98
96 foreach my $key (sort(keys %information)) 99 foreach my $key (sort(keys %information))
97 { 100 {
98 101
99 foreach my $val (keys %{$information{$key}} ) 102 foreach my $val (keys %{$information{$key}} )
100 { 103 {
101 printf $out "<tr><td>$key</td><td>$val</td></tr>"; 104 printf $out " <tr><td>$key</td><td>$val</td></tr>\n";
102 } 105 }
103 } 106 }
104 107
105 printf $out "</table></body></html>"; 108 printf $out " </table>\n</body>\n</html>";
106 109
107 close $out; 110 close $out;
108 111
109 __END__ 112 __END__
110 113
112 115
113 bundle_collection.pl - Downloads a collection from Galaxy 116 bundle_collection.pl - Downloads a collection from Galaxy
114 117
115 =head1 SYNOPSIS 118 =head1 SYNOPSIS
116 119
117 bundle_collection.pl -h html_file -p output_path -o "key=value" 120 bundle_collection.pl -h html_file -p output_path -i "key=value"
118 121
119 =back 122 =back
120 =cut 123 =cut