subtitle2utf8 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/lib/subtitle2utf8.rb +5 -2
- data/lib/subtitle2utf8/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 190f9bb66fc44c75b32f109f46b7ab09a0b61dcf
|
4
|
+
data.tar.gz: 31f31a106208e8ac6f6ca194a2feea598de840f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6da8e77e4b8c01e6f26479eee7069536c5d66bf262f7486bb330b4ab68fd6fc69fc175c8685dfeef9507499e24bc89f39068cf4b01387553c3c6ddda2af93e1
|
7
|
+
data.tar.gz: ea46fa29ac5f25ab673c4f65c84d8d4cfbfb5368a2ff470b54b222165b6a624b69ccdb0d608596a8fdf292ff679d8da8d71ce54ee7c11b398486e7c16bd2f8ab
|
data/lib/subtitle2utf8.rb
CHANGED
@@ -28,9 +28,10 @@ module Subtitle2utf8
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def convert_file(origin)
|
31
|
-
valid = '.srt'
|
31
|
+
valid = ['.srt', '.ass']
|
32
32
|
|
33
|
-
|
33
|
+
ext = File.extname(origin)
|
34
|
+
if !valid.include?(ext)
|
34
35
|
abort "#{origin} is not valid file!"
|
35
36
|
end
|
36
37
|
|
@@ -65,12 +66,14 @@ module Subtitle2utf8
|
|
65
66
|
def convert_dir(present)
|
66
67
|
Dir.chdir(present) do
|
67
68
|
Dir['*.srt'].each { |name| convert_file name }
|
69
|
+
Dir['*.ass'].each { |name| convert_file name }
|
68
70
|
end
|
69
71
|
end
|
70
72
|
|
71
73
|
def convert_dirs(present)
|
72
74
|
Dir.chdir(present) do
|
73
75
|
Dir['**/*.srt'].each { |name| convert_file name }
|
76
|
+
Dir['**/*.ass'].each { |name| convert_file name }
|
74
77
|
end
|
75
78
|
end
|
76
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subtitle2utf8
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick Yu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02
|
11
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|