srtshifter 1.1.3 → 1.2.0

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.
@@ -33,6 +33,11 @@ module SrtShifter
33
33
  puts(opts)
34
34
  # exit(0)
35
35
  end
36
+
37
+ opts.on_tail("-v","--version", "Show version") do
38
+ puts SrtShifter::VERSION
39
+ exit
40
+ end
36
41
 
37
42
  opts.parse!
38
43
  end
@@ -17,8 +17,8 @@ module SrtShifter
17
17
 
18
18
  lines.each do |line|
19
19
 
20
- time_match = line.scan(/(\d{2}:\d{2}:\d{2},\d{3}) --\> (\d{2}:\d{2}:\d{2},\d{3})/)
21
-
20
+ time_match = line.force_encoding("iso-8859-1").scan(/(\d{2}:\d{2}:\d{2},\d{3}) --\> (\d{2}:\d{2}:\d{2},\d{3})/)
21
+
22
22
  if $1.nil? && $2.nil?
23
23
  output_file.write(line)
24
24
  else
@@ -1,3 +1,3 @@
1
1
  module SrtShifter
2
- VERSION = "1.1.3"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: srtshifter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: