poddb_client 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +3 -1
- data/lib/poddb_client/downloading.rb +8 -2
- data/lib/poddb_client/version.rb +1 -1
- metadata +1 -1
data/README.markdown
CHANGED
@@ -24,7 +24,7 @@ website or iTunes. Poddb serves these three goals.
|
|
24
24
|
* Ruby 1.9.x
|
25
25
|
* wget
|
26
26
|
* curl
|
27
|
-
* mplayer or
|
27
|
+
* mplayer, iTunes, or other media player
|
28
28
|
|
29
29
|
To install Ruby 1.9.2, I recommend using the [RVM Version Manager][rvm].
|
30
30
|
|
@@ -277,11 +277,13 @@ Please submit them here:
|
|
277
277
|
Poddb has two parts, a client and a server. The client is a hybrid
|
278
278
|
Ruby/VimScript program packaged as a Ruby gem. The server is a Ruby
|
279
279
|
[Sinatra][sinatra] app sitting in front of a [PostgreSQL][postgres] database.
|
280
|
+
I use the [Sequel][sequel] database toolkit to interface between Ruby and SQL.
|
280
281
|
Podcast feeds are fetched with [curb][curb] and parsed with
|
281
282
|
[nokogiri][nokogiri].
|
282
283
|
|
283
284
|
[sinatra]:http://www.sinatrarb.com/
|
284
285
|
[postgres]:http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=postgresql
|
286
|
+
[sequel]:http://sequel.rubyforge.org/
|
285
287
|
[curb]:http://curb.rubyforge.org/
|
286
288
|
[nokogiri]:http://nokogiri.org/
|
287
289
|
|
@@ -8,9 +8,11 @@ class PoddbClient
|
|
8
8
|
'mplayer'
|
9
9
|
elsif ENV['PODDB_MEDIA_PLAYER']
|
10
10
|
ENV['PODDB_MEDIA_PLAYER']
|
11
|
-
|
11
|
+
elsif RUBY_PLATFORM =~ /darwin/i
|
12
12
|
# This fallback with open iTunes on OS X
|
13
13
|
'open'
|
14
|
+
else
|
15
|
+
nil
|
14
16
|
end
|
15
17
|
|
16
18
|
def titleize(s, maxlength=20)
|
@@ -55,7 +57,11 @@ class PoddbClient
|
|
55
57
|
item_id = File.read(DOWNLOAD_AND_PLAY_FILE).strip
|
56
58
|
abort("No item id found") if item_id !~ /\d/
|
57
59
|
download item_id
|
58
|
-
|
60
|
+
if MEDIA_PLAYER
|
61
|
+
exec("#{MEDIA_PLAYER} #@filename")
|
62
|
+
else
|
63
|
+
puts "No media player found to play the file!"
|
64
|
+
end
|
59
65
|
end
|
60
66
|
end
|
61
67
|
end
|
data/lib/poddb_client/version.rb
CHANGED