mm_tool 0.1.6 → 0.1.8

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: 733fa9ad6f8e6612fa1cff346c70c8d59118a3e2c4327020f48cdc18d2855de4
4
- data.tar.gz: 6b147c962d92d00aa8b3c7cb17487f16c8c43e2da3d484e763069c7d22c8b97b
3
+ metadata.gz: 58f5ac411fa199ac4b62febe8ca5896dfa7b490b4114038d8272681cee38b6d7
4
+ data.tar.gz: bd6f59ce638b8e374ecc63213570a45ae84d7341e1796e3588887ca1ff948de1
5
5
  SHA512:
6
- metadata.gz: 2e02a0d14c36b6293f0f83d98aabf8355c87640983d8dcee1b9e20898bb76f2826dcc3a6523f06edf9db9986f67c0a81eee00e410c8234f280a00098e80d9aca
7
- data.tar.gz: d09e99c83423ee59fb1fa298aa0235dcfe507ff3fdfb2ee6a12f15b23fc7c7eb5088964cda583a3dc17064eadc42b3e56b82bb85314c247390095bcb0c6f8b76
6
+ metadata.gz: 7d32af155244f7019de5b7c9e9e37a89d91cc805463708f7f295efb7ac79b7982673d9d4e39bc18ef98aec00592642e8e1f9ec8e9588a51dd0df6f7bc53e2cbb
7
+ data.tar.gz: db86d0614d20fc56ccf75542966535543cd46a33a90015bfd0644293659a2c77135013bbf44448a0108ef3ffd7f36d85451f4d24454f807893fb2b1ea7eae2a3
@@ -111,10 +111,12 @@ module MmTool
111
111
  output(file_name)
112
112
  output(movie.format_table)
113
113
  output(movie.stream_table)
114
- output("echo '#{File.basename(file_name)}' ; \\", true)
115
- output("#{movie.command_rename} ; \\", true)
116
- output("#{movie.command_transcode} ; \\", true)
117
- output(movie.command_review_post, true)
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
118
120
  output("\n\n", true)
119
121
  end
120
122
  end # if
@@ -148,7 +148,7 @@ module MmTool
148
148
  # running the transcode command
149
149
  #------------------------------------------------------------
150
150
  def command_review_post
151
- "\"#{$0}\" --no-use-external-subs \"#{output_path}\""
151
+ "\"#{$0}\" -is --no-use-external-subs \"#{output_path}\""
152
152
  end
153
153
 
154
154
 
@@ -465,7 +465,7 @@ module MmTool
465
465
  def encoder_string(for_codec:)
466
466
  case for_codec.downcase
467
467
  when 'hevc'
468
- "libx265 -crf 28 -x265-params log-level=error"
468
+ "libx265 -crf 28 -x265-params log-level=error -force_key_frames chapters"
469
469
  when 'h264'
470
470
  "libx264 -crf 23"
471
471
  when 'aac'
@@ -106,23 +106,27 @@ module MmTool
106
106
  case char
107
107
 
108
108
  when 'h'
109
- args.insert(1, "--help")
109
+ args.insert(1, '--help')
110
110
  when 'i'
111
- args.insert(1, "--no-info-header")
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, "--transcode")
119
+ args.insert(1, '--transcode')
116
120
  when 'T'
117
- args.insert(1, "--no-transcode")
121
+ args.insert(1, '-no-transcode')
118
122
  when 'u'
119
- args.insert(1, "--no-fix-undefined-language")
123
+ args.insert(1, '--no-fix-undefined-language')
120
124
  when 'U'
121
- args.insert(1, "--fix-undefined-language")
125
+ args.insert(1, '--fix-undefined-language')
122
126
  when 'p'
123
- args.insert(1, "--dump")
127
+ args.insert(1, '--dump')
124
128
  when 'P'
125
- args.insert(1, "--no-dump")
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,
@@ -1,3 +1,3 @@
1
1
  module MmTool
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mm_tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Derry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-10 00:00:00.000000000 Z
11
+ date: 2023-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-table