-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into emmercm/1.6.5
- Loading branch information
Showing
13 changed files
with
359 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Commands | ||
|
||
`igir` takes actions based on commands you specify. Each command has a clear input and output, and `igir` will never take surprise actions you did not specify. Multiple commands can (and will likely) be specified at once. | ||
|
||
!!! tip | ||
|
||
See the `igir --help` message for the list of all commands and options, as well as some examples. | ||
|
||
## ROM writing | ||
|
||
`igir` has three writing commands. Only one writing command can be specified at a time, and all require the `--output` option. | ||
|
||
### `copy` | ||
|
||
Copy ROMs from an input directory to the output directory. | ||
|
||
Files in the input directories will be left alone, they will _not_ be modified or deleted. | ||
|
||
### `move` | ||
|
||
Move ROMs from an input directory to the output directory. The same directory can be specified for both input & output, resulting in ROMs being renamed as their names change in [DATs](dats.md). | ||
|
||
ROMs will be deleted from their input directory after _all_ ROMs for _every_ [DAT](dats.md) have been written. | ||
|
||
### `symlink` | ||
|
||
Create a symbolic link in the output directory to a ROM in the input directory. | ||
|
||
By default, absolute file paths will be used. You can specify the `--symlink-relative` option to use relative file paths. | ||
|
||
## ROM archiving | ||
|
||
`igir` has two ROM archive commands. Archive commands require either the `copy` or `move` write command. Only one archive command can be specified at a time. | ||
|
||
If no archive command is specified, files will be left as-is. If they are already extracted, then they will stay extracted. If they are already archived (including non-`.zip` archives), then they will stay archived. | ||
|
||
!!! note | ||
|
||
See the [archives page](archives.md) for more information on supported archive types. | ||
|
||
### `extract` | ||
|
||
ROMs will be extracted from archives as they are being copied or moved. ROMs from the same game will be placed into a subdirectory together. | ||
|
||
Input ROMs that are _not_ archived will be copied as-is. | ||
|
||
### `zip` | ||
|
||
ROMs will be archived into a `.zip` file as they are being copied or moved. ROMs from the same game will be put into the same `.zip` file. | ||
|
||
ROMs that are already in an archive will be re-archived. | ||
|
||
## ROM verification | ||
|
||
### `test` | ||
|
||
After performing one of the ROM writing commands, verify that the file was written correctly. | ||
|
||
- `extract test` tests that each ROM file written has the correct size & checksum | ||
- `zip test` tests that the `.zip` file has all the correct archive entry sizes & checksums, and contains no excess entries | ||
|
||
## File manipulation | ||
|
||
### `clean` | ||
|
||
Files in the output directory that do not match any ROM in any [DAT](dats.md) will be deleted. | ||
|
||
## ROM reporting | ||
|
||
### `report` | ||
|
||
A report will be generated of what input files were matched by what DAT, and what games in what [DATs](dats.md) have missing ROMs. | ||
|
||
See the [reporting page](output/reporting.md) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Output Tokens | ||
|
||
When specifying a ROM [writing command](../commands.md) you have to specify an `--output` directory. `igir` has a few replaceable "tokens" that can be referenced in the `--output` directory value. This can aid in sorting ROMs into a more complicated directory structure. | ||
|
||
For example, if you want to group all ROMs based on their region, you would specify: | ||
|
||
=== "Windows" | ||
|
||
```batch | ||
igir.exe copy extract --dat *.dat --input ROMs/ --output "ROMs-Sorted/{datReleaseRegion}/" | ||
``` | ||
|
||
=== "macOS" | ||
|
||
```shell | ||
igir copy extract --dat *.dat --input ROMs/ --output "ROMs-Sorted/{datReleaseRegion}/" | ||
``` | ||
|
||
This might result in an output structure such as: | ||
|
||
```text | ||
ROMs-Sorted/ | ||
├── AUS | ||
│ └── Pokemon Pinball (USA, Australia) (Rumble Version) (SGB Enhanced) (GB Compatible).gbc | ||
├── EUR | ||
│ ├── Pokemon - Blue Version (USA, Europe) (SGB Enhanced).gb | ||
│ ├── Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb | ||
│ └── Pokemon - Yellow Version - Special Pikachu Edition (USA, Europe) (CGB+SGB Enhanced).gb | ||
└── USA | ||
├── Pokemon - Blue Version (USA, Europe) (SGB Enhanced).gb | ||
├── Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb | ||
├── Pokemon - Yellow Version - Special Pikachu Edition (USA, Europe) (CGB+SGB Enhanced).gb | ||
└── Pokemon Pinball (USA, Australia) (Rumble Version) (SGB Enhanced) (GB Compatible).gbc | ||
``` | ||
|
||
!!! note | ||
|
||
Tokens can resolve to multiple values for each ROM. For example, a ROM may have multiple regions or languages. This will result in the same ROM being written to multiple locations. | ||
|
||
## DAT information | ||
|
||
When using [DATs](../dats.md), you can make use of console & game information contained in them: | ||
|
||
- `{datName}` the matching DAT's name, similar to how the `--dir-dat-name` option works | ||
- `{datReleaseLanguage}` each of the ROM's language(s) (e.g. `EN`, `ES`, `JA`) | ||
- `{datReleaseRegion}` each of the ROM's region(s) (e.g. `USA`, `EUR`, `JPN`, `WORLD`) | ||
|
||
## File information | ||
|
||
You can use some information about the input and output file's name & location: | ||
|
||
- `{inputDirname}` the input file's dirname (full path minus file basename) | ||
- `{outputBasename}` the output file's basename, equivalent to `{outputName}.{outputExt}` | ||
- `{outputName}` the output file's filename without its extension | ||
- `{outputExt}` the output file's extension | ||
|
||
## Specific hardware | ||
|
||
To help sort ROMs into unique file structures for popular frontends & hardware, `igir` offers a few specific tokens: | ||
|
||
- `{pocket}` the [Analogue Pocket](../usage/hardware/analogue-pocket.md) core's directory for the ROM | ||
- `{mister}` the [MiSTer FPGA](../usage/hardware/mister.md) core's directory for the ROM | ||
- `{onion}` the [OnionOS / GarlicOS](../usage/handheld/onionos.md) emulator's directory for the ROM | ||
|
||
!!! tip | ||
|
||
See the `igir --help` message for the list of all replaceable tokens. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.