mkvmuxer 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mkvmuxer +10 -4
- data/lib/mkvmuxer/mkvmuxer.rb +12 -8
- data/lib/mkvmuxer/version.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 261b833f4dce0ab2853a94aa5c3cb4c0e03684c8
|
4
|
+
data.tar.gz: c0d787a229d20a1b4b814393a68727fff0c7a95c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08381b81ff9a623b9e9a0f03a4a0edc8105445b528e0a7162ac464d8798f2de00daa3a739a9ede5e11aacb7d426a50e83b6c8133720ec427920d224f9eac558a
|
7
|
+
data.tar.gz: dda01f5e260d9de22817e5c279ec95fb8ea33897fc7f956ed1f25a1ddb17f6ba3e401f8e34f6f314ed3c5cc48e8db705c26e2b01237240d42b92ee62ec230eb3
|
data/bin/mkvmuxer
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
require 'mkvmuxer'
|
3
3
|
|
4
|
-
abort "Usage: #{$0} <path>" if ARGV.empty?
|
5
|
-
abort 'Folder not found.'
|
4
|
+
abort "Usage: #{$0} <path> [language]" if ARGV.empty?
|
5
|
+
abort 'Folder not found.' unless File.directory? ARGV.first
|
6
|
+
|
7
|
+
mkvmuxer = MkvMuxer.new ARGV.shift
|
8
|
+
|
9
|
+
if ARGV.any?
|
10
|
+
mkvmuxer.prepare ARGV.shift
|
11
|
+
else
|
12
|
+
mkvmuxer.prepare
|
13
|
+
end
|
6
14
|
|
7
|
-
mkvmuxer = MkvMuxer.new ARGV.first
|
8
|
-
mkvmuxer.prepare
|
9
15
|
mkvmuxer.merge!
|
10
16
|
mkvmuxer.apply_crc32!
|
data/lib/mkvmuxer/mkvmuxer.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
#--
|
2
2
|
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
3
3
|
# Version 2, December 2004
|
4
4
|
#
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
7
7
|
#
|
8
8
|
# 0. You just DO WHAT THE FUCK YOU WANT TO.
|
9
|
-
|
9
|
+
#++
|
10
10
|
|
11
11
|
class MkvMuxer
|
12
12
|
attr_reader :command
|
@@ -28,18 +28,22 @@ class MkvMuxer
|
|
28
28
|
raise Exception, 'Target mkv already exists' if !force && File.exists?(@output)
|
29
29
|
end
|
30
30
|
|
31
|
-
def prepare(fonts = true, chapters = true)
|
31
|
+
def prepare(language = 'Italian', fonts = true, chapters = true)
|
32
32
|
options = []
|
33
|
-
options << { opt: '-o',
|
34
|
-
options << { val:
|
35
|
-
options << { val:
|
36
|
-
options << { opt: '--
|
33
|
+
options << { opt: '-o', val: @output }
|
34
|
+
options << { opt: '--default-track', val: '0' }
|
35
|
+
options << { opt: '--track-name', val: "0:#{language}" }
|
36
|
+
options << { opt: '--language', val: "0:#{language[0..2].downcase}" }
|
37
|
+
options << { opt: '--no-chapters --chapters', val: chapters } if @chapters
|
37
38
|
|
38
39
|
@fonts.each { |font|
|
39
40
|
options << { opt: '--attachment-mime-type', val: 'application/x-truetype-font' }
|
40
|
-
options << { opt: '--attach-file',
|
41
|
+
options << { opt: '--attach-file', val: font }
|
41
42
|
} if fonts
|
42
43
|
|
44
|
+
options << { val: @ass }
|
45
|
+
options << { val: @mkv }
|
46
|
+
|
43
47
|
@command = [].tap { |cmd|
|
44
48
|
options.each { |option|
|
45
49
|
cmd << option[:opt] if option[:opt]
|
data/lib/mkvmuxer/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
#--
|
2
2
|
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
3
3
|
# Version 2, December 2004
|
4
4
|
#
|
@@ -6,8 +6,8 @@
|
|
6
6
|
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
7
7
|
#
|
8
8
|
# 0. You just DO WHAT THE FUCK YOU WANT TO.
|
9
|
-
|
9
|
+
#++
|
10
10
|
|
11
11
|
class MkvMuxer
|
12
|
-
VERSION = '0.
|
12
|
+
VERSION = '0.2'
|
13
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mkvmuxer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giovanni Capuano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|