annotate tsv2html.pl @ 2:e8755431a0cd draft

fixed missing dependencies
author saskia-hiltemann
date Tue, 30 Sep 2014 09:47:14 -0400
parents 440f4aa3db97
children 42076db43d42
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1 print <<END;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2 <!DOCTYPE HTML>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3 <html>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 <head>
1
440f4aa3db97 Added option to dowload iReports
saskia-hiltemann
parents: 0
diff changeset
5 <script src=\"jquery-1.10.2.js\"></script>
440f4aa3db97 Added option to dowload iReports
saskia-hiltemann
parents: 0
diff changeset
6 <script src=\"jquery-ui.js\"></script>
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 <script type="text/javascript" src="jquery.dataTables.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 <script type="text/javascript" src="iframe-resizer/js/iframeResizer.contentWindow.min.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 <script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 <!-- data tables -->
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 \$(document).ready(function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 \$('#datatable').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 "bPaginate": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 "bLengthChange": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 "bFilter": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 "bSort": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 "bInfo": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 "bAutoWidth": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 <!-- data tables -->
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 </script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 <link rel="stylesheet" type="text/css" href="jquery.dataTables.css">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 </head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 <body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 <table class="display dataTable" id="datatable" border="1" cellspacing="0" cellpadding="0" style="font-size: 12px;" >
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30 <tr><th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 END
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 chomp ($_ = <STDIN>);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 s?\t?</th><th>?g;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 print "$_</th></tr>\n";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 #print "</tr>\n</thead>\n<tbody>\n";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 print "</thead>\n<tbody>\n";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 while (<>) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 print "<tr>\n";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 my @fields = split('\t');
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 my $first=1;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 for $cell(@fields) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 if($first == 1){
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 print "<td> $cell </td>";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44 $first=0;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 elsif($cell =~ /^(\d|\s)+$/) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 print "<td align=\"right\">$cell</td>"; }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 else {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49 print "<td>$cell</td>"; } }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50 print "</tr>\n"; }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 #print "</tr>\n</tbody>\n</table></body></html>\n";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 print "</tbody>\n</table></body></html>\n";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53