deepl-srt 0.1.4 → 0.1.5
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/CHANGELOG.md +1 -0
- data/Gemfile.lock +1 -1
- data/deepl-srt.gemspec +1 -1
- data/examples/example.output.tmp +15 -0
- data/exe/deepl_srt +1 -1
- data/lib/deepl_srt/srt_translate.rb +1 -2
- data/lib/deepl_srt/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: b38fe36b012cde1c9f7b5c5c3718d126101086f7a6a278757576f0271eff09fd
|
|
4
|
+
data.tar.gz: 801f5921fee3c45de038e4bca70b3a6ce93b7254fb9293297b43cb4ff014c262
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c1f4df277e8dc21fd809472f011de007cc78fa824024c9dc7f7506ac093fd3bb7f2feecbb9126a0325df0be007828cda3763bf0acc902ecd7c231d9a2d95489
|
|
7
|
+
data.tar.gz: ce5b4740d8a511c5bfa9e60f882287260de5b93685351e58fb44fe5b853a063d94ed072051a208950c73d77d98d9d28cba28216cc684713d8b498f85a5629736
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/deepl-srt.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.email = ['lukasz@fuszara.pl']
|
|
10
10
|
|
|
11
11
|
spec.summary = 'Subtitles translator with DeepL engine'
|
|
12
|
-
spec.description = 'deepl_srt [api_key] [target_lang] [input_path] [result_path] [
|
|
12
|
+
spec.description = 'deepl_srt [api_key] [target_lang] [input_path] [result_path] [from_line]'
|
|
13
13
|
spec.homepage = 'https://github.com/lfuszara1/srt-deepl'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
|
data/examples/example.output.tmp
CHANGED
|
@@ -13,3 +13,18 @@ jesteśmy całkowicie odpowiedzialni za to
|
|
|
13
13
|
co trafia na nasz talerz, a
|
|
14
14
|
co z niego schodzi.
|
|
15
15
|
|
|
16
|
+
1
|
|
17
|
+
00:00:00,498 --> 00:00:02,827
|
|
18
|
+
- Oto, co najbardziej lubię w
|
|
19
|
+
jedzeniu i diecie.
|
|
20
|
+
|
|
21
|
+
2
|
|
22
|
+
00:00:02,827 --> 00:00:06,383
|
|
23
|
+
Wszyscy jemy kilka razy dziennie i
|
|
24
|
+
jesteśmy całkowicie odpowiedzialni za to
|
|
25
|
+
|
|
26
|
+
3
|
|
27
|
+
00:00:06,383 --> 00:00:09,427
|
|
28
|
+
co trafia na nasz talerz, a
|
|
29
|
+
co z niego schodzi.
|
|
30
|
+
|
data/exe/deepl_srt
CHANGED
|
@@ -6,7 +6,7 @@ require 'deepl_srt'
|
|
|
6
6
|
input_params = ARGV
|
|
7
7
|
|
|
8
8
|
if input_params.empty?
|
|
9
|
-
puts 'deepl_srt [api_key] [target_lang] [input_path] [result_path] [
|
|
9
|
+
puts 'deepl_srt [api_key] [target_lang] [input_path] [result_path] [from_line]'
|
|
10
10
|
else
|
|
11
11
|
api_key = input_params[0]
|
|
12
12
|
target_lang = input_params[1]
|
|
@@ -11,8 +11,7 @@ class SrtTranslate
|
|
|
11
11
|
@file = SRT::File.parse(File.new(input_path))
|
|
12
12
|
@deepl_request = DeeplRequest.new(api_key)
|
|
13
13
|
@target_lang = target_lang
|
|
14
|
-
FileUtils.
|
|
15
|
-
FileUtils.touch(result_path)
|
|
14
|
+
FileUtils.touch(result_path) unless File.exist?(result_path)
|
|
16
15
|
@result_path = result_path
|
|
17
16
|
end
|
|
18
17
|
|
data/lib/deepl_srt/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deepl-srt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Łukasz Fuszara
|
|
@@ -10,7 +10,7 @@ bindir: exe
|
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2021-05-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description: deepl_srt [api_key] [target_lang] [input_path] [result_path] [
|
|
13
|
+
description: deepl_srt [api_key] [target_lang] [input_path] [result_path] [from_line]
|
|
14
14
|
email:
|
|
15
15
|
- lukasz@fuszara.pl
|
|
16
16
|
executables:
|