Sha256: d5548817e17787ac044f88571ff32a916a4a87273adb9834cf0c2c5a0447932f
Contents?: true
Size: 870 Bytes
Versions: 1
Compression:
Stored size: 870 Bytes
Contents
#!/usr/bin/env ruby require "track_list" require 'track_list/template_parser' require 'getoptlong' opts = GetoptLong.new( [ '--help', '-h', GetoptLong::NO_ARGUMENT ] ) opts.each do |opt, arg| case opt when '--help' puts <<-EOF Usage: tracklist <album-directory> e.g. tracklist "Music/The Menzingers/After the Party" -h, --help: show help EOF end end if ARGV.length != 1 puts "Missing album directory (try --help)" exit 0 end dir = TrackList::DirectoryParser.new(ARGV[0]) template_parser = TrackList::TemplateParser.new # Let's create a default config file if one does not exist. unless template_parser.config_exists? template_parser.create_default_config end # Loop over each track and output to terminal. dir.parse.each do |track| puts track.parse if track.parse.is_a? String end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
track_list-0.3.0 | bin/tracklist |