Changeset a5cf43b
- Timestamp:
- Oct 2, 2010, 9:32:56 PM (14 years ago)
- Branches:
- master, debian, mac, no-cups
- Children:
- addd785
- Parents:
- fc8707b
- git-author:
- Jessica B. Hamrick <jhamrick@…> (10/02/10 21:32:56)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (10/02/10 21:32:56)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client/bin/gbr
rfc8707b ra5cf43b 11 11 use Getopt::Long; 12 12 use Image::ExifTool qw(ImageInfo); 13 use List::Util 'shuffle'; 13 14 14 15 # the usage for this script … … 18 19 -q, --queue Specify a queue other than the default 19 20 -d, --dryrun Just list what would be done 21 -r, --random Randomize the order that the songs are queued in 20 22 -h, --help Print this message 21 23 USAGE … … 25 27 my $dryrun = 0; 26 28 my $help = 0; 29 my $random = 0; 27 30 28 31 # parse the options 29 32 GetOptions ('q|queue=s' => \$q, 30 33 'd|dryrun' => \$dryrun, 31 'h|help' => \$help); 34 'h|help' => \$help, 35 'r|random' => \$random); 32 36 33 37 # if the -h flag was passed, then print the usage and exit … … 37 41 } 38 42 43 # get the files to print from the arguments 39 44 my @files = @ARGV[0 .. $#ARGV]; 45 46 # if the random flag was passed, then randomize the order of the files 47 if ($random) { 48 @files = shuffle(@files); 49 } 40 50 41 51 # if the -q option is not specified, then assume we're using the
Note: See TracChangeset
for help on using the changeset viewer.