Sha256: 3a627d94c0c8b6ab150ceb1fa66f73a37aea8dac087358955d6d9ce1b146864a

Contents?: true

Size: 1.27 KB

Versions: 7

Compression:

Stored size: 1.27 KB

Contents

#!/usr/bin/env ruby

require 'mikeplayer'

options = {}
OptionParser.new do |opt|
  opt.banner = <<-EOF
   Usage: MikePlayer.rb [options] <search || file>

   Example: `MikePlayer.rb --shuffle --directory /User/Catman/Music cats /MyMusic/GreatestBand-Song.mp3`
     Finds all songs matching 'cats' in directory /User/Catman/Music ignoring case
      and specific song /MyMusic/GreatestBand-Song.mp3
      and randomizes the order

  EOF
  opt.on('-s', '--shuffle', 'Shuffle playlist.') { |o| options[:shuffle] = true }
  opt.on('-r', '--random n', 'Create playlist with randomly picked n songs.') { |o| options[:random] = o.to_i }
  opt.on('-o', '--overwrite', 'Overwrite playlist.') { |o| options[:overwrite] = true }
  opt.on('-v', '--volume n', 'Changes default volume.') { |o| options[:volume] = o }
  opt.on('-p', '--playlist name', 'Play playlist name.') { |o| options[:playlist] = o }
  opt.on('-l', '--list', 'List songs in playlist.') { |o| options[:list] = true; }
  opt.on('-d', '--directory name', 'Directory to find mp3s.') { |o| options[:directory] = o }
  opt.on('-t', '--time minutes', 'Limit time to number of minutes.') { |o| options[:minutes] = o }
  opt.on('-x', '--debug', 'Turn on debug.') { |o| options[:debug] = true }
end.parse!

MikePlayer::Player.new(options, ARGV).play

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mikeplayer-1.1.1 bin/MikePlayer.rb
mikeplayer-1.1.0 bin/MikePlayer.rb
mikeplayer-1.0.8 bin/MikePlayer.rb
mikeplayer-1.0.7 bin/MikePlayer.rb
mikeplayer-1.0.6 bin/MikePlayer.rb
mikeplayer-1.0.5 bin/MikePlayer.rb
mikeplayer-1.0.4 bin/MikePlayer.rb