earworm 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -0
- data/Rakefile +1 -0
- data/bin/earworm +10 -1
- data/lib/earworm.rb +2 -1
- metadata +3 -3
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/bin/earworm
CHANGED
@@ -5,11 +5,20 @@ require 'earworm'
|
|
5
5
|
require 'yaml'
|
6
6
|
|
7
7
|
CONFIG = File.join(File.expand_path(ENV['HOME']), '.earworm')
|
8
|
-
|
8
|
+
begin
|
9
|
+
config = YAML.load_file(CONFIG)
|
10
|
+
rescue
|
11
|
+
raise "Please create a .earworm file in your home directory"
|
12
|
+
end
|
9
13
|
|
10
14
|
(puts("USAGE: #{$0} unknown_file") || exit) unless ARGV[0]
|
11
15
|
|
16
|
+
begin
|
12
17
|
ew = Earworm::Client.new(config['key'])
|
18
|
+
rescue
|
19
|
+
raise "\n\nYou need to generate a key here: http://www.musicip.com/dns/license.jsp\n then put the key into your .earworm file like this:
|
20
|
+
key: 012321312AA\n"
|
21
|
+
end
|
13
22
|
track =
|
14
23
|
if File.exists?(ARGV[0])
|
15
24
|
ew.identify(:file => ARGV[0])
|
data/lib/earworm.rb
CHANGED
@@ -7,9 +7,10 @@ require 'earworm/fingerprint'
|
|
7
7
|
require 'earworm/client'
|
8
8
|
require 'rexml/document'
|
9
9
|
require 'rexml/parsers/pullparser'
|
10
|
+
require 'net/http'
|
10
11
|
|
11
12
|
module Earworm
|
12
|
-
VERSION = '0.0.
|
13
|
+
VERSION = '0.0.2'
|
13
14
|
URL = 'http://ofa.musicdns.org/ofa/1/track'
|
14
15
|
class << self
|
15
16
|
def ofa_version
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: earworm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-08-
|
12
|
+
date: 2008-08-05 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.7.0
|
34
34
|
version:
|
35
|
-
description: Earworm can identify unknown music using MusicDNS and libofa.
|
35
|
+
description: "Earworm can identify unknown music using MusicDNS and libofa. == FEATURES/PROBLEMS: * Identifies mp3, ogg, and wav files. == SYNOPSIS: Identify an unknown audio file: ew = Earworm::Client.new('MY Music DNS Key') info = ew.identify(:file => '/home/aaron/unknown.wav') puts \"#{info.artist_name} - #{info.title}\""
|
36
36
|
email:
|
37
37
|
- aaronp@rubyforge.org
|
38
38
|
executables:
|