From 1886c7247cb16ed68a78cd5550b152689a465999 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 31 Oct 2016 15:54:17 -0500 Subject: [PATCH] remove convert_to_xls and .sa_bin --- .sa_bin | 1 - convert_to_xls | 96 -------------------------------------------------- 2 files changed, 97 deletions(-) delete mode 100644 .sa_bin delete mode 100755 convert_to_xls diff --git a/.sa_bin b/.sa_bin deleted file mode 100644 index bd7b830..0000000 --- a/.sa_bin +++ /dev/null @@ -1 +0,0 @@ -~/bin diff --git a/convert_to_xls b/convert_to_xls deleted file mode 100755 index 1e75b66..0000000 --- a/convert_to_xls +++ /dev/null @@ -1,96 +0,0 @@ -#! /usr/bin/perl -# conver_to_xls converts tab separated files to xls and is released -# under the terms of the GPL version 2, or any later version, at your -# option. See the file README and COPYING for more information. -# Copyright 2008 by Don Armstrong . -# $Id: perl_script 1153 2008-04-08 00:04:20Z don $ - - -use warnings; -use strict; - -use Getopt::Long; -use Pod::Usage; - -=head1 NAME - -convert_to_xls - convert tab separated files to xls - -=head1 SYNOPSIS - -convert_to_xls tsv_file1 [tsv_file2] [options] > foo.xls - - Options: - --debug, -d debugging level (Default 0) - --help, -h display this help - --man, -m display manual - -=head1 OPTIONS - -=over - -=item B<--debug, -d> - -Debug verbosity. (Default 0) - -=item B<--help, -h> - -Display brief useage information. - -=item B<--man, -m> - -Display this manual. - -=back - -=head1 EXAMPLES - - -=cut - -use Spreadsheet::WriteExcel; -use IO::File; - -use vars qw($DEBUG); - -my %options = (debug => 0, - help => 0, - man => 0, - ); - -GetOptions(\%options, - 'debug|d+','help|h|?','man|m'); - -pod2usage() if $options{help}; -pod2usage({verbose=>2}) if $options{man}; - -$DEBUG = $options{debug}; - -my @USAGE_ERRORS; -if (not @ARGV) { - push @USAGE_ERRORS,"You must give at least one file"; -} - -pod2usage(join("\n",@USAGE_ERRORS)) if @USAGE_ERRORS; - -my @FILES=@ARGV; -@ARGV=(); - -my $wb = Spreadsheet::WriteExcel->new(\*STDOUT) or die "Unable to create new spreadsheet"; -for my $file (@FILES) { - my $fh = IO::File->new($file,'r') or die "Unable to open $file for reading: $!"; - my $ws = $wb->add_worksheet($file) or die "Unable to create new worksheet"; - my $row = 1; - while (<$fh>) { - chomp; - my @row = map {s/^"//; s/"$//; $_} split /\t/,$_; - for my $col (0..$#row) { - $ws->write($row,$col+1,$row[$col]); - } - $row++; - } -} -$wb->close; - - -__END__ -- 2.39.2