Sha256: 2fd5b2b78e9827cc912ebcdb051f4149084d4b0fb0edd358f665ddab16acfd2b

Contents?: true

Size: 931 Bytes

Versions: 8

Compression:

Stored size: 931 Bytes

Contents

#!/usr/bin/ruby
require 'mp3tag'

def getList(dir)
  Dir::chdir(dir)

  # Find the files in this directory
  Dir['*mp3'].each { |file|
	 if(FileTest::file?(file))
		mp3tag = Mp3Tag::new(Dir::getwd()+"/"+file)
		if(mp3tag.songname.length > 0)
		  puts("#{Dir::getwd()+"/"+file}||#{mp3tag.songname}||#{mp3tag.artist}||#{mp3tag.album}||#{mp3tag.year}||#{mp3tag.comment}||#{mp3tag.tracknum}||#{mp3tag.genre_id}||#{mp3tag.genre}")
		else
		  name = Dir::getwd()+"/"+file
		  name =~ /([^\/]+)\.mp3$/
		  puts("#{Dir::getwd()+"/"+file}||#{$1}||#{mp3tag.artist}||#{mp3tag.album}||#{mp3tag.year}||#{mp3tag.comment}||#{mp3tag.tracknum}||#{mp3tag.genre_id}||#{mp3tag.genre}")
		end
	 end
  }

  Dir['*'].each { |entry|
	 if(FileTest::directory?(entry))
		getList(entry)
	 end
  }
  Dir::chdir('..')
end

# Change current directory to user supplied one
Dir::chdir(ARGV[0])
getList(ARGV[0])

#song = Mp3Tag::new(ARGV[0])
#puts song.songname()

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
rwdaddresses-0.98 extras/makePlaylist
rwdaddresses-0.99 extras/makePlaylist
rwdaddresses-1.01 extras/makePlaylist
rwddemo-0.91 extras/makePlaylist
rwdschedule-0.97 extras/makePlaylist
rwdschedule-0.98 extras/makePlaylist
rwdshell-0.97 extras/makePlaylist
rwdshell-0.96 extras/makePlaylist