Closed justalemon closed 5 years ago
The way it works is that there's a "Program Flags" which is used for the help output: https://github.com/overtools/OWLib/blob/develop/DataTool/ToolFlags.cs and then there are "Tool Flags" which are specific to the tools. https://github.com/overtools/OWLib/blob/develop/DataTool/ToolLogic/Extract/ExtractFlags.cs#L6 Run DataTool --help, it will show you the flags.
We could show the help for each of the flags, but I think that will end up becoming somewhat of a data overload.
I mean, there is a bunch of options thrown up in different orders that you don't end up knowing what it does. Take flake8's flags or options as an example:
C:\Users\lemon>flake8 -h
Usage: flake8 [options] file file ...
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose Print more information about what is happening in
flake8. This option is repeatable and will increase
verbosity each time it is repeated.
-q, --quiet Report only file names, or nothing. This option is
repeatable.
--count Print total number of errors and warnings to standard
error and set the exit code to 1 if total is not
empty.
...
You can see that every parameter ordered from top to bottom with a short readable description, there is about 30-40 parameters and you can read every single one.
While the output of DataTool is a complete mess:
D:\Proyectos\OWLib\dist\Debug>DataTool.exe --help
[Core] DataTool v1.27.0.0-git-tanklib
[Core] CommandLine: ["--help"]
DataTool.exe [--flags] [directory] [mode]
Flags:
flag | help | default
-----------------------------------------------------------------------------------------------------------------------------------
--language -L --lang | Language to load (Needs Value) |
...
Positionals:
index | positional | help
---------------------------------------------
0 | directory | Overwatch Directory
1 | mode | Extraction Mode
Modes:
mode | description {0, -23} | {1, -40}
----------------------------------------------------------------------------------------------
dump-strings | Dump strings {0, -23} | {1}
...
Flags for dump-*Flags for {0}-*
flag | help | default
-------------------------------------------------
--json | Output JSON to stderr | False
--out -o | Output JSON file |
Flags for extract-*Flags for {0}-*
flag | help | default
--------------------------------------------------------------------------------------------
--convert-textures-type | Texture output type | tif
...
index | positional | help
---------------------------------------------
2 | | Output path (Required)
Flags for list-*Flags for {0}-*
flag | help | default
-------------------------------------------------
--json | Output JSON to stderr | False
--out -o | Output JSON file |
Currently, when you run DataTool without arguments the output is:
Anyone that tries this to use it for the first time would think that the following is valid:
But instead you get:
You might be thinking, what is the problem? Well, the correct format is:
Take the following as an example, that works perfectly for me:
If I manage to know how it works, I might send a PR to fix this.