vtt2ass 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vtt2ass/Application.rb +3 -3
- data/lib/vtt2ass/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 061b3d7694d3decb80b649ab5a069339c17004bd6f4db37d7922a994d45d9dc8
|
4
|
+
data.tar.gz: de903fad378c9e804fe48b746ef0ccbdeb6b6957ce342e32d935417f4c1917f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97dbb70be67d5e0542a5f3c93e0405e99f0fd21c977187e1255b90373cff95a8cc2fe6e10727153ddffe83a7e0103c5eb25784c9d4d1ffdad7b02a25319e09e0
|
7
|
+
data.tar.gz: af521ea9ee5e80438d6fe4cc5949e888eefae23b0751f907c01a91a8547b454487f97770c2a2dd9cc2638457affab13786539aaa7324d4178ee97361c57cac1b
|
data/lib/vtt2ass/Application.rb
CHANGED
@@ -16,8 +16,8 @@ class Application
|
|
16
16
|
# Creates a new Application instance.
|
17
17
|
# It receives +options+ that can define the input and output directories.
|
18
18
|
def initialize(options)
|
19
|
-
@input_dir = options[:input] ? options[:input]: "./input"
|
20
|
-
@output_dir = options[:output] ? options[:output]: "./output"
|
19
|
+
@input_dir = options[:input] ? options[:input].gsub('\\', '/') : "./input"
|
20
|
+
@output_dir = options[:output] ? options[:output].gsub('\\', '/') : "./output"
|
21
21
|
@width = 1920
|
22
22
|
@height = 1080
|
23
23
|
@font_size = options[:font_size] ? options[:font_size] : 52
|
@@ -44,7 +44,7 @@ class Application
|
|
44
44
|
# It outputs a list named list_paragraph.
|
45
45
|
def readVTTFile(file_path)
|
46
46
|
list_parapraph = []
|
47
|
-
separator = OS.
|
47
|
+
separator = OS.posix? ? "\r\n\r\n": "\n\n"
|
48
48
|
File.foreach(file_path, separator) do |paragraph|
|
49
49
|
paragraph = paragraph.rstrip.gsub(/\r\n/, "\n")
|
50
50
|
if not paragraph.eql? "" then
|
data/lib/vtt2ass/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vtt2ass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Louis-Philippe Fortin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|