deepl-srt 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 041c6c0d7cc8a119bca0fca2c85773c1c33bf585c8be7abd44bd90dbfa682392
4
- data.tar.gz: 3d54618cf8d7e56d93c4ad19680c13942365609917b5334a87eb5c91392c2f8f
3
+ metadata.gz: b38fe36b012cde1c9f7b5c5c3718d126101086f7a6a278757576f0271eff09fd
4
+ data.tar.gz: 801f5921fee3c45de038e4bca70b3a6ce93b7254fb9293297b43cb4ff014c262
5
5
  SHA512:
6
- metadata.gz: ce490c98abfd551bb2d1f39cd0fb6d46d38674f34d5d26de298834737db2ea6c9960671982a0b98a1ea70e0c3057085faf920661caea0de9809f473dec6e0abf
7
- data.tar.gz: a3d699287177dd5ed8127953e0b9f745efa8d262dc756071067cc6941ff983d57ea243e9f5b3663fb60beb6a4eb3c5126d026fb74e51fb7956c04f5b398a7fee
6
+ metadata.gz: 3c1f4df277e8dc21fd809472f011de007cc78fa824024c9dc7f7506ac093fd3bb7f2feecbb9126a0325df0be007828cda3763bf0acc902ecd7c231d9a2d95489
7
+ data.tar.gz: ce5b4740d8a511c5bfa9e60f882287260de5b93685351e58fb44fe5b853a063d94ed072051a208950c73d77d98d9d28cba28216cc684713d8b498f85a5629736
data/CHANGELOG.md CHANGED
@@ -3,3 +3,4 @@
3
3
  0.1.2 split line every 6 words
4
4
  0.1.3 fix
5
5
  0.1.4 from line argument
6
+ 0.1.5 fix recreation of file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deepl-srt (0.1.4)
4
+ deepl-srt (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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] [form_line]'
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')
@@ -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] [form_line]'
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.rm(result_path) if File.exist?(result_path)
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeeplSrt
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
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
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] [form_line]
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: