ted_talk 0.0.21 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/ted_talk/version.rb +1 -1
- data/lib/ted_talk.rb +3 -3
- metadata +2 -2
data/README.md
CHANGED
@@ -6,7 +6,7 @@ TedTalk helps download TED talk video and covert it to a slowed down MP3 with pa
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
TedTalk requires [FFmpeg](http://ffmpeg.org/) and [SoX](http://sox.sourceforge.net/) with LAME support, as well as [TagLib](http://taglib.github.com/) audio meta-data library installed to the system
|
9
|
+
TedTalk requires [FFmpeg](http://ffmpeg.org/) and [SoX](http://sox.sourceforge.net/) **with LAME support** [important], as well as [TagLib](http://taglib.github.com/) audio meta-data library installed to the system
|
10
10
|
|
11
11
|
$ gem install ted_talk
|
12
12
|
|
@@ -37,7 +37,6 @@ TedTalk requires [FFmpeg](http://ffmpeg.org/) and [SoX](http://sox.sourceforge.n
|
|
37
37
|
--lang, -l <s>: Language of description (default: en)
|
38
38
|
--rss, -r: Show descriptions of the newest talks from TED Talk RSS
|
39
39
|
--url, -u <s>: URL of a specific TED Talk
|
40
|
-
--video, -v: Save not only audio but also the original video
|
41
40
|
--help, -h: Show this message
|
42
41
|
|
43
42
|
### exec
|
@@ -55,4 +54,5 @@ TedTalk requires [FFmpeg](http://ffmpeg.org/) and [SoX](http://sox.sourceforge.n
|
|
55
54
|
--speed, -s <f>: Speed of output file [0.1 - 100] (default: 1.0)
|
56
55
|
--silence, -i <f>: Length (secondes) of a pause added to each utterance
|
57
56
|
[0.1 - 120] (default: 0.0)
|
57
|
+
--video, -v: Save not only audio but also the original video
|
58
58
|
--help, -h: Show this message
|
data/lib/ted_talk/version.rb
CHANGED
data/lib/ted_talk.rb
CHANGED
@@ -172,7 +172,7 @@ module TedTalk
|
|
172
172
|
lang_doc = Nokogiri::HTML(html)
|
173
173
|
temp = lang_doc.xpath("//meta[@name='description']").first.attribute("content").value.strip
|
174
174
|
/\ATED Talks\s*(.+)\z/ =~ temp
|
175
|
-
$1 rescue
|
175
|
+
$1 rescue ""
|
176
176
|
end
|
177
177
|
|
178
178
|
def get_captions(lang = "en")
|
@@ -238,10 +238,10 @@ module TedTalk
|
|
238
238
|
tag.title += " [x#{@speed}]" if @speed and @speed != 1
|
239
239
|
tag.genre = "Talk"
|
240
240
|
|
241
|
-
caption_text = @titles["en"]
|
241
|
+
caption_text = @titles["en"] || ""
|
242
242
|
caption_text << @titles[@lang] + "\n" if @titles[@lang]
|
243
243
|
caption_text << "--------------------\n"
|
244
|
-
caption_text << @descriptions["en"] + "\n"
|
244
|
+
caption_text << @descriptions["en"] + "\n" if @descriptions["en"]
|
245
245
|
caption_text << @descriptions[@lang] + "\n" if @descriptions[@lang]
|
246
246
|
caption_text << "\n"
|
247
247
|
@captions["en"].each_with_index do |c, index|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ted_talk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|