mm_tool 0.1.4 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mm_tool/application_main.rb +7 -4
- data/lib/mm_tool/mm_movie.rb +4 -1
- data/lib/mm_tool/mm_movie_stream.rb +2 -2
- data/lib/mm_tool/mm_tool_cli.rb +18 -8
- data/lib/mm_tool/user_defaults.rb +13 -0
- data/lib/mm_tool/version.rb +1 -1
- data/mm_tool.gemspec +25 -11
- metadata +36 -9
- data/Gemfile.lock +0 -132
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fd0db5d0f777335f0b0d8ff8f8951f15c637b5369b6aed458a76374c88c25e9
|
4
|
+
data.tar.gz: 4485a6a345ec99299446c1ce1e9bb2669e2fd100855eb008072aeffab17fdd7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 278d8e4b122dfd7249886f2e4645b924b6eb0b527ef56345ec9722637cf848b8d02045e19ebba4816851bf67c9896a0f0c34862fa74b18ca0a895a0031f1f30e
|
7
|
+
data.tar.gz: '00287eb07f06d7d25ac429e35486119253fa95bca403c12d369222da7b8d08d99e284df2bab6148d4af507eacf9f7e46b6e6118caec2fe59ff2f65be0a03edd0'
|
@@ -72,7 +72,7 @@ module MmTool
|
|
72
72
|
info_table_src << ["Disposition Columns:", MmMovie.dispositions.join(', ')]
|
73
73
|
info_table_src << ["Transcode File Location:", self.tempfile ? tempfile&.path : 'n/a']
|
74
74
|
|
75
|
-
info_table = C.bold("Looking for file(s) and processing them with the following options:\n")
|
75
|
+
info_table = C.bold("Looking for file(s) and processing them with the following options:\n").dup
|
76
76
|
info_table << info_table_src.render(:basic) do |renderer|
|
77
77
|
a = @defaults.label_value_pairs.map {|p| p[0].length }.max + 1
|
78
78
|
b = OutputHelper.console_width - a - 2
|
@@ -111,9 +111,12 @@ module MmTool
|
|
111
111
|
output(file_name)
|
112
112
|
output(movie.format_table)
|
113
113
|
output(movie.stream_table)
|
114
|
-
|
115
|
-
|
116
|
-
|
114
|
+
if @defaults[:shell_commands]
|
115
|
+
output("echo '#{File.basename(file_name)}' ; \\", true)
|
116
|
+
output("#{movie.command_rename} ; \\", true)
|
117
|
+
output("#{movie.command_transcode} ; \\", true)
|
118
|
+
output(movie.command_review_post, true)
|
119
|
+
end
|
117
120
|
output("\n\n", true)
|
118
121
|
end
|
119
122
|
end # if
|
data/lib/mm_tool/mm_movie.rb
CHANGED
@@ -127,6 +127,9 @@ module MmTool
|
|
127
127
|
#------------------------------------------------------------
|
128
128
|
def command_transcode
|
129
129
|
command = ["ffmpeg \\"]
|
130
|
+
command << " -hide_banner \\"
|
131
|
+
command << " -loglevel error \\"
|
132
|
+
command << " -stats \\"
|
130
133
|
@streams.each {|stream| command |= [" #{stream.instruction_input}"] if stream.instruction_input }
|
131
134
|
@streams.each {|stream| command << " #{stream.instruction_map}" if stream.instruction_map }
|
132
135
|
@streams.each {|stream| command << " #{stream.instruction_action}" if stream.instruction_action }
|
@@ -145,7 +148,7 @@ module MmTool
|
|
145
148
|
# running the transcode command
|
146
149
|
#------------------------------------------------------------
|
147
150
|
def command_review_post
|
148
|
-
"\"#{$0}\" --no-use-external-subs \"#{output_path}\""
|
151
|
+
"\"#{$0}\" -is --no-use-external-subs \"#{output_path}\""
|
149
152
|
end
|
150
153
|
|
151
154
|
|
@@ -465,9 +465,9 @@ module MmTool
|
|
465
465
|
def encoder_string(for_codec:)
|
466
466
|
case for_codec.downcase
|
467
467
|
when 'hevc'
|
468
|
-
"libx265 -crf 28 -
|
468
|
+
"libx265 -crf 28 -x265-params log-level=error"
|
469
469
|
when 'h264'
|
470
|
-
"libx264 -crf 23
|
470
|
+
"libx264 -crf 23"
|
471
471
|
when 'aac'
|
472
472
|
"libfdk_aac"
|
473
473
|
else
|
data/lib/mm_tool/mm_tool_cli.rb
CHANGED
@@ -106,23 +106,27 @@ module MmTool
|
|
106
106
|
case char
|
107
107
|
|
108
108
|
when 'h'
|
109
|
-
args.insert(1,
|
109
|
+
args.insert(1, '--help')
|
110
110
|
when 'i'
|
111
|
-
args.insert(1,
|
111
|
+
args.insert(1, '--no-info-header')
|
112
112
|
when 'I'
|
113
113
|
args.insert(1, '--info-header')
|
114
|
+
when 's'
|
115
|
+
args.insert(1, '--no-shell-commands')
|
116
|
+
when 'S'
|
117
|
+
args.insert(1, '--shell-commands')
|
114
118
|
when 't'
|
115
|
-
args.insert(1,
|
119
|
+
args.insert(1, '--transcode')
|
116
120
|
when 'T'
|
117
|
-
args.insert(1,
|
121
|
+
args.insert(1, '-no-transcode')
|
118
122
|
when 'u'
|
119
|
-
args.insert(1,
|
123
|
+
args.insert(1, '--no-fix-undefined-language')
|
120
124
|
when 'U'
|
121
|
-
args.insert(1,
|
125
|
+
args.insert(1, '--fix-undefined-language')
|
122
126
|
when 'p'
|
123
|
-
args.insert(1,
|
127
|
+
args.insert(1, '--dump')
|
124
128
|
when 'P'
|
125
|
-
args.insert(1,
|
129
|
+
args.insert(1, '--no-dump')
|
126
130
|
else
|
127
131
|
OutputHelper.print_error_and_exit("Error: option #{C.bold(args[0])} was specified, but I don't know what that means.")
|
128
132
|
end
|
@@ -171,6 +175,12 @@ module MmTool
|
|
171
175
|
when '--info-header'
|
172
176
|
@defaults[:info_header] = true
|
173
177
|
|
178
|
+
when '--no-shell-commands'
|
179
|
+
@defaults[:shell_commands] = false
|
180
|
+
|
181
|
+
when '--shell-commands'
|
182
|
+
@defaults[:shell_commands] = true
|
183
|
+
|
174
184
|
when '--version'
|
175
185
|
puts "#{File.basename $0}, version #{MmTool::VERSION}"
|
176
186
|
exit 0
|
@@ -88,6 +88,19 @@ module MmTool
|
|
88
88
|
HEREDOC
|
89
89
|
},
|
90
90
|
|
91
|
+
:shell_commands => {
|
92
|
+
:default => true,
|
93
|
+
:value => nil,
|
94
|
+
:arg_short => '-s',
|
95
|
+
:arg_long => '--no-shell-commands',
|
96
|
+
:arg_format => nil,
|
97
|
+
:item_label => nil,
|
98
|
+
:help_group => 'Main Options',
|
99
|
+
:help_desc => <<~HEREDOC
|
100
|
+
Don't show the shell commands that should be executed at the end of the output. Good for showing the table only.
|
101
|
+
HEREDOC
|
102
|
+
},
|
103
|
+
|
91
104
|
:version => {
|
92
105
|
:default => false,
|
93
106
|
:value => nil,
|
data/lib/mm_tool/version.rb
CHANGED
data/mm_tool.gemspec
CHANGED
@@ -3,18 +3,28 @@ lib = File.expand_path("../lib", __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require "mm_tool/version"
|
5
5
|
|
6
|
+
|
7
|
+
# We should work with any 2.0 version of Ruby, but I'm no longer testing them
|
8
|
+
# for regressions. Version 2.6.0 goes back to December 2018, and is a suitable
|
9
|
+
# minimum version.
|
10
|
+
|
11
|
+
#rb_needed = ['~> 2.0']
|
12
|
+
|
13
|
+
|
6
14
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name = 'mm_tool'
|
8
|
-
spec.version = MmTool::VERSION
|
9
|
-
spec.authors = ['Jim Derry']
|
10
|
-
spec.email = ['balthisar@gmail.com']
|
11
15
|
|
12
|
-
spec.
|
13
|
-
spec.
|
14
|
-
spec.
|
15
|
-
spec.
|
16
|
+
# spec.required_ruby_version = rb_needed
|
17
|
+
spec.name = 'mm_tool'
|
18
|
+
spec.version = MmTool::VERSION
|
19
|
+
spec.authors = ['Jim Derry']
|
20
|
+
spec.email = ['balthisar@gmail.com']
|
21
|
+
|
22
|
+
spec.summary = 'Curate your movie files.'
|
23
|
+
spec.description = 'A tool for curating your movie files.'
|
24
|
+
spec.homepage = 'https://github.com/balthisar/mm_tool'
|
25
|
+
spec.license = 'MIT'
|
16
26
|
|
17
|
-
spec.platform
|
27
|
+
spec.platform = Gem::Platform::RUBY
|
18
28
|
|
19
29
|
|
20
30
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
@@ -39,13 +49,17 @@ Gem::Specification.new do |spec|
|
|
39
49
|
|
40
50
|
|
41
51
|
# Additional dependencies
|
42
|
-
spec.add_runtime_dependency 'tty', "~>0.10"
|
52
|
+
spec.add_runtime_dependency 'tty-table', "~>0.10"
|
53
|
+
spec.add_runtime_dependency 'tty-command', "~>0.10"
|
54
|
+
spec.add_runtime_dependency 'tty-which', "~>0.4"
|
55
|
+
|
43
56
|
spec.add_runtime_dependency 'streamio-ffmpeg'
|
44
57
|
spec.add_runtime_dependency 'bytesize'
|
45
58
|
spec.add_runtime_dependency 'natural_sort', "0.3.0"
|
46
59
|
|
47
60
|
# Development dependencies
|
48
|
-
spec.add_development_dependency "bundler"
|
61
|
+
spec.add_development_dependency "bundler"
|
49
62
|
spec.add_development_dependency "rake"
|
50
63
|
spec.add_development_dependency 'git'
|
64
|
+
|
51
65
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mm_tool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Derry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: tty
|
14
|
+
name: tty-table
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: tty-command
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.10'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: tty-which
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.4'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.4'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: streamio-ffmpeg
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,16 +98,16 @@ dependencies:
|
|
70
98
|
name: bundler
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
|
-
- - "
|
101
|
+
- - ">="
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
103
|
+
version: '0'
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
|
-
- - "
|
108
|
+
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
110
|
+
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: rake
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,7 +147,6 @@ files:
|
|
119
147
|
- ".gitattributes"
|
120
148
|
- ".gitignore"
|
121
149
|
- Gemfile
|
122
|
-
- Gemfile.lock
|
123
150
|
- LICENSE.md
|
124
151
|
- README.md
|
125
152
|
- Rakefile
|
@@ -158,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
185
|
- !ruby/object:Gem::Version
|
159
186
|
version: '0'
|
160
187
|
requirements: []
|
161
|
-
rubygems_version: 3.0.
|
188
|
+
rubygems_version: 3.0.9
|
162
189
|
signing_key:
|
163
190
|
specification_version: 4
|
164
191
|
summary: Curate your movie files.
|
data/Gemfile.lock
DELETED
@@ -1,132 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
mm_tool (0.1.4)
|
5
|
-
bytesize
|
6
|
-
natural_sort (= 0.3.0)
|
7
|
-
streamio-ffmpeg
|
8
|
-
tty (~> 0.10)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
bytesize (0.1.0)
|
14
|
-
diff-lcs (1.4.4)
|
15
|
-
equatable (0.6.1)
|
16
|
-
git (1.7.0)
|
17
|
-
rchardet (~> 1.8)
|
18
|
-
kramdown (1.16.2)
|
19
|
-
multi_json (1.15.0)
|
20
|
-
natural_sort (0.3.0)
|
21
|
-
necromancer (0.5.1)
|
22
|
-
pastel (0.7.4)
|
23
|
-
equatable (~> 0.6)
|
24
|
-
tty-color (~> 0.5)
|
25
|
-
rake (13.0.1)
|
26
|
-
rchardet (1.8.0)
|
27
|
-
rouge (3.25.0)
|
28
|
-
streamio-ffmpeg (3.0.2)
|
29
|
-
multi_json (~> 1.8)
|
30
|
-
strings (0.1.8)
|
31
|
-
strings-ansi (~> 0.1)
|
32
|
-
unicode-display_width (~> 1.5)
|
33
|
-
unicode_utils (~> 1.4)
|
34
|
-
strings-ansi (0.1.0)
|
35
|
-
thor (0.20.3)
|
36
|
-
tty (0.10.0)
|
37
|
-
bundler (~> 1.16, < 2.0)
|
38
|
-
equatable (~> 0.5)
|
39
|
-
pastel (~> 0.7.2)
|
40
|
-
thor (~> 0.20.0)
|
41
|
-
tty-box (~> 0.4.1)
|
42
|
-
tty-color (~> 0.5)
|
43
|
-
tty-command (~> 0.9.0)
|
44
|
-
tty-config (~> 0.3.2)
|
45
|
-
tty-cursor (~> 0.7)
|
46
|
-
tty-editor (~> 0.5)
|
47
|
-
tty-file (~> 0.8.0)
|
48
|
-
tty-font (~> 0.4.0)
|
49
|
-
tty-logger (~> 0.2.0)
|
50
|
-
tty-markdown (~> 0.6.0)
|
51
|
-
tty-pager (~> 0.12)
|
52
|
-
tty-pie (~> 0.3.0)
|
53
|
-
tty-platform (~> 0.2)
|
54
|
-
tty-progressbar (~> 0.17)
|
55
|
-
tty-prompt (~> 0.19)
|
56
|
-
tty-screen (~> 0.7)
|
57
|
-
tty-spinner (~> 0.9)
|
58
|
-
tty-table (~> 0.11.0)
|
59
|
-
tty-tree (~> 0.3)
|
60
|
-
tty-which (~> 0.4)
|
61
|
-
tty-box (0.4.1)
|
62
|
-
pastel (~> 0.7.2)
|
63
|
-
strings (~> 0.1.6)
|
64
|
-
tty-cursor (~> 0.7)
|
65
|
-
tty-color (0.6.0)
|
66
|
-
tty-command (0.9.0)
|
67
|
-
pastel (~> 0.7.0)
|
68
|
-
tty-config (0.3.2)
|
69
|
-
tty-cursor (0.7.1)
|
70
|
-
tty-editor (0.5.1)
|
71
|
-
tty-prompt (~> 0.19)
|
72
|
-
tty-which (~> 0.4)
|
73
|
-
tty-file (0.8.0)
|
74
|
-
diff-lcs (~> 1.3)
|
75
|
-
pastel (~> 0.7.2)
|
76
|
-
tty-prompt (~> 0.18)
|
77
|
-
tty-font (0.4.0)
|
78
|
-
tty-logger (0.2.0)
|
79
|
-
pastel (~> 0.7.0)
|
80
|
-
tty-markdown (0.6.0)
|
81
|
-
kramdown (~> 1.16.2)
|
82
|
-
pastel (~> 0.7.2)
|
83
|
-
rouge (~> 3.3)
|
84
|
-
strings (~> 0.1.4)
|
85
|
-
tty-color (~> 0.4)
|
86
|
-
tty-screen (~> 0.6)
|
87
|
-
tty-pager (0.13.0)
|
88
|
-
strings (~> 0.1.8)
|
89
|
-
tty-screen (~> 0.8)
|
90
|
-
tty-pie (0.3.0)
|
91
|
-
pastel (~> 0.7.3)
|
92
|
-
tty-cursor (~> 0.7)
|
93
|
-
tty-platform (0.3.0)
|
94
|
-
tty-progressbar (0.17.0)
|
95
|
-
strings-ansi (~> 0.1.0)
|
96
|
-
tty-cursor (~> 0.7)
|
97
|
-
tty-screen (~> 0.7)
|
98
|
-
unicode-display_width (~> 1.6)
|
99
|
-
tty-prompt (0.21.0)
|
100
|
-
necromancer (~> 0.5.0)
|
101
|
-
pastel (~> 0.7.0)
|
102
|
-
tty-reader (~> 0.7.0)
|
103
|
-
tty-reader (0.7.0)
|
104
|
-
tty-cursor (~> 0.7)
|
105
|
-
tty-screen (~> 0.7)
|
106
|
-
wisper (~> 2.0.0)
|
107
|
-
tty-screen (0.8.1)
|
108
|
-
tty-spinner (0.9.3)
|
109
|
-
tty-cursor (~> 0.7)
|
110
|
-
tty-table (0.11.0)
|
111
|
-
equatable (~> 0.6)
|
112
|
-
necromancer (~> 0.5)
|
113
|
-
pastel (~> 0.7.2)
|
114
|
-
strings (~> 0.1.5)
|
115
|
-
tty-screen (~> 0.7)
|
116
|
-
tty-tree (0.4.0)
|
117
|
-
tty-which (0.4.2)
|
118
|
-
unicode-display_width (1.7.0)
|
119
|
-
unicode_utils (1.4.0)
|
120
|
-
wisper (2.0.1)
|
121
|
-
|
122
|
-
PLATFORMS
|
123
|
-
ruby
|
124
|
-
|
125
|
-
DEPENDENCIES
|
126
|
-
bundler (~> 1.17.3)
|
127
|
-
git
|
128
|
-
mm_tool!
|
129
|
-
rake
|
130
|
-
|
131
|
-
BUNDLED WITH
|
132
|
-
1.17.3
|