R3EXS 1.1.1 → 2.0.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.
data/bin/R3EXS CHANGED
@@ -1,217 +1,191 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'gli'
5
- require 'R3EXS'
6
-
7
- # 保存全局选项
8
- $global_options = {}
9
-
10
- class App
11
- extend GLI::App
12
-
13
- program_desc 'A tool for extracting and translating strings from the RGSS3 game engine'
14
-
15
- version R3EXS::VERSION
16
-
17
- subcommand_option_handling :normal
18
- arguments :strict
19
-
20
- desc 'Enable verbose mode'
21
- switch [:v, :verbose]
22
-
23
- desc 'Decrypt the Game.rgss3a file'
24
- arg_name '<Game.rgss3a file path>'
25
- command :decrypt do |c|
26
- c.desc 'The *.rvdata2 output dir'
27
- c.default_value './'
28
- c.arg_name 'DIRECTORY'
29
- c.flag [:o, :output_dir]
30
-
31
- c.action do |global_options, options, args|
32
- begin
33
- R3EXS.rgss3a_rvdata2(args[0], options[:output_dir], global_options[:verbose])
34
- puts "#{R3EXS::Utils::GREEN_COLOR}All rvdata2 files have been written to #{options[:output_dir]}#{R3EXS::Utils::RESET_COLOR}"
35
- rescue R3EXS::RGSS3AFileError => e
36
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
37
- $stderr.puts 'Unknown RGSS3A file decrypted type'
38
- rescue SystemCallError => e
39
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.class}: #{e.message}#{R3EXS::Utils::RESET_COLOR}"
40
- end
41
- end
42
- end
43
-
44
- desc 'Serialize rvdata2 files into JSON'
45
- arg_name '<the *.rvdata2 dir>'
46
- command :rvdata2_json do |c|
47
- c.desc 'Enable complete serialization'
48
- c.switch [:c, :complete]
49
-
50
- c.desc 'Enable Scripts.rvdata2 serialization'
51
- c.switch [:s, :with_scripts]
52
-
53
- c.desc 'Enable notes attribute serialization'
54
- c.switch [:n, :with_notes]
55
-
56
- c.desc 'The *.json output dir'
57
- c.default_value './JSON'
58
- c.arg_name 'DIRECTORY'
59
- c.flag [:o, :output_dir]
60
-
61
- c.action do |global_options, options, args|
62
- begin
63
- R3EXS.rvdata2_json(Pathname(args[0]), Pathname(options[:output_dir]), options[:complete], options[:with_scripts], options[:with_notes])
64
- puts "#{R3EXS::Utils::GREEN_COLOR}All JSON files have been written to #{options[:output_dir]}#{R3EXS::Utils::RESET_COLOR}"
65
- rescue R3EXS::Rvdata2FileError => e
66
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
67
- $stderr.puts 'Please make sure the rvdata2 files are not corrupted.'
68
- rescue R3EXS::Rvdata2DirError => e
69
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
70
- end
71
- end
72
- end
73
-
74
- desc 'Deserialize JSON files back into rvdata2'
75
- arg_name '<the *.json dir>'
76
- command :json_rvdata2 do |c|
77
- c.desc 'Enable complete deserialization'
78
- c.switch [:c, :complete]
79
-
80
- c.desc 'Enable Scripts JSON deserialization'
81
- c.switch [:s, :with_scripts]
82
-
83
- c.desc 'The NEW *.rvdata2 output dir'
84
- c.default_value './Data_NEW'
85
- c.arg_name 'DIRECTORY'
86
- c.flag [:o, :output_dir]
87
-
88
- c.desc 'The ORIGINAL *.rvdata2 dir'
89
- c.default_value './Data'
90
- c.arg_name 'DIRECTORY'
91
- c.flag [:r, :original_dir]
92
-
93
- c.action do |global_options, options, args|
94
- begin
95
- R3EXS.json_rvdata2(Pathname(args[0]), Pathname(options[:output_dir]), Pathname(options[:original_dir]), options[:complete], options[:with_scripts])
96
- puts "#{R3EXS::Utils::GREEN_COLOR}All new rvdata2 files have been written to #{options[:output_dir]}#{R3EXS::Utils::RESET_COLOR}"
97
- rescue R3EXS::RPGJsonFileError => e
98
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
99
- $stderr.puts 'Your JSON files are not in RPG module'
100
- $stderr.puts "You are supposed to use '#{R3EXS::Utils::GREEN_COLOR}-c#{R3EXS::Utils::RESET_COLOR}' or '#{R3EXS::Utils::GREEN_COLOR}--complete#{R3EXS::Utils::RESET_COLOR}' to enable complete serialization in #{R3EXS::Utils::GREEN_COLOR}rvdata2_json#{R3EXS::Utils::RESET_COLOR} subcommand"
101
- $stderr.puts "Or #{R3EXS::Utils::RED_COLOR}NOT#{R3EXS::Utils::RESET_COLOR} use '#{R3EXS::Utils::GREEN_COLOR}-c#{R3EXS::Utils::RESET_COLOR}' or '#{R3EXS::Utils::GREEN_COLOR}--complete#{R3EXS::Utils::RESET_COLOR}' to enable complete deserialization in #{R3EXS::Utils::GREEN_COLOR}json_rvdata2#{R3EXS::Utils::RESET_COLOR} subcommand"
102
- $stderr.puts "For more information, please enter '#{R3EXS::Utils::GREEN_COLOR}R3EXS help json_rvdata2#{R3EXS::Utils::RESET_COLOR}'"
103
- rescue R3EXS::R3EXSJsonFileError => e
104
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
105
- $stderr.puts 'Your JSON files are not in R3EXS module'
106
- $stderr.puts "You are #{R3EXS::Utils::RED_COLOR}NOT#{R3EXS::Utils::RESET_COLOR} supposed to use '#{R3EXS::Utils::GREEN_COLOR}-c#{R3EXS::Utils::RESET_COLOR}' or '#{R3EXS::Utils::GREEN_COLOR}--complete#{R3EXS::Utils::RESET_COLOR}' to enable complete serialization in #{R3EXS::Utils::GREEN_COLOR}rvdata2_json#{R3EXS::Utils::RESET_COLOR} subcommand"
107
- $stderr.puts "Or use '#{R3EXS::Utils::GREEN_COLOR}-c#{R3EXS::Utils::RESET_COLOR}' or '#{R3EXS::Utils::GREEN_COLOR}--complete#{R3EXS::Utils::RESET_COLOR}' to enable complete deserialization in #{R3EXS::Utils::GREEN_COLOR}json_rvdata2#{R3EXS::Utils::RESET_COLOR} subcommand"
108
- $stderr.puts "For more information, please enter '#{R3EXS::Utils::GREEN_COLOR}R3EXS help json_rvdata2#{R3EXS::Utils::RESET_COLOR}'"
109
- rescue R3EXS::Rvdata2FileError => e
110
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
111
- $stderr.puts "Your original rvdata2 file seem to be corrupted"
112
- rescue R3EXS::JsonDirError => e
113
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
114
- rescue R3EXS::Rvdata2DirError => e
115
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
116
- $stderr.puts 'You are supposed to privide the original rvdata2 dir in complete deserialization mode'
117
- rescue R3EXS::ScriptsInfoPathError => e
118
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
119
- $stderr.puts "Make sure the Scripts_info.json is in the Scripts directory"
120
- $stderr.puts "For more information, please enter '#{R3EXS::Utils::GREEN_COLOR}R3EXS help rvdata2_json#{R3EXS::Utils::RESET_COLOR}'"
121
- end
122
- end
123
- end
124
-
125
- desc 'Extract all strings'
126
- arg_name '<the *.json dir>'
127
- command :ex_strings do |c|
128
- c.desc 'Enable Scripts extraction'
129
- c.switch [:s, :with_scripts]
130
-
131
- c.desc 'Enable Symbol extraction in Scripts extraction'
132
- c.switch [:y, :with_symbol]
133
-
134
- c.desc 'Enable Scripts extraction into a separate ManualTransFile_scripts.json'
135
- c.switch [:p, :with_scripts_separate]
136
-
137
- c.desc 'The ManualTransFile.json or ManualTransFile_scripts.json output dir'
138
- c.default_value './'
139
- c.arg_name 'DIRECTORY'
140
- c.flag [:o, :output_dir]
141
-
142
- c.action do |global_options, options, args|
143
- begin
144
- R3EXS.ex_strings(Pathname(args[0]), Pathname(options[:output_dir]), options[:with_scripts], options[:with_symbol], options[:with_scripts_separate])
145
- if options[:with_scripts_separate]
146
- puts "#{R3EXS::Utils::GREEN_COLOR}All strings have been extracted to #{File.join(options[:output_dir], 'ManualTransFile.json')} and #{File.join(options[:output_dir], 'ManualTransFile_scripts.json')}#{R3EXS::Utils::RESET_COLOR}"
147
- else
148
- puts "#{R3EXS::Utils::GREEN_COLOR}All strings have been extracted to #{File.join(options[:output_dir], 'ManualTransFile.json')}#{R3EXS::Utils::RESET_COLOR}"
149
- end
150
- rescue R3EXS::R3EXSJsonFileError => e
151
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
152
- $stderr.puts 'Your JSON files are not in R3EXS module'
153
- $stderr.puts "You are #{R3EXS::Utils::RED_COLOR}NOT#{R3EXS::Utils::RESET_COLOR} supposed to use '#{R3EXS::Utils::GREEN_COLOR}-c#{R3EXS::Utils::RESET_COLOR}' or '#{R3EXS::Utils::GREEN_COLOR}--complete#{R3EXS::Utils::RESET_COLOR}' to enable complete serialization in #{R3EXS::Utils::GREEN_COLOR}rvdata2_json#{R3EXS::Utils::RESET_COLOR} subcommand"
154
- $stderr.puts "For more information, please enter '#{R3EXS::Utils::GREEN_COLOR}R3EXS help json_rvdata2#{R3EXS::Utils::RESET_COLOR}'"
155
- rescue R3EXS::JsonDirError => e
156
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
157
- end
158
- end
159
- end
160
-
161
- desc 'Inject all strings'
162
- arg_name '<the *.json dir>'
163
- command :in_strings do |c|
164
- c.desc 'Enable Scripts Injection'
165
- c.switch [:s, :with_scripts]
166
-
167
- c.desc 'The ManualTransFile.json path'
168
- c.default_value './ManualTransFile.json'
169
- c.arg_name 'FILE'
170
- c.flag [:m, :manualtransfile_path]
171
-
172
- c.desc 'The NEW *.json output dir'
173
- c.default_value './JSON_NEW'
174
- c.arg_name 'DIRECTORY'
175
- c.flag [:o, :output_dir]
176
-
177
- c.action do |global_options, options, args|
178
- begin
179
- R3EXS.in_strings(Pathname(args[0]), Pathname(options[:output_dir]), Pathname(options[:manualtransfile_path]), options[:with_scripts])
180
- puts "#{R3EXS::Utils::GREEN_COLOR}All new JSON files have been written to #{options[:output_dir]}#{R3EXS::Utils::RESET_COLOR}"
181
- rescue R3EXS::R3EXSJsonFileError => e
182
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
183
- $stderr.puts 'Your JSON files are not in R3EXS module'
184
- $stderr.puts "You are #{R3EXS::Utils::RED_COLOR}NOT#{R3EXS::Utils::RESET_COLOR} supposed to use '#{R3EXS::Utils::GREEN_COLOR}-c#{R3EXS::Utils::RESET_COLOR}' or '#{R3EXS::Utils::GREEN_COLOR}--complete#{R3EXS::Utils::RESET_COLOR}' to enable complete serialization in #{R3EXS::Utils::GREEN_COLOR}rvdata2_json#{R3EXS::Utils::RESET_COLOR} subcommand"
185
- $stderr.puts "For more information, please enter '#{R3EXS::Utils::GREEN_COLOR}R3EXS help json_rvdata2#{R3EXS::Utils::RESET_COLOR}'"
186
- rescue R3EXS::JsonDirError => e
187
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
188
- rescue R3EXS::ScriptsInfoPathError => e
189
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
190
- $stderr.puts "Make sure the Scripts_info.json is in the Scripts directory"
191
- $stderr.puts "For more information, please enter '#{R3EXS::Utils::GREEN_COLOR}R3EXS help rvdata2_json#{R3EXS::Utils::RESET_COLOR}'"
192
- rescue R3EXS::ManualTransFilePathError => e
193
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{e.message}#{R3EXS::Utils::RESET_COLOR}"
194
- $stderr.puts "You are supposed to use #{R3EXS::Utils::GREEN_COLOR}ex_strings#{R3EXS::Utils::RESET_COLOR} subcommand to generate the ManualTransFile.json"
195
- $stderr.puts "For more information, please enter '#{R3EXS::Utils::GREEN_COLOR}R3EXS help ex_strings#{R3EXS::Utils::RESET_COLOR}'"
196
- end
197
- end
198
- end
199
-
200
- pre do |global, command, options, args|
201
- $global_options = global
202
- true
203
- end
204
-
205
- post do |global, command, options, args|
206
- end
207
-
208
- on_error do |exception|
209
- # Error logic here
210
- # return false to skip default error handling
211
- $stderr.puts "#{R3EXS::Utils::RED_COLOR}#{exception.message}#{R3EXS::Utils::RESET_COLOR}"
212
- $stderr.puts exception.backtrace
213
- false
214
- end
215
- end
216
-
217
- exit App.run(ARGV)
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'gli'
5
+ require 'R3EXS'
6
+
7
+ class App
8
+ extend GLI::App
9
+
10
+ program_desc 'A tool for extracting and translating strings from the RGSS3 game engine'
11
+
12
+ version R3EXS::VERSION
13
+
14
+ subcommand_option_handling :normal
15
+ arguments :strict
16
+
17
+ desc 'Enable verbose mode'
18
+ switch %i[v verbose]
19
+
20
+ desc 'Decrypt the Game.rgss3a file'
21
+ arg_name '<Game.rgss3a file path>'
22
+ command :decrypt do |c|
23
+ c.desc 'The *.rvdata2 output dir'
24
+ c.default_value './'
25
+ c.arg_name 'DIRECTORY'
26
+ c.flag %i[o output_dir]
27
+
28
+ c.action do |global_options, options, args|
29
+ R3EXS.rgss3a_rvdata2(args[0], options[:output_dir], global_options[:verbose])
30
+ R3EXS::Logger.info("All rvdata2 files have been written to #{options[:output_dir]}")
31
+ rescue R3EXS::RGSS3AFileError => e
32
+ R3EXS::Logger.warn(e.message)
33
+ rescue SystemCallError => e
34
+ R3EXS::Logger.warn("#{e.class}: #{e.message}")
35
+ end
36
+ end
37
+
38
+ desc 'Serialize rvdata2 files into JSON'
39
+ arg_name '<the *.rvdata2 dir>'
40
+ command :rvdata2_json do |c|
41
+ c.desc 'Enable complete serialization'
42
+ c.switch %i[c complete]
43
+
44
+ c.desc 'Enable Scripts.rvdata2 serialization'
45
+ c.switch %i[s with_scripts]
46
+
47
+ c.desc 'The *.json output dir'
48
+ c.default_value './JSON'
49
+ c.arg_name 'DIRECTORY'
50
+ c.flag %i[o output_dir]
51
+
52
+ c.action do |_global_options, options, args|
53
+ R3EXS.rvdata2_json(Pathname(args[0]), Pathname(options[:output_dir]), options[:complete], options[:with_scripts])
54
+ R3EXS::Logger.info("All JSON files have been written to #{options[:output_dir]}")
55
+ rescue R3EXS::Rvdata2DirError => e
56
+ R3EXS::Logger.warn(e.message)
57
+ end
58
+ end
59
+
60
+ desc 'Deserialize JSON files back into rvdata2'
61
+ arg_name '<the *.json dir>'
62
+ command :json_rvdata2 do |c|
63
+ c.desc 'Enable complete deserialization'
64
+ c.switch %i[c complete]
65
+
66
+ c.desc 'Enable Scripts JSON deserialization'
67
+ c.switch %i[s with_scripts]
68
+
69
+ c.desc 'The NEW *.rvdata2 output dir'
70
+ c.default_value './Data_NEW'
71
+ c.arg_name 'DIRECTORY'
72
+ c.flag %i[o output_dir]
73
+
74
+ c.desc 'The ORIGINAL *.rvdata2 dir'
75
+ c.default_value './Data'
76
+ c.arg_name 'DIRECTORY'
77
+ c.flag %i[r original_dir]
78
+
79
+ c.action do |_global_options, options, args|
80
+ R3EXS.json_rvdata2(Pathname(args[0]), Pathname(options[:output_dir]), Pathname(options[:original_dir]), options[:complete], options[:with_scripts])
81
+ R3EXS::Logger.info("All new rvdata2 files have been written to #{options[:output_dir]}")
82
+ rescue R3EXS::JsonDirError => e
83
+ R3EXS::Logger.warn(e.message)
84
+ rescue R3EXS::RPGJsonFileError => e
85
+ R3EXS::Logger.warn(e.message)
86
+ R3EXS::Logger.warn('Your JSON files are not in RPG module')
87
+ R3EXS::Logger.warn("You are supposed to use '-c' or '--complete' to enable complete serialization in rvdata2_json subcommand")
88
+ R3EXS::Logger.warn("Or NOT use '-c' or '--complete' to enable complete deserialization in json_rvdata2 subcommand")
89
+ R3EXS::Logger.warn("For more information, please enter 'R3EXS help json_rvdata2'")
90
+ rescue R3EXS::R3EXSJsonFileError => e
91
+ R3EXS::Logger.warn(e.message)
92
+ R3EXS::Logger.warn('Your JSON files are not in R3EXS module')
93
+ R3EXS::Logger.warn("You are NOT supposed to use '-c' or '--complete' to enable complete serialization in rvdata2_json subcommand")
94
+ R3EXS::Logger.warn("Or use '-c' or '--complete' to enable complete deserialization in json_rvdata2 subcommand")
95
+ R3EXS::Logger.warn("For more information, please enter 'R3EXS help json_rvdata2'")
96
+ rescue R3EXS::Rvdata2PathError => e
97
+ R3EXS::Logger.warn(e.message)
98
+ rescue R3EXS::ScriptsInfoPathError => e
99
+ R3EXS::Logger.warn(e.message)
100
+ R3EXS::Logger.warn('Make sure the Scripts_info.json is in the Scripts directory')
101
+ R3EXS::Logger.warn("For more information, please enter 'R3EXS help rvdata2_json'")
102
+ end
103
+ end
104
+
105
+ desc 'Extract all strings'
106
+ arg_name '<the *.json dir>'
107
+ command :ex_strings do |c|
108
+ c.desc 'Enable Scripts extraction'
109
+ c.switch %i[s with_scripts]
110
+
111
+ c.desc 'Enable Symbol extraction in Scripts extraction'
112
+ c.switch %i[y with_symbol]
113
+
114
+ c.desc 'Enable Scripts extraction into a separate ManualTransFile_scripts.json'
115
+ c.switch %i[p with_scripts_separate]
116
+
117
+ c.desc 'The ManualTransFile.json or ManualTransFile_scripts.json output dir'
118
+ c.default_value './'
119
+ c.arg_name 'DIRECTORY'
120
+ c.flag %i[o output_dir]
121
+
122
+ c.action do |_global_options, options, args|
123
+ R3EXS.ex_strings(Pathname(args[0]), Pathname(options[:output_dir]), options[:with_scripts], options[:with_symbol], options[:with_scripts_separate])
124
+ if options[:with_scripts_separate]
125
+ R3EXS::Logger.info("All strings have been extracted to #{File.join(options[:output_dir], 'ManualTransFile.json')} and #{File.join(options[:output_dir], 'ManualTransFile_scripts.json')}")
126
+ else
127
+ R3EXS::Logger.info("All strings have been extracted to #{File.join(options[:output_dir], 'ManualTransFile.json')}")
128
+ end
129
+ rescue R3EXS::JsonDirError => e
130
+ R3EXS::Logger.warn(e.message)
131
+ rescue R3EXS::R3EXSJsonFileError => e
132
+ R3EXS::Logger.warn(e.message)
133
+ R3EXS::Logger.warn('Your JSON files are not in R3EXS module')
134
+ R3EXS::Logger.warn("You are NOT supposed to use '-c' or '--complete' to enable complete serialization in rvdata2_json subcommand")
135
+ R3EXS::Logger.warn("For more information, please enter 'R3EXS help json_rvdata2'")
136
+ end
137
+ end
138
+
139
+ desc 'Inject all strings'
140
+ arg_name '<the *.json dir>'
141
+ command :in_strings do |c|
142
+ c.desc 'Enable Scripts Injection'
143
+ c.switch %i[s with_scripts]
144
+
145
+ c.desc 'The ManualTransFile.json path'
146
+ c.default_value './ManualTransFile.json'
147
+ c.arg_name 'FILE'
148
+ c.flag %i[m manualtransfile_path]
149
+
150
+ c.desc 'The NEW *.json output dir'
151
+ c.default_value './JSON_NEW'
152
+ c.arg_name 'DIRECTORY'
153
+ c.flag %i[o output_dir]
154
+
155
+ c.action do |_global_options, options, args|
156
+ R3EXS.in_strings(Pathname(args[0]), Pathname(options[:output_dir]), Pathname(options[:manualtransfile_path]), options[:with_scripts])
157
+ R3EXS::Logger.info("All new JSON files have been written to #{options[:output_dir]}")
158
+ rescue R3EXS::ManualTransFilePathError => e
159
+ R3EXS::Logger.warn(e.message)
160
+ R3EXS::Logger.warn('You are supposed to use ex_strings subcommand to generate the ManualTransFile.json')
161
+ R3EXS::Logger.warn("For more information, please enter 'R3EXS help ex_strings'")
162
+ rescue R3EXS::JsonDirError => e
163
+ R3EXS::Logger.warn(e.message)
164
+ rescue R3EXS::R3EXSJsonFileError => e
165
+ R3EXS::Logger.warn(e.message)
166
+ R3EXS::Logger.warn('Your JSON files are not in R3EXS module')
167
+ R3EXS::Logger.warn("You are NOT supposed to use '-c' or '--complete' to enable complete serialization in rvdata2_json subcommand")
168
+ R3EXS::Logger.warn("For more information, please enter 'R3EXS help json_rvdata2'")
169
+ rescue R3EXS::ScriptsInfoPathError => e
170
+ R3EXS::Logger.warn(e.message)
171
+ R3EXS::Logger.warn('Make sure the Scripts_info.json is in the Scripts directory')
172
+ R3EXS::Logger.warn("For more information, please enter 'R3EXS help rvdata2_json'")
173
+ end
174
+ end
175
+
176
+ pre do |global, _command, _options, _args|
177
+ R3EXS::Logger.level = R3EXS::Logger::DEBUG if global[:verbose]
178
+ true
179
+ end
180
+
181
+ post do |_global, _command, _options, _args|
182
+ end
183
+
184
+ on_error do |exception|
185
+ R3EXS::Logger.warn(exception.message)
186
+ exception.backtrace.each { |line| R3EXS::Logger.warn(line) }
187
+ false
188
+ end
189
+ end
190
+
191
+ exit App.run(ARGV)