rubypodder 0.1.0 → 0.1.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 +8 -17
- data/Rakefile +1 -1
- data/lib/rubypodder.rb +3 -2
- data/tests/tc_rubypodder.rb +4 -1
- metadata +2 -2
data/README
CHANGED
|
@@ -3,25 +3,19 @@
|
|
|
3
3
|
This package contains rubypodder, a simple podcast receiver
|
|
4
4
|
inspired by bashpodder (http://linc.homeunix.org:8080/scripts/bashpodder/).
|
|
5
5
|
|
|
6
|
-
==
|
|
7
|
-
|
|
8
|
-
The latest version of rubypodder can be found at
|
|
6
|
+
== Homepage
|
|
9
7
|
|
|
10
8
|
http://rubyforge.org/projects/rubypodder/
|
|
11
9
|
|
|
12
10
|
== Installation
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
the following:
|
|
16
|
-
|
|
12
|
+
rubypodder can be downloaded and installed with:
|
|
17
13
|
gem install rubypodder
|
|
18
14
|
|
|
19
15
|
== Quick Start
|
|
20
16
|
|
|
21
17
|
Type
|
|
22
|
-
|
|
23
18
|
rubypodder
|
|
24
|
-
|
|
25
19
|
When it finishes, you should see a ~/.rubypodder directory.
|
|
26
20
|
This should contain an example rp.conf configuration file with a feed in
|
|
27
21
|
it to get you started. If there were any podcasts to download in the feed
|
|
@@ -31,35 +25,32 @@ You can see what happened by looking in rp.log.
|
|
|
31
25
|
== Running the rubypodder Test Suite
|
|
32
26
|
|
|
33
27
|
If you wish to run the unit tests that come with rubypodder:
|
|
34
|
-
|
|
35
28
|
gem check rubypodder --test
|
|
36
|
-
|
|
37
29
|
A message will be given if any of the tests fail.
|
|
38
30
|
|
|
39
31
|
=== Uninstallation
|
|
40
32
|
|
|
41
33
|
To uninstall the rubypodder gem use:
|
|
42
|
-
|
|
43
34
|
gem uninstall rubypodder
|
|
44
35
|
|
|
45
36
|
== Configuration
|
|
46
37
|
|
|
47
|
-
Create a file
|
|
38
|
+
Create a file
|
|
39
|
+
~/.rubypodder/rp.conf
|
|
40
|
+
containing podcast feeds, one per line.
|
|
48
41
|
|
|
49
42
|
== Usage
|
|
50
43
|
|
|
51
44
|
Type
|
|
52
|
-
|
|
53
45
|
rubypodder
|
|
54
46
|
|
|
55
47
|
and if there are any podcast episodes from your feeds that have not yet
|
|
56
48
|
been downloaded, they will be downloaded into a "date" directory such as
|
|
57
|
-
|
|
49
|
+
~/.rubypodder/2007-01-18/
|
|
58
50
|
|
|
59
51
|
A good idea is to use +crontab -e+ and add a line like
|
|
60
|
-
|
|
61
|
-
which will set up a cron job which will do
|
|
62
|
-
this regularly.
|
|
52
|
+
0 5 * * * rubypodder
|
|
53
|
+
which will set up a cron job which will do this regularly.
|
|
63
54
|
|
|
64
55
|
== License
|
|
65
56
|
|
data/Rakefile
CHANGED
|
@@ -4,7 +4,7 @@ require 'rake/gempackagetask'
|
|
|
4
4
|
spec = Gem::Specification.new do |s|
|
|
5
5
|
s.platform = Gem::Platform::RUBY
|
|
6
6
|
s.name = "rubypodder"
|
|
7
|
-
s.version = "0.1.
|
|
7
|
+
s.version = "0.1.1"
|
|
8
8
|
s.author = "Lex Miller"
|
|
9
9
|
s.email = "lex.miller @nospam@ gmail.com"
|
|
10
10
|
s.summary = "A podcast aggregator without an interface"
|
data/lib/rubypodder.rb
CHANGED
|
@@ -35,7 +35,7 @@ class RubyPodder
|
|
|
35
35
|
expanded_path = File.expand_path(@conf_file)
|
|
36
36
|
return if File.exists?(expanded_path)
|
|
37
37
|
make_dirname(expanded_path)
|
|
38
|
-
rio(expanded_path) < "http://downloads.bbc.co.uk/rmhttp/downloadtrial/radio4/thenowshow/rss.xml"
|
|
38
|
+
rio(expanded_path) < "http://downloads.bbc.co.uk/rmhttp/downloadtrial/radio4/thenowshow/rss.xml\n"
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def make_dirname(full_filename)
|
|
@@ -54,7 +54,8 @@ class RubyPodder
|
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def read_feeds
|
|
57
|
-
IO.readlines(@conf_file).each {|l| l.chomp!}
|
|
57
|
+
#IO.readlines(@conf_file).each {|l| l.chomp!}
|
|
58
|
+
a = rio(@conf_file).chomp.readlines.reject {|i| i =~ /^#/}
|
|
58
59
|
end
|
|
59
60
|
|
|
60
61
|
def parse_rss(rss_source)
|
data/tests/tc_rubypodder.rb
CHANGED
|
@@ -8,8 +8,10 @@ class TC_RubyPodder < Test::Unit::TestCase
|
|
|
8
8
|
system("rm -rf " + "/tmp/test_rp.conf")
|
|
9
9
|
system("rm -rf " + "/tmp/test_rp.done")
|
|
10
10
|
File.open("/tmp/test_rp.conf", "w") do |file|
|
|
11
|
+
file.write("# This is just a comment\n")
|
|
11
12
|
file.write("http://downloads.bbc.co.uk/rmhttp/downloadtrial/radio4/thenowshow/rss.xml\n")
|
|
12
|
-
file.write("
|
|
13
|
+
file.write("# This is just another comment\n")
|
|
14
|
+
file.write("http://www.guardian.co.uk/podcasts/comedy/rickygervais/mp3.xml\n")
|
|
13
15
|
end
|
|
14
16
|
@subdir = "/tmp/subdir"
|
|
15
17
|
system("rm -rf " + @subdir)
|
|
@@ -90,6 +92,7 @@ class TC_RubyPodder < Test::Unit::TestCase
|
|
|
90
92
|
assert_kind_of(Array, feed_list)
|
|
91
93
|
assert_equal(2, feed_list.length)
|
|
92
94
|
assert_equal("http://downloads.bbc.co.uk/rmhttp/downloadtrial/radio4/thenowshow/rss.xml", feed_list[0])
|
|
95
|
+
assert_equal("http://www.guardian.co.uk/podcasts/comedy/rickygervais/mp3.xml", feed_list[1])
|
|
93
96
|
end
|
|
94
97
|
|
|
95
98
|
def test_parse_rss
|
metadata
CHANGED
|
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
|
3
3
|
specification_version: 1
|
|
4
4
|
name: rubypodder
|
|
5
5
|
version: !ruby/object:Gem::Version
|
|
6
|
-
version: 0.1.
|
|
7
|
-
date: 2007-01-
|
|
6
|
+
version: 0.1.1
|
|
7
|
+
date: 2007-01-22 00:00:00 +13:00
|
|
8
8
|
summary: A podcast aggregator without an interface
|
|
9
9
|
require_paths:
|
|
10
10
|
- lib
|