dhun 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +90 -15
- data/TODO.md +0 -2
- data/dhun.gemspec +41 -0
- data/lib/dhun.rb +1 -1
- data/lib/dhun/handler.rb +2 -2
- data/lib/dhun/runner.rb +2 -0
- metadata +3 -2
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
## Introduction
|
2
2
|
|
3
3
|
> A dhun (Hindi: धुन; literally "tune") is a light instrumental piece in the
|
4
4
|
> Hindustani classical music of North India.
|
@@ -9,24 +9,99 @@ Dhun is a minimalist commandline music player for OS X.
|
|
9
9
|
|
10
10
|
It uses Spotlight to search for audio files on your computer and play them.
|
11
11
|
|
12
|
-
|
12
|
+
## Quickstart
|
13
13
|
|
14
|
-
###
|
14
|
+
### Installing Dhun
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
Run the following commands to install Dhun. This will download the latest gem
|
17
|
+
from [http://gemcutter.org](http://gemcutter.org), compile the extensions and
|
18
|
+
put the binaries in the right place.
|
19
|
+
|
20
|
+
$ gem sources -a http://gemcutter.org
|
21
|
+
$ gem install dhun
|
22
|
+
|
23
|
+
### Starting Dhun
|
24
|
+
|
25
|
+
$ dhun start
|
26
|
+
Starting Dhun
|
27
|
+
|
28
|
+
Currently it runs in the foreground and displays a lot of random output. There
|
29
|
+
are plans to daemonize the service once the codebase has stabilized a bit, and
|
30
|
+
I have implemented some logging capabilities.
|
31
|
+
|
32
|
+
### Playing Files
|
33
|
+
|
34
|
+
Dhun uses Spotlight to query for music files. Just specify a keyword, and Dhun
|
35
|
+
will look for files matching that keyword and start playing them
|
36
|
+
|
37
|
+
$ dhun play
|
38
|
+
9 files queued for playing
|
39
|
+
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/01 40 Day Dream.mp3
|
40
|
+
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/02 Janglin.mp3
|
41
|
+
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/03 Carries On.mp3
|
42
|
+
/Users/deepak/Music/Amazon MP3/Edward Sharpe & The Magnetic Zeros/Here Comes/01 - 40 Day Dream.mp3
|
43
|
+
/Users/deepak/Music/Amazon MP3/Edward Sharpe & The Magnetic Zeros/Here Comes/02 - Janglin.mp3
|
44
|
+
/Users/deepak/Music/Amazon MP3/Edward Sharpe & The Magnetic Zeros/Here Comes/03 - Carries On.mp3
|
45
|
+
/Users/deepak/Dropbox/shared/music/Here Comes/02 - Janglin.mp3
|
46
|
+
/Users/deepak/Dropbox/shared/music/Here Comes/01 - 40 Day Dream.mp3
|
47
|
+
/Users/deepak/Dropbox/shared/music/Here Comes/03 - Carries On.mp3
|
48
|
+
|
49
|
+
More advanced querying support is coming soon.
|
50
|
+
|
51
|
+
### Controlling Playback
|
52
|
+
|
53
|
+
Pausing playback.
|
54
|
+
|
55
|
+
$ dhun pause
|
56
|
+
Dhun is paused. Next track is /Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/02 Janglin.mp3
|
57
|
+
|
58
|
+
Resuming playback
|
59
|
+
|
60
|
+
$ dhun resume
|
61
|
+
Dhun is playing. Next track is /Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/02 Janglin.mp3
|
62
|
+
|
63
|
+
Skipping to next file
|
64
|
+
|
65
|
+
$ dhun next
|
66
|
+
Dhun is playing /Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/03 Carries On.mp3
|
67
|
+
|
68
|
+
Status
|
69
|
+
|
70
|
+
$ dhun status
|
71
|
+
Dhun is running
|
72
|
+
Now playing /Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/03 Carries On.mp3
|
73
|
+
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/02 Janglin.mp3
|
74
|
+
/Users/deepak/Music/iTunes/iTunes Media/Music/Edward Sharpe & The Magnetic Zeros/Here Comes/03 Carries On.mp3
|
75
|
+
/Users/deepak/Music/Amazon MP3/Edward Sharpe & The Magnetic Zeros/Here Comes/01 - 40 Day Dream.mp3
|
76
|
+
/Users/deepak/Music/Amazon MP3/Edward Sharpe & The Magnetic Zeros/Here Comes/02 - Janglin.mp3
|
77
|
+
/Users/deepak/Music/Amazon MP3/Edward Sharpe & The Magnetic Zeros/Here Comes/03 - Carries On.mp3
|
78
|
+
/Users/deepak/Dropbox/shared/music/Here Comes/02 - Janglin.mp3
|
79
|
+
/Users/deepak/Dropbox/shared/music/Here Comes/01 - 40 Day Dream.mp3
|
80
|
+
/Users/deepak/Dropbox/shared/music/Here Comes/03 - Carries On.mp3
|
81
|
+
|
82
|
+
Enqueuing more files. Note that `dhun play` will empty the current queue
|
83
|
+
before adding new files.
|
84
|
+
|
85
|
+
$ dhun enqueue chup
|
86
|
+
1 files queued for playing.
|
22
87
|
/Users/deepak/Dropbox/shared/music/Coke Studio/Chup.mp3
|
23
|
-
5 results total
|
24
|
-
Now Playing /Users/deepak/Dropbox/shared/music/Coke Studio/Mai-Ne.mp3
|
25
88
|
|
26
|
-
|
89
|
+
### Stopping Dhun
|
90
|
+
|
91
|
+
$ dhun stop
|
92
|
+
|
93
|
+
## Coming Soon
|
94
|
+
|
95
|
+
These features are planned in the next few releases
|
27
96
|
|
28
|
-
*
|
29
|
-
|
97
|
+
* Option to run Dhun server as a daemon
|
98
|
+
* Logging
|
99
|
+
* Playing previous song, using something like `dhun prev`
|
100
|
+
* Skipping ahead by more than one file, like `dhun next 2` or `dhun prev 2`
|
101
|
+
* Advanced querying support with filters, like `dhun play "artist:Rahman"`
|
30
102
|
|
31
|
-
|
103
|
+
And someday..
|
32
104
|
|
105
|
+
* iTunes integration
|
106
|
+
* Ability to pause and play in the middle of music files.
|
107
|
+
* Displaying IDv3 information instead of just file names
|
data/dhun.gemspec
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'dhun'
|
3
|
+
s.version = '0.5.1'
|
4
|
+
s.summary = "Minimalist music for OS X"
|
5
|
+
s.date = '2009-12-08'
|
6
|
+
s.email = 'deepak.jois@gmail.com'
|
7
|
+
s.homepage = 'http://github.com/deepakjois/dhun'
|
8
|
+
s.has_rdoc = false
|
9
|
+
s.authors = ["Deepak Jois"]
|
10
|
+
# = MANIFEST =
|
11
|
+
s.files = %w[
|
12
|
+
LICENSE.txt
|
13
|
+
README.md
|
14
|
+
Rakefile
|
15
|
+
TODO.md
|
16
|
+
bin/dhun
|
17
|
+
dhun.gemspec
|
18
|
+
ext/Makefile
|
19
|
+
ext/dhun.h
|
20
|
+
ext/dhun_ext.c
|
21
|
+
ext/extconf.rb
|
22
|
+
ext/player.c
|
23
|
+
ext/query.c
|
24
|
+
lib/dhun.rb
|
25
|
+
lib/dhun/command.rb
|
26
|
+
lib/dhun/controller.rb
|
27
|
+
lib/dhun/dhun_client.rb
|
28
|
+
lib/dhun/dhun_server.rb
|
29
|
+
lib/dhun/handler.rb
|
30
|
+
lib/dhun/player.rb
|
31
|
+
lib/dhun/query.rb
|
32
|
+
lib/dhun/result.rb
|
33
|
+
lib/dhun/runner.rb
|
34
|
+
lib/dhun/server.rb
|
35
|
+
]
|
36
|
+
# = MANIFEST =
|
37
|
+
s.extensions = ["ext/extconf.rb"]
|
38
|
+
s.executables = ["dhun"]
|
39
|
+
s.require_paths = ["lib"]
|
40
|
+
s.rubyforge_project = 'dhun'
|
41
|
+
end
|
data/lib/dhun.rb
CHANGED
data/lib/dhun/handler.rb
CHANGED
@@ -57,7 +57,7 @@ module Dhun
|
|
57
57
|
def next(*args)
|
58
58
|
@player = Player.instance
|
59
59
|
next_track = @player.next
|
60
|
-
result = Result.new :success, (next_track || "No More Tracks")
|
60
|
+
result = Result.new :success, ("Dhun is playing #{next_track}" || "No More Tracks")
|
61
61
|
return result.to_json
|
62
62
|
end
|
63
63
|
|
@@ -73,7 +73,7 @@ module Dhun
|
|
73
73
|
@player = Player.instance
|
74
74
|
track = @player.queue.first
|
75
75
|
@player.play
|
76
|
-
result = Result.new :success, (track ? "Dhun is playing
|
76
|
+
result = Result.new :success, (track ? "Dhun is playing #{track}" : "No more tracks in queue.")
|
77
77
|
return result.to_json
|
78
78
|
end
|
79
79
|
end
|
data/lib/dhun/runner.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dhun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Deepak Jois
|
@@ -27,6 +27,7 @@ files:
|
|
27
27
|
- Rakefile
|
28
28
|
- TODO.md
|
29
29
|
- bin/dhun
|
30
|
+
- dhun.gemspec
|
30
31
|
- ext/Makefile
|
31
32
|
- ext/dhun.h
|
32
33
|
- ext/dhun_ext.c
|
@@ -71,6 +72,6 @@ rubyforge_project: dhun
|
|
71
72
|
rubygems_version: 1.3.5
|
72
73
|
signing_key:
|
73
74
|
specification_version: 3
|
74
|
-
summary: Minimalist
|
75
|
+
summary: Minimalist music for OS X
|
75
76
|
test_files: []
|
76
77
|
|