podtergeist 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/podtergeist +4 -2
- data/lib/podtergeist/feed.rb +5 -5
- data/lib/podtergeist/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4977f319dbae229dc0b2b140dc1ebc0aa9368f0a
|
4
|
+
data.tar.gz: d8cfebdf7a7290422a4b62dcd669c0a7b7d47e1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae20ad533984754d78000373e083f1f68756074d718d487f090ef629feeca7884da34f5448462025cb9e6c781601c6529e9a84f928f6fa56fb6420c2c39a4a92
|
7
|
+
data.tar.gz: 083d3dcdfb714b54434700e2d7f4c37ee9370d2bae4bc2e4b60fd36bcfed8742736a0c1564784f654b0e8c18a9dbd5c92f3adffda30cee164754b50ab36f700c
|
data/bin/podtergeist
CHANGED
@@ -12,7 +12,8 @@ class PodtergeistCLI < Thor
|
|
12
12
|
|
13
13
|
method_option :destination, required: true, type: :string
|
14
14
|
method_option :local_file, required: true, type: :string
|
15
|
-
method_option :host, required:
|
15
|
+
method_option :host, required: true, type: :string
|
16
|
+
method_option :webroot, required: true, type: :string
|
16
17
|
method_option :show_title, required: false, type: :string
|
17
18
|
method_option :show_link, required: true, type: :string
|
18
19
|
method_option :show_description, required: false, type: :string
|
@@ -30,7 +31,8 @@ class PodtergeistCLI < Thor
|
|
30
31
|
method_option :episode_link, required: false, type: :string
|
31
32
|
method_option :episode_pubdate, required: false, type: :string
|
32
33
|
method_option :local_directory, required: true, type: :string
|
33
|
-
method_option :host, required:
|
34
|
+
method_option :host, required: true, type: :string
|
35
|
+
method_option :webroot, required: true, type: :string
|
34
36
|
desc 'existing', 'Add items in existing directory to a podcast feed (creating the feed if does not exist)'
|
35
37
|
def existing
|
36
38
|
Podtergeist::Feed.existing(options[:destination], options)
|
data/lib/podtergeist/feed.rb
CHANGED
@@ -4,6 +4,7 @@ require 'mime/types'
|
|
4
4
|
require 'taglib'
|
5
5
|
require 'uri'
|
6
6
|
require 'fileutils'
|
7
|
+
require 'pathname'
|
7
8
|
|
8
9
|
module Podtergeist
|
9
10
|
class Feed
|
@@ -81,11 +82,10 @@ module Podtergeist
|
|
81
82
|
|
82
83
|
item.description = tag.comment
|
83
84
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
end
|
85
|
+
local_directory = Pathname.new(params['local_directory'])
|
86
|
+
webroot = Pathname.new(params['webroot'])
|
87
|
+
url = params['host'] + '/' + local_directory.relative_path_from(webroot).to_s
|
88
|
+
remote = URI.escape("#{url}/#{File.basename(local_file)}")
|
89
89
|
item.enclosure = RSS::Rss::Channel::Item::Enclosure.new(
|
90
90
|
remote, properties.length, MIME::Types.type_for(local_file).first
|
91
91
|
)
|
data/lib/podtergeist/version.rb
CHANGED