forked from boncey/ruby-podcast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
boncey
committed
Jul 6, 2013
1 parent
fd0d54a
commit 60dbea0
Showing
7 changed files
with
68 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## Podcast is a simple library and command line utility for creating podcast files from a directory of mp3 files. | ||
Podcast will examine mp3s, extract metadata from ID3 tags, and build an RSS file which can then be podcast clients to download the mp3s. | ||
|
||
### To build and install ruby-podcast | ||
|
||
You'll need to install the Ruby mp3info library installed before podcast | ||
will work: | ||
|
||
gem install ruby-mp3info | ||
|
||
Or you can grab ruby-mp3info here: | ||
|
||
http://rubyforge.org/projects/ruby-mp3info/ | ||
|
||
Then get the ruby-podcast source: | ||
|
||
git clone https://github.com/boncey/ruby-podcast.git (or download from https://github.com/boncey/ruby-podcast/archive/master.zip) | ||
cd ruby-podcast | ||
gem build podcast.gemspec | ||
gem install podcast-*.gem (this may need a sudo prefix depending on your ruby setup) | ||
|
||
### Usage | ||
|
||
Once you've installed ruby-mp3info and podcast you should have a | ||
command line utility you can run on a directory of mp3 files: | ||
|
||
% podcast --dir my/mp3/dir --out podcast.rss --title "Title" --description "Description" --link http://mypodcastserver/ | ||
|
||
#### Please note | ||
This used to be hosted at http://podcast.rubyforge.org/ | ||
However, that version no longer works with newer versions of Ruby. | ||
|
||
I (https://github.com/boncey) have made changes so it to works and after getting no answer from the author or via the list on rubyforge have decided to upload my version to https://github.com/boncey/ruby-podcast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env ruby -d | ||
#!/usr/bin/env ruby | ||
|
||
# == Synopsis | ||
# | ||
|
@@ -7,7 +7,7 @@ | |
# | ||
# == Usage | ||
# | ||
# podcast --dir my/mp3/dir --out podcast.rss --title "Title" --description "Description" | ||
# podcast --dir my/mp3/dir --out podcast.rss --title "Title" --description "Description" --link http://mypodcastserver/ | ||
# | ||
# == Author | ||
# Ed Summers <[email protected]> | ||
|
@@ -18,10 +18,16 @@ | |
# Licensed under the same terms as Ruby. | ||
|
||
require 'optparse' | ||
require 'rdoc/usage' | ||
require 'rubygems' | ||
require 'podcast' | ||
|
||
def usage(opts) | ||
puts 'podcast --dir my/mp3/dir --out podcast.rss --title "Title" --description "Description" --link http://mypodcastserver/' | ||
puts "Version: #{Podcast::NAME}" | ||
puts opts.help | ||
exit | ||
end | ||
|
||
# the location to look for mp3s | ||
dir = '' | ||
|
||
|
@@ -45,8 +51,16 @@ opts.on("-a", "--about VAL", String) { |val| podcast.about=val } | |
opts.on("-i", "--image VAL", String) { |val| podcast.image=val } | ||
opts.on("-v", "--version VAL", String) { |val| version=val } | ||
opts.on("-e", "--description VAL", String) { |val| podcast.description=val } | ||
opts.parse(ARGV) rescue RDoc::usage('usage') | ||
RDoc::usage('usage') if dir == nil || podcast.title == nil || podcast.description == nil | ||
begin | ||
opts.parse(ARGV) | ||
rescue => e | ||
usage(opts) | ||
end | ||
|
||
if dir == nil || !File.directory?(dir) || !podcast.valid? | ||
usage(opts) | ||
end | ||
|
||
|
||
# add a directory | ||
podcast.add_dir(dir) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
module Podcast | ||
VERSION = "0.0.5" | ||
VERSION = "0.0.6" | ||
NAME = "ruby-podcast-#{VERSION}" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,19 @@ $:.push File.expand_path("../lib", __FILE__) | |
require "podcast/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "podcast" | ||
s.name = "ruby-podcast" | ||
s.version = Podcast::VERSION | ||
s.authors = ["Ed Summers", "Darren Greaves"] | ||
s.email = ["[email protected]"] | ||
s.homepage = "https://github.com/boncey/ruby-podcast" | ||
s.summary = %q{Create podcasts from MP3 files} | ||
s.description = %q{Iterate over a directory of mp3 files and write out a podcast RSS file} | ||
|
||
s.rubyforge_project = "podcast" | ||
s.rubyforge_project = "ruby-podcast" | ||
|
||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | ||
s.files = %w{bin/podcast lib/podcast.rb lib/podcast/version.rb} | ||
s.test_files = %w{test/test_podcast.rb} | ||
s.executables = %w{podcast} | ||
s.require_paths = ["lib"] | ||
s.add_dependency "ruby-mp3info" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters