From: Don Armstrong Date: Tue, 11 Oct 2005 03:20:56 +0000 (+0000) Subject: add skip option X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8ad64bfab3f236b775bc87573d198875187793d0;p=bin.git add skip option --- diff --git a/get_tweekin b/get_tweekin index 68be38f..31a1366 100755 --- a/get_tweekin +++ b/get_tweekin @@ -11,8 +11,15 @@ use File::Basename qw(basename); use DB_File; use Storable qw(freeze); +use Getopt::Long; + my $OUTDIR=q(/home/don/records/tweekin); +my %options = (skip => 1); +GetOptions(\%options,'skip|s!','debug|d+','help|h|?','man|m'); + + + my $DATE=strftime(q(%Y_%m_%d),localtime(time)); my %tw_db; @@ -45,7 +52,7 @@ for my $entry (@summary) { s/\s*$//s; $_; } split m#\s*]*>#, $entry; - next if exists $tw_db{$entry{catnum}}; + next if (exists $tw_db{$entry{catnum}} and $options{skip}); push @files_to_get, $entry{mp3}; $entry{mp3} = qq(tweekin_$DATE/).basename($entry{mp3}); $tw_db{$entry{catnum}} = freeze({%entry});