akitaonrails-shift_subtitle 1.1.0 → 1.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/bin/shift_subtitle +12 -8
- data/bin/shift_subtitle.cmd +0 -0
- data/lib/srt_time.rb +0 -0
- data/lib/srt_time/version.rb +0 -0
- data/spec/fixtures/input.srt +0 -0
- data/spec/fixtures/output.srt +0 -0
- data/spec/shift_subtitle_spec.rb +0 -0
- data/spec/spec.opts +0 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/srt_time_spec.rb +0 -0
- data/tasks/gems.rake +0 -0
- metadata +16 -4
data/bin/shift_subtitle
CHANGED
@@ -30,13 +30,17 @@ optparse = OptionParser.new do |opts|
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# get the input and output files
|
33
|
-
|
34
|
-
options.merge!(:
|
33
|
+
if ARGV.size > 1
|
34
|
+
options.merge!(:input_file => ARGV.first)
|
35
|
+
options.merge!(:output_file => ARGV.last)
|
35
36
|
|
36
|
-
srt_time = SrtTime.new(options)
|
37
|
-
File.open(options[:output_file], "w+") do |output|
|
38
|
-
|
39
|
-
|
37
|
+
srt_time = SrtTime.new(options)
|
38
|
+
File.open(options[:output_file], "w+") do |output|
|
39
|
+
File.readlines(options[:input_file]).each do |line|
|
40
|
+
output.write srt_time.convert_line(line)
|
41
|
+
end
|
40
42
|
end
|
41
|
-
|
42
|
-
|
43
|
+
puts "Done!"
|
44
|
+
else
|
45
|
+
puts "no arguments passed, try -h"
|
46
|
+
end
|
data/bin/shift_subtitle.cmd
CHANGED
File without changes
|
data/lib/srt_time.rb
CHANGED
File without changes
|
data/lib/srt_time/version.rb
CHANGED
File without changes
|
data/spec/fixtures/input.srt
CHANGED
File without changes
|
data/spec/fixtures/output.srt
CHANGED
File without changes
|
data/spec/shift_subtitle_spec.rb
CHANGED
File without changes
|
data/spec/spec.opts
CHANGED
File without changes
|
data/spec/spec_helper.rb
CHANGED
File without changes
|
data/spec/srt_time_spec.rb
CHANGED
File without changes
|
data/tasks/gems.rake
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: akitaonrails-shift_subtitle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Fabio Akita
|
@@ -43,21 +49,27 @@ rdoc_options: []
|
|
43
49
|
require_paths:
|
44
50
|
- lib
|
45
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
46
53
|
requirements:
|
47
54
|
- - ">="
|
48
55
|
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
49
59
|
version: "0"
|
50
|
-
version:
|
51
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
52
62
|
requirements:
|
53
63
|
- - ">="
|
54
64
|
- !ruby/object:Gem::Version
|
65
|
+
hash: 3
|
66
|
+
segments:
|
67
|
+
- 0
|
55
68
|
version: "0"
|
56
|
-
version:
|
57
69
|
requirements: []
|
58
70
|
|
59
71
|
rubyforge_project:
|
60
|
-
rubygems_version: 1.
|
72
|
+
rubygems_version: 1.4.1
|
61
73
|
signing_key:
|
62
74
|
specification_version: 3
|
63
75
|
summary: Time shifter for SRT subtitles.
|