vtt2ass 0.2.5 → 0.2.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1014d192c3fa05ac8c39f15c2e06ca27d203d7a0cb6d2cb7500acf1a27df80b3
4
- data.tar.gz: e455ca13c6b27784801c1e3e1091e0df1eca05c6f8547c5a9c4b0cc0c5dccdee
3
+ metadata.gz: 9fe71574454d7bf315cb1de1c25ceb478e98fa0676f30e55a4e97b9522edfca9
4
+ data.tar.gz: d6380d5ee7e0f9e3341636cc266c43daea659724de180ee854811d243efd6348
5
5
  SHA512:
6
- metadata.gz: 0f4aa749a1f35195a847bc2a0abefaad1d5b644e4987f2cd8742d575125171fea84aa0cc618c9da488ba9f94a277f0208be910b0641554cb438546622cc285f9
7
- data.tar.gz: 0f846550b79f10d0a933d29fd04cc6371248059f5a38a63d2540f707b601c72a9b682e195a3eac15bdd93168cb2d1c90e5c3e0ece8598bfdf4b749905f868455
6
+ metadata.gz: a4a0ce576c898b8a69467dbfc92481017ebb1d467377c7772ca52b05d72aebe14cd1ea2ac84ef3ad2898cb00defd4bde7104372de7e49a1aece6ab5072d1f7ec
7
+ data.tar.gz: 72c4f381475ad497ee697bbedc5d8c54864c4192a780ea7da32a9ebe5752a0b3c4b3f5463aa6486682e7baaa65dafed9ae7fe9439e8b45506e40407a4d60cd88
data/Gemfile CHANGED
@@ -4,6 +4,7 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem 'os'
7
+ gem 'htmlentities'
7
8
  gem 'yard'
8
9
  gem "rake", "~> 12.0"
9
10
  gem "minitest", "~> 5.0"
@@ -1,3 +1,5 @@
1
+ require 'htmlentities'
2
+
1
3
  ##
2
4
  # This class defines an ASS subtile line.
3
5
  class ASSLine
@@ -28,6 +30,7 @@ class ASSLine
28
30
  #
29
31
  # * Requires +text+, a string of VTT formated text as input.
30
32
  def convertToAssText(text)
33
+ decoder = HTMLEntities.new()
31
34
  text = text
32
35
  .gsub(/\r/, '')
33
36
  .gsub(/\n/, '\\N')
@@ -42,7 +45,7 @@ class ASSLine
42
45
  .gsub(/<[^>]>/, '')
43
46
  .gsub(/\\N$/, '')
44
47
  .gsub(/ +$/, '')
45
- return text
48
+ return decoder.decode(text)
46
49
  end
47
50
 
48
51
  ##
@@ -31,7 +31,7 @@ class Application
31
31
  vtt_to_ass(file_path).writeToFile(File.basename(file_path).gsub('.vtt', '.ass'))
32
32
  end
33
33
  elsif File.file?(@input) then
34
- vtt_to_ass(@input).writeToFile(File.basename(@input).gsub('.vtt', '.ass'))
34
+ vtt_to_ass(@input).writeToFile(@output + File.basename(@input).gsub('.vtt', '.ass'))
35
35
  else
36
36
  puts 'Error: input file or directory does not exist.'
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module Vtt2ass
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.7"
3
3
  end
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.5
4
+ version: 0.2.7
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-03-13 00:00:00.000000000 Z
11
+ date: 2021-03-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: