Skip to content

Commit

Permalink
complete project rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ahk committed Oct 10, 2010
1 parent fd2a80e commit 7cce736
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 18 deletions.
16 changes: 12 additions & 4 deletions README
@@ -1,11 +1,17 @@
Ruby ID3 Sort
MusicCache

The idea of this program is to take an unsorted music folded and move all the tracks to a destination based on the ID3 tagging.
You have a lot of music files (mp3 support only for now). You want to know what you have, where you have it, and what shape it's in (duplicates, encodings, size, track completion, mislabelings).

You'd also like to be able to query this data, for use in other programs – say a web based music player like FTANG (http://github.com/maxogden/ftang).

You could use MusicCache to do these things!

Music cache is written in ruby, and stores in Redis (<= 2.0).

it is executed by:
ruby music_parser.rb origin destination enact
ruby music-cache.rb origin destination enact
e.g.
ruby music_parser.rb /home/TheDevelopment/unsorted /home/TheDevelopment/Music enact
ruby music-cache.rb /home/YourUser/unsorted /home/YourUser/Music enact

By removing the 'enact' word, the program does a dry run.

Expand All @@ -27,3 +33,5 @@ IMPORTANT DEPENDENCY INFO (I will not be a dependency coward. Join me.):

And uses the ruby implementation of Levenshtein distance, which can be found at:
http://rubyforge.org/frs/?group_id=6257

This program was originally inspired by TheDevelopment's ruby-id3-sort, and still resembles it in a few places. please see http://github.com/TheDevelopment/ruby-id3-sort
2 changes: 1 addition & 1 deletion bin/music_parser.rb → bin/music-cache.rb
Expand Up @@ -16,4 +16,4 @@
require "lib/album"
require "lib/track"

MusicParser::Runner.new.run
MusicCache::Runner.new.run
2 changes: 1 addition & 1 deletion bin/test_run
Expand Up @@ -4,5 +4,5 @@ collection_name = 'test'
test_src = %Q("/Users/andrew/Music/iTunes/iTunes Music/Animal Collective")
test_dst = %Q("/Users/andrew/test_music_sort")

sh = %Q(ruby bin/music_parser.rb #{cmd} #{collection_name} #{test_src} #{test_dst})
sh = %Q(ruby bin/music-cache.rb #{cmd} #{collection_name} #{test_src} #{test_dst})
exec(sh)
2 changes: 1 addition & 1 deletion lib/album.rb
@@ -1,4 +1,4 @@
module MusicParser
module MusicCache
class Album

attr_accessor :name, :tracks
Expand Down
2 changes: 1 addition & 1 deletion lib/analyzer.rb
@@ -1,4 +1,4 @@
module MusicParser
module MusicCache
class Analyzer
def initialize(db)
@db = db
Expand Down
2 changes: 1 addition & 1 deletion lib/artist.rb
@@ -1,4 +1,4 @@
module MusicParser
module MusicCache
class Artist

attr_accessor :name, :albums
Expand Down
2 changes: 1 addition & 1 deletion lib/collection.rb
@@ -1,5 +1,5 @@

module MusicParser
module MusicCache
class Collection

attr_accessor :name, :artists
Expand Down
2 changes: 1 addition & 1 deletion lib/database.rb
@@ -1,6 +1,6 @@
require 'redis'

module MusicParser
module MusicCache
class Database
# stats
REDIS_ERRORS_KEY = 'errors'
Expand Down
2 changes: 1 addition & 1 deletion lib/error_set.rb
@@ -1,4 +1,4 @@
module MusicParser
module MusicCache
class ErrorSet

attr_accessor :error_folders, :error_type, :msg
Expand Down
2 changes: 1 addition & 1 deletion lib/folder.rb
Expand Up @@ -3,7 +3,7 @@
require 'unicode'
require 'mp3info'

module MusicParser
module MusicCache
class Folder

ERROR_TYPES = [
Expand Down
2 changes: 1 addition & 1 deletion lib/levenshtein.rb
Expand Up @@ -8,7 +8,7 @@
end
end

module MusicParser
module MusicCache

# The Levenshtein distance is a metric for measuring the amount
# of difference between two sequences (i.e., the so called edit
Expand Down
2 changes: 1 addition & 1 deletion lib/logger.rb
@@ -1,4 +1,4 @@
module MusicParser
module MusicCache
class Logger
def initialize(db, folders, collection)
@db = db
Expand Down
2 changes: 1 addition & 1 deletion lib/runner.rb
@@ -1,4 +1,4 @@
module MusicParser
module MusicCache
class Runner
attr_accessor :root_dir, :folders, :scan_path, :destination

Expand Down
2 changes: 1 addition & 1 deletion lib/scanner.rb
@@ -1,4 +1,4 @@
module MusicParser
module MusicCache
class Scanner
def initialize(scan_path, folders, collection)
@scan_path = scan_path
Expand Down
2 changes: 1 addition & 1 deletion lib/track.rb
@@ -1,4 +1,4 @@
module MusicParser
module MusicCache
class Track

attr_accessor :path, :tags
Expand Down

0 comments on commit 7cce736

Please sign in to comment.