diff --git a/CLI-Reference.md b/CLI-Reference.md index 3964c5b..fb82e48 100644 --- a/CLI-Reference.md +++ b/CLI-Reference.md @@ -67,7 +67,7 @@ Options: -h, --help Print help information ``` -### Specifying bundle files +#### Specifying bundle files Unless specified otherwise, all commands in this group can operate on multiple bundles at once. When the help output shows `bundle...` as a parameter, the command expects any number of file or directory paths. File paths will be loaded a bundles regardless of their file name. Directories will be searched for files fitting Bitsquid's hashed bundle names (16 hex characters). @@ -123,7 +123,7 @@ Extracts files from the given bundle(s). dtmt bundle inject [OPTIONS] ``` -Inject a file into a single bundle. Only one bundle can be specified. +Injects a file into a single bundle. Only one bundle can be specified. | Flag | Value | Description | |-------------------|-----------|----------------------------------------------------------------------------------------| @@ -141,3 +141,96 @@ Lists the contents of the given bundles. | Flag | Value | Description | |----------|-------|----------------------------------------| | `--json` | | Print output in machine-readable JSON. | + + +### Dictionary + +A collection of commands to operate on the Murmur hash dictionary. + +``` +Usage: dtmt dictionary [OPTIONS] [COMMAND] + +Commands: + lookup Lookup a hash in the dictionary. + add Add strings to the dictionary. Strings are read line by line from the given file. + save Save back the currently loaded dictionary, with hashes pre-computed. Pre-computing hashes speeds up loading large dictionaries, as they would otherwise need to be computed on the fly. + help Print this message or the help of the given subcommand(s) + +Options: + --dict Path to a dictionary file CSV format used to look up pre-computed murmur hashes. + Will default to `dictionary.csv` in the current directory. [default: dictionary.csv] + -h, --help Print help information +``` + +#### Dictionary Lookup + +``` +dtmt dictionary lookup [OPTIONS] +``` + +Looks up the given hash in the dictionary. + +| Flag | Value | Description | +|-----------------|-------|-----------------------------------------| +| `-g`, `--group` | group | Restrict the search to the given group. | + +#### Dictionary Add + +``` +dtmt dictionary add [OPTIONS] +``` + +Reads `` line-by-line and adds each string into the dictionary. + +| Flag | Value | Description | +|-----------------|-------|----------------------------------------------------------| +| `-g`, `--group` | group | The group to assign the strings to. Defaults to `other`. | + +#### Dictionary Save + +``` +dtmt dictionary save +``` + +Saves back the currently loaded dictionary, with hashes pre-computed. This is useful after having edited the dictionary file manualy. + +### Murmur + +A collection of commands to operate on Murmur hashes. + +``` +Usage: dtmt murmur [OPTIONS] [COMMAND] + +Commands: + hash + help Print this message or the help of the given subcommand(s) + +Options: + --dict Path to a dictionary file CSV format used to look up pre-computed murmur hashes. + Will default to `dictionary.csv` in the current directory. [default: dictionary.csv] + -h, --help Print help information +``` + +#### Murmur Hash + +``` +dtmt murmur hash [OPTIONS] +``` + +Creates a Murmur hash from the given string. + +| Flag | Value | Description | +|----------|-------|---------------------------------------------------------------------------------------------------------------| +| `--half` | | Create a Murmur64, using Fatshark's fake 32-bit algorithm that computes the 64-bit hash and takes half of it. | + +### New + +Creates a new mod project from the internal template. + +> Not yet implemented. + +### Watch + +Watches the given mod project for file changes and re-builds it. + +> Not yet implemented. \ No newline at end of file