titlekit 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/CHANGELOG.md +11 -0
- data/{LICENSE → LICENSE.txt} +0 -0
- data/lib/titlekit/parsers/ass.rb +1 -1
- data/lib/titlekit/parsers/srt.rb +1 -2
- data/lib/titlekit/parsers/ssa.rb +1 -1
- data/lib/titlekit/version.rb +1 -1
- data/spec/ass_spec.rb +1 -0
- data/spec/files/ass/authentic.ass +0 -0
- data/spec/simultaneous_subtitles/triple_plus/ass/expected.ass +3 -3
- data/spec/simultaneous_subtitles/triple_plus/ass/out.ass +3 -3
- data/spec/simultaneous_subtitles/triple_plus/ssa/expected.ssa +3 -3
- data/spec/simultaneous_subtitles/triple_plus/ssa/out.ssa +3 -3
- data/spec/srt_spec.rb +1 -0
- data/spec/ssa_spec.rb +1 -0
- data/titlekit.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cef9e09e7354eaede06fe3d337e7d2204d0e74452a24a0ce9c5926876c827822
|
4
|
+
data.tar.gz: 214d47cf6102c6529aa37f7cbdd22d4c41cb9fb24cc79b5907f3ab218eede9c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e72816bc7ec5098f03917edddbdbfb38ffa8a1dac35f31f5e77b0ded1b47890afe9d60b2cb909cd7d4de279cba189f8fd48e35c5edb85a348a07ee0b9a77317b
|
7
|
+
data.tar.gz: a9c5bda2b3611c92201e9e2bd1827fbe892d4d49709e49429cb7530f3c0285bb5add0d55572fd2449f1cf6bd4ea749104ac48fa5043d8ff4cd3d49d107c09131
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
data/{LICENSE → LICENSE.txt}
RENAMED
File without changes
|
data/lib/titlekit/parsers/ass.rb
CHANGED
@@ -188,7 +188,7 @@ module Titlekit
|
|
188
188
|
# @param [Float] an amount of seconds
|
189
189
|
def self.parse_timecode(timecode)
|
190
190
|
m = timecode.match(/(?<h>\d):(?<m>\d{2}):(?<s>\d{2})[:|\.](?<ms>\d+)/)
|
191
|
-
m['h'].to_i * 3600 + m['m'].to_i * 60 + m['s'].to_i
|
191
|
+
"#{m['h'].to_i * 3600 + m['m'].to_i * 60 + m['s'].to_i}.#{m['ms']}".to_f
|
192
192
|
end
|
193
193
|
end
|
194
194
|
end
|
data/lib/titlekit/parsers/srt.rb
CHANGED
data/lib/titlekit/parsers/ssa.rb
CHANGED
@@ -192,7 +192,7 @@ module Titlekit
|
|
192
192
|
# @param [Float] an amount of seconds
|
193
193
|
def self.parse_timecode(timecode)
|
194
194
|
m = timecode.match(/(?<h>\d):(?<m>\d{2}):(?<s>\d{2})[:|\.](?<ms>\d+)/)
|
195
|
-
m['h'].to_i * 3600 + m['m'].to_i * 60 + m['s'].to_i
|
195
|
+
"#{m['h'].to_i * 3600 + m['m'].to_i * 60 + m['s'].to_i}.#{m['ms']}".to_f
|
196
196
|
end
|
197
197
|
end
|
198
198
|
end
|
data/lib/titlekit/version.rb
CHANGED
data/spec/ass_spec.rb
CHANGED
@@ -131,6 +131,7 @@ Dialogue: 0,0:00:01.50,0:00:03.70,Default,,0000,0000,0000,,Oh yeah ... 寧為太
|
|
131
131
|
describe '.parse_timecode' do
|
132
132
|
it 'obtains a float timecode value from an ASS timecode' do
|
133
133
|
expect(Titlekit::ASS.parse_timecode('0:00:35.96')).to eq(35.96)
|
134
|
+
expect(Titlekit::ASS.parse_timecode('0:00:04.56')).to eq(4.56)
|
134
135
|
end
|
135
136
|
end
|
136
137
|
end
|
Binary file
|
@@ -36,9 +36,9 @@ Dialogue: 0,0:00:10.00,0:00:10.35,EDF393,,0000,0000,0000,,Wir verwenden zu viele
|
|
36
36
|
Dialogue: 0,0:00:10.35,0:00:10.38,89BABE,,0000,0000,0000,,We are using way too many here
|
37
37
|
Dialogue: 0,0:00:10.35,0:00:10.38,EDF393,,0000,0000,0000,,Wir verwenden zu viele Untertitel zur gleichen Zeit
|
38
38
|
Dialogue: 0,0:00:10.38,0:00:11.00,EDF393,,0000,0000,0000,,Wir verwenden zu viele Untertitel zur gleichen Zeit
|
39
|
-
Dialogue: 0,0:00:11.95,0:00:11.
|
40
|
-
Dialogue: 0,0:00:11.
|
41
|
-
Dialogue: 0,0:00:11.
|
39
|
+
Dialogue: 0,0:00:11.95,0:00:11.98,FFA891,,0000,0000,0000,,¡Dios mio!
|
40
|
+
Dialogue: 0,0:00:11.98,0:00:11.99,EDF393,,0000,0000,0000,,That is correct
|
41
|
+
Dialogue: 0,0:00:11.98,0:00:11.99,FFA891,,0000,0000,0000,,¡Dios mio!
|
42
42
|
Dialogue: 0,0:00:11.99,0:00:12.04,EDF393,,0000,0000,0000,,That is correct
|
43
43
|
Dialogue: 0,0:00:11.99,0:00:12.04,F5E665,,0000,0000,0000,,Esto es correcto
|
44
44
|
Dialogue: 0,0:00:11.99,0:00:12.04,FFA891,,0000,0000,0000,,¡Dios mio!
|
@@ -36,9 +36,9 @@ Dialogue: 0,0:00:10.00,0:00:10.35,EDF393,,0000,0000,0000,,Wir verwenden zu viele
|
|
36
36
|
Dialogue: 0,0:00:10.35,0:00:10.38,89BABE,,0000,0000,0000,,We are using way too many here
|
37
37
|
Dialogue: 0,0:00:10.35,0:00:10.38,EDF393,,0000,0000,0000,,Wir verwenden zu viele Untertitel zur gleichen Zeit
|
38
38
|
Dialogue: 0,0:00:10.38,0:00:11.00,EDF393,,0000,0000,0000,,Wir verwenden zu viele Untertitel zur gleichen Zeit
|
39
|
-
Dialogue: 0,0:00:11.95,0:00:11.
|
40
|
-
Dialogue: 0,0:00:11.
|
41
|
-
Dialogue: 0,0:00:11.
|
39
|
+
Dialogue: 0,0:00:11.95,0:00:11.98,FFA891,,0000,0000,0000,,¡Dios mio!
|
40
|
+
Dialogue: 0,0:00:11.98,0:00:11.99,EDF393,,0000,0000,0000,,That is correct
|
41
|
+
Dialogue: 0,0:00:11.98,0:00:11.99,FFA891,,0000,0000,0000,,¡Dios mio!
|
42
42
|
Dialogue: 0,0:00:11.99,0:00:12.04,EDF393,,0000,0000,0000,,That is correct
|
43
43
|
Dialogue: 0,0:00:11.99,0:00:12.04,F5E665,,0000,0000,0000,,Esto es correcto
|
44
44
|
Dialogue: 0,0:00:11.99,0:00:12.04,FFA891,,0000,0000,0000,,¡Dios mio!
|
@@ -36,9 +36,9 @@ Dialogue: 0,0:00:10.00,0:00:10.35,EDF393,,0000,0000,0000,,Wir verwenden zu viele
|
|
36
36
|
Dialogue: 0,0:00:10.35,0:00:10.38,89BABE,,0000,0000,0000,,We are using way too many here
|
37
37
|
Dialogue: 0,0:00:10.35,0:00:10.38,EDF393,,0000,0000,0000,,Wir verwenden zu viele Untertitel zur gleichen Zeit
|
38
38
|
Dialogue: 0,0:00:10.38,0:00:11.00,EDF393,,0000,0000,0000,,Wir verwenden zu viele Untertitel zur gleichen Zeit
|
39
|
-
Dialogue: 0,0:00:11.95,0:00:11.
|
40
|
-
Dialogue: 0,0:00:11.
|
41
|
-
Dialogue: 0,0:00:11.
|
39
|
+
Dialogue: 0,0:00:11.95,0:00:11.98,FFA891,,0000,0000,0000,,¡Dios mio!
|
40
|
+
Dialogue: 0,0:00:11.98,0:00:11.99,EDF393,,0000,0000,0000,,That is correct
|
41
|
+
Dialogue: 0,0:00:11.98,0:00:11.99,FFA891,,0000,0000,0000,,¡Dios mio!
|
42
42
|
Dialogue: 0,0:00:11.99,0:00:12.04,EDF393,,0000,0000,0000,,That is correct
|
43
43
|
Dialogue: 0,0:00:11.99,0:00:12.04,F5E665,,0000,0000,0000,,Esto es correcto
|
44
44
|
Dialogue: 0,0:00:11.99,0:00:12.04,FFA891,,0000,0000,0000,,¡Dios mio!
|
@@ -36,9 +36,9 @@ Dialogue: 0,0:00:10.00,0:00:10.35,EDF393,,0000,0000,0000,,Wir verwenden zu viele
|
|
36
36
|
Dialogue: 0,0:00:10.35,0:00:10.38,89BABE,,0000,0000,0000,,We are using way too many here
|
37
37
|
Dialogue: 0,0:00:10.35,0:00:10.38,EDF393,,0000,0000,0000,,Wir verwenden zu viele Untertitel zur gleichen Zeit
|
38
38
|
Dialogue: 0,0:00:10.38,0:00:11.00,EDF393,,0000,0000,0000,,Wir verwenden zu viele Untertitel zur gleichen Zeit
|
39
|
-
Dialogue: 0,0:00:11.95,0:00:11.
|
40
|
-
Dialogue: 0,0:00:11.
|
41
|
-
Dialogue: 0,0:00:11.
|
39
|
+
Dialogue: 0,0:00:11.95,0:00:11.98,FFA891,,0000,0000,0000,,¡Dios mio!
|
40
|
+
Dialogue: 0,0:00:11.98,0:00:11.99,EDF393,,0000,0000,0000,,That is correct
|
41
|
+
Dialogue: 0,0:00:11.98,0:00:11.99,FFA891,,0000,0000,0000,,¡Dios mio!
|
42
42
|
Dialogue: 0,0:00:11.99,0:00:12.04,EDF393,,0000,0000,0000,,That is correct
|
43
43
|
Dialogue: 0,0:00:11.99,0:00:12.04,F5E665,,0000,0000,0000,,Esto es correcto
|
44
44
|
Dialogue: 0,0:00:11.99,0:00:12.04,FFA891,,0000,0000,0000,,¡Dios mio!
|
data/spec/srt_spec.rb
CHANGED
data/spec/ssa_spec.rb
CHANGED
@@ -85,6 +85,7 @@ Dialogue: 0,0:00:01.50,0:00:03.70,Default,,0000,0000,0000,,Oh yeah ... 寧為太
|
|
85
85
|
describe '.parse_timecode' do
|
86
86
|
it 'obtains a float timecode value from an SSA timecode' do
|
87
87
|
expect(Titlekit::SSA.parse_timecode('0:00:35.96')).to eq(35.96)
|
88
|
+
expect(Titlekit::SSA.parse_timecode('0:00:04.56')).to eq(4.56)
|
88
89
|
end
|
89
90
|
end
|
90
91
|
end
|
data/titlekit.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.homepage = 'https://github.com/simonrepp/titlekit'
|
9
9
|
|
10
10
|
spec.author = 'Simon Repp'
|
11
|
-
spec.email = 'simon@fdpl.
|
11
|
+
spec.email = 'simon@fdpl.io'
|
12
12
|
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.add_development_dependency('rspec')
|
20
20
|
|
21
21
|
spec.platform = Gem::Platform::RUBY
|
22
|
-
spec.required_ruby_version = '>= 2.
|
22
|
+
spec.required_ruby_version = '>= 2.4.0'
|
23
23
|
spec.files = `git ls-files`.split($\)
|
24
24
|
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
25
25
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: titlekit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Repp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rchardet19
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Featureful Ruby library for SRT / ASS / SSA subtitles
|
70
|
-
email: simon@fdpl.
|
70
|
+
email: simon@fdpl.io
|
71
71
|
executables:
|
72
72
|
- titlekit
|
73
73
|
extensions: []
|
@@ -75,8 +75,9 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
77
|
- ".travis.yml"
|
78
|
+
- CHANGELOG.md
|
78
79
|
- Gemfile
|
79
|
-
- LICENSE
|
80
|
+
- LICENSE.txt
|
80
81
|
- README.md
|
81
82
|
- Rakefile
|
82
83
|
- bin/titlekit
|
@@ -204,15 +205,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
204
205
|
requirements:
|
205
206
|
- - ">="
|
206
207
|
- !ruby/object:Gem::Version
|
207
|
-
version: 2.
|
208
|
+
version: 2.4.0
|
208
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
210
|
requirements:
|
210
211
|
- - ">="
|
211
212
|
- !ruby/object:Gem::Version
|
212
213
|
version: '0'
|
213
214
|
requirements: []
|
214
|
-
|
215
|
-
rubygems_version: 2.4.8
|
215
|
+
rubygems_version: 3.1.2
|
216
216
|
signing_key:
|
217
217
|
specification_version: 4
|
218
218
|
summary: Featureful Ruby library for SRT / ASS / SSA subtitles
|