Re-sync README, add missing flags

This commit is contained in:
Matt Nadareski
2025-04-14 10:39:54 -04:00
parent 8d1d192f11
commit c96399ad3d
2 changed files with 1211 additions and 1173 deletions

View File

@@ -151,17 +151,17 @@ Features and Options:
bt, batch Enable batch mode
Run a special mode that takes input files as lists of batch commands to
run sequentially. Each command has to be its own line and must be followed
by a semicolon (`;`). Commented lines may start with either `REM` or `#`.
Multiple batch files are allowed but they will be run independently from
each other.
run sequentially. Each command has to be its own line and must be
followed by a semicolon (`;`). Commented lines may start with either
`REM` or `#`. Multiple batch files are allowed but they will be run
independently from each other.
The following commands are currently implemented:
Set a header field (if default): set(header.field, value);
Parse new file(s): input(datpath, ...);
Perform a dir2dat: d2d(path, ...);
Filter on a field and value: filter(machine.field|item.field, value, [negate = false, [perMachine = false]]);
Filter on a field and value: filter(machine.field|item.field, value, [remove = false, [perMachine = false]]);
Apply a MAME Extra INI for a field: extra(field, inipath);
Perform a split/merge: merge(split|merged|nonmerged|full|device);
Set game names from description: descname();
@@ -172,7 +172,7 @@ Features and Options:
Add new output format(s): format(datformat, ...);
Set the output directory: output(outdir);
Write the internal items: write([overwrite = true]);
Reset the internal state: reset();";
Reset the internal state: reset();
d, d2d, dfd Create DAT(s) from an input directory
Create a DAT file from an input directory or set of files. By default,
@@ -181,9 +181,9 @@ Features and Options:
hashes (CRC, MD5, SHA-1) for each file.
-crc, --include-crc Include CRC32 in output
This enables CRC32 calculation for each of the files. Adding this flag
overrides the default hashing behavior of including CRC32, MD5, and
SHA-1 hashes.
This enables CRC32 calculation for each of the files. Adding this
flag overrides the default hashing behavior of including CRC32, MD5,
and SHA-1 hashes.
-md2, --include-md2 Include MD2 in output
This enables MD2 calculation for each of the files. Adding this flag
@@ -201,38 +201,38 @@ Features and Options:
SHA-1 hashes.
-sha1, --include-sha1 Include SHA-1 in output
This enables SHA-1 calculation for each of the files. Adding this flag
overrides the default hashing behavior of including CRC32, MD5, and
SHA-1 hashes.
This enables SHA-1 calculation for each of the files. Adding this
flag overrides the default hashing behavior of including CRC32, MD5,
and SHA-1 hashes.
-sha256, --include-sha256 Include SHA-256 in output
This enables SHA-256 calculation for each of the files. Adding this flag
overrides the default hashing behavior of including CRC32, MD5, and
SHA-1 hashes.
This enables SHA-256 calculation for each of the files. Adding this
flag overrides the default hashing behavior of including CRC32, MD5,
and SHA-1 hashes.
-sha384, --include-sha384 Include SHA-384 in output
This enables SHA-384 calculation for each of the files. Adding this flag
overrides the default hashing behavior of including CRC32, MD5, and
SHA-1 hashes.
This enables SHA-384 calculation for each of the files. Adding this
flag overrides the default hashing behavior of including CRC32, MD5,
and SHA-1 hashes.
-sha512, --include-sha512 Include SHA-512 in output
This enables SHA-512 calculation for each of the files. Adding this flag
overrides the default hashing behavior of including CRC32, MD5, and
SHA-1 hashes.
This enables SHA-512 calculation for each of the files. Adding this
flag overrides the default hashing behavior of including CRC32, MD5,
and SHA-1 hashes.
-spamsum, --include-spamsum Include SpamSum in output
This enables SpamSum calculation for each of the files. Adding this flag
overrides the default hashing behavior of including CRC32, MD5, and
SHA-1 hashes.
This enables SpamSum calculation for each of the files. Adding this
flag overrides the default hashing behavior of including CRC32, MD5,
and SHA-1 hashes.
-b, --no-automatic-date Don't include date in file name
Normally, the DAT will be created with the date in the file name in
brackets. This flag removes that instead of the default.
-caf, --aaruformats-as-files Treat AaruFormats as regular files
-caf, --aaruformats-as-files Treat AaruFormats as files
Normally, AaruFormats would be processed using their internal hash to
compare against the input DATs. This flag forces all AaruFormats to be
treated like regular files.
compare against the input DATs. This flag forces all AaruFormats to
be treated like regular files.
-aaf, --archives-as-files Treat archives as files
Instead of trying to enumerate the files within archives, treat the
@@ -289,7 +289,7 @@ Features and Options:
output for physical files. Where appropriate, Romba depot files will
be created as well.
--depr, --romba-depth Set depth of depot for outputs
-depr=, --romba-depth= Set depth of depot for outputs
Optionally, set the depth of output depots. Defaults to 4 deep
otherwise.
@@ -308,15 +308,18 @@ Features and Options:
-de=, --description= Set the description of the DAT
Set the description header field for the output DAT(s)
-c=, --category= Set the category of the DAT
Set the category header field for the output DAT(s)
-r=, --root= Set a new rootdir
Set the rootdir (as used by SuperDAT mode) for the output DAT(s).
-c=, --category= Set the category of the DAT
Set the category header field for the output DAT(s)
-v=, --version= Set the version of the DAT
Set the version header field for the output DAT(s)
-da=, --date= Set a new date
Set the date header field for the output DAT(s)
-au=, --author= Set the author of the DAT
Set the author header field for the output DAT(s)
@@ -332,6 +335,12 @@ Features and Options:
-co=, --comment= Set a new comment of the DAT
Set the comment header field for the output DAT(s)
-h=, --header= Set a header skipper to use, blank means all
Set the header special field for the output DAT(s). In file
rebuilding, this flag allows for either all copier headers (using "")
or specific copier headers by name (such as "fds.xml") to determine
if a file matches or not.
-sd, --superdat Enable SuperDAT creation
Set the type flag to "SuperDAT" for the output DAT as well as
preserving the directory structure of the inputted folder, if
@@ -353,13 +362,13 @@ Features and Options:
Exclude any valid item or machine field from outputs. Examples
include: romof, publisher, and offset.
-1g1r, --one-game-per-region [EXPERIMENTAL] Try to ensure one game per region
This allows users to input a list of regions to use to filter on
in order so only one game from each set of parent and clones will be
-1g1r, --one-game-per-region [EXPERIMENTAL] Try to ensure one game per user-defined region
This allows users to input a list of regions to use to filter on in
order so only one game from each set of parent and clones will be
included. This requires either cloneof or romof tags to function
properly.
-reg, --region Add a region for 1G1R
-reg=, --region= Add a region for 1G1R
Add a region (in order) for use with 1G1R filtering. If this is
not supplied, then by default, only parent sets will be included
in the output. Multiple instances of this flag are allowed.
@@ -384,22 +393,16 @@ Features and Options:
information in the output DAT. The output format is standardized as
"yyyy/MM/dd HH:mm:ss".
-h=, --header= Set a header skipper to use, blank means all
Set the header special field for the output DAT(s). In file
rebuilding, this flag allows for either all copier headers (using "")
or specific copier headers by name (such as "fds.xml") to determine
if a file matches or not.
-ini=, --extra-ini= Apply a MAME INI for given field(s)
Apply any valid MAME INI for any valid field in the DatFile. Inputs are
of the form 'Field:path\to\ini'. Multiple instances of this flag are
allowed.
Apply any valid MAME INI for any valid field in the DatFile. Inputs
are of the form 'Field:path\to\ini'. Multiple instances of this flag
are allowed.
-fi=, --filter= Filter a game/rom field with the given value(s)
Filter any valid item or machine field from inputs. Filters are input
in the form 'key=value' or 'key!=value', where the '!' signifies 'not
matching'. Numeric values may also prefix the 'value' with '>', '<', or
'=' accordingly. Key examples include: romof, category, and game.
matching'. Numeric values may also prefix the 'value' with '>', '<',
or '=' accordingly. Key examples include: romof, category, and game.
Additionally, the user can specify an exact match or full C#-style
regex for pattern matching. Multiple instances of this flag are
allowed.
@@ -427,12 +430,12 @@ Features and Options:
This sets an output folder to be used when the files are created. If
a path is not defined, the runtime directory is used instead.
-dep, --depot Assume directories are romba depots
-dep, --depot Assume directories are Romba depots
Normally, input directories will be treated with no special format.
If this flag is used, all input directories will be assumed to be
romba-style depots.
Romba-style depots.
--depd, --depot-depth Set depth of depot for inputs
-depd=, --depot-depth= Set depth of depot for inputs
Optionally, set the depth of input depots. Defaults to 4 deep
otherwise.
@@ -454,10 +457,10 @@ Features and Options:
can only get the CRC and size from most archive formats, leading to
possible issues.
-caf, --aaruformats-as-files Treat AaruFormats as regular files
-caf, --aaruformats-as-files Treat AaruFormats as files
Normally, AaruFormats would be processed using their internal hash to
compare against the input DATs. This flag forces all AaruFormats to be
treated like regular files.
compare against the input DATs. This flag forces all AaruFormats to
be treated like regular files.
-ic, --chds-as-files Treat CHDs as regular files
Normally, CHDs would be processed using their internal hash to
@@ -501,9 +504,9 @@ Features and Options:
and output for physical files. Where appropriate, Romba depot
files will be created as well.
--depr, --romba-depth Set depth of depot for outputs
Optionally, set the depth of output depots. Defaults to 4 deep
otherwise.
-depr=, --romba-depth= Set depth of depot for outputs
Optionally, set the depth of output depots. Defaults to 4
deep otherwise.
-tzip, --torrent-zip Enable Torrent Zip output
Instead of outputting files to folder, files will be rebuilt to
@@ -523,7 +526,7 @@ Features and Options:
children based on the cloneof tag. This is incompatible with the
other --dat-X flags.
-dfm, --dat-full-merged Force creating fully merged sets
-dfm, --dat-full-merged Create fully merged sets
Preprocess the DAT to have parent sets contain all items from the
children based on the cloneof tag while also performing deduplication
within a parent. This is incompatible with the other --dat-X flags.
@@ -692,7 +695,7 @@ Features and Options:
this flag are allowed.
Possible values are:
all - All available report types
all - All available DAT types
csv - Standardized Comma-Separated Value
html - HTML webpage
ssv - Standardized Semicolon-Separated Value
@@ -761,10 +764,26 @@ Features and Options:
-pre=, --prefix= Set prefix for all lines
Set a generic prefix to be prepended to all outputted lines.
Some special strings that can be used:
- %game% / %machine% - Replaced with the Game/Machine name
- %name% - Replaced with the Rom name
- %manufacturer% - Replaced with game Manufacturer
- %publisher% - Replaced with game Publisher
- %category% - Replaced with game Category
- %crc% - Replaced with the CRC
- %md2% - Replaced with the MD2
- %md4% - Replaced with the MD4
- %md5% - Replaced with the MD5
- %sha1% - Replaced with the SHA-1
- %sha256% - Replaced with the SHA-256
- %sha384% - Replaced with the SHA-384
- %sha512% - Replaced with the SHA-512
- %size% - Replaced with the size
-post=, --postfix= Set postfix for all lines
Set a generic postfix to be appended to all outputted lines.
Some special strings that can be used for prefix and postfix:
Some special strings that can be used:
- %game% / %machine% - Replaced with the Game/Machine name
- %name% - Replaced with the Rom name
- %manufacturer% - Replaced with game Manufacturer
@@ -808,9 +827,9 @@ Features and Options:
and output for physical files. Where appropriate, Romba depot
files will be created as well.
--depr, --romba-depth Set depth of depot for outputs
Optionally, set the depth of output depots. Defaults to 4 deep
otherwise.
-depr=, --romba-depth= Set depth of depot for outputs
Optionally, set the depth of output depots. Defaults to 4
deep otherwise.
-dpc, --deprecated Output 'game' instead of 'machine'
By default, Logiqx XML DATs output with the more modern "machine"
@@ -826,12 +845,12 @@ Features and Options:
-de=, --description= Set the description of the DAT
Set the description header field for the output DAT(s)
-c=, --category= Set the category of the DAT
Set the category header field for the output DAT(s)
-r=, --root= Set a new rootdir
Set the rootdir (as used by SuperDAT mode) for the output DAT(s).
-c=, --category= Set the category of the DAT
Set the category header field for the output DAT(s)
-v=, --version= Set the version of the DAT
Set the version header field for the output DAT(s)
@@ -880,13 +899,13 @@ Features and Options:
Exclude any valid item or machine field from outputs. Examples
include: romof, publisher, and offset.
-1g1r, --one-game-per-region [EXPERIMENTAL] Try to ensure one game per region
This allows users to input a list of regions to use to filter on
in order so only one game from each set of parent and clones will be
-1g1r, --one-game-per-region [EXPERIMENTAL] Try to ensure one game per user-defined region
This allows users to input a list of regions to use to filter on in
order so only one game from each set of parent and clones will be
included. This requires either cloneof or romof tags to function
properly.
-reg, --region Add a region for 1G1R
-reg=, --region= Add a region for 1G1R
Add a region (in order) for use with 1G1R filtering. If this is
not supplied, then by default, only parent sets will be included
in the output. Multiple instances of this flag are allowed.
@@ -896,16 +915,16 @@ Features and Options:
output set as a subfolder of the original parent. This flag enables
outputting each rom to its own game for this purpose.
-keg, --keep-empty-games Keep originally empty sets from the input(s)
Normally, any sets that are considered empty will not be included in
the output, this flag allows these empty sets to be added to the
output.
-sds, --scene-date-strip Remove date from scene-named sets
If this flag is enabled, sets with "scene" names will have the date
removed from the beginning. For example "01.01.01-Game_Name-GROUP"
would become "Game_Name-Group".
-keg, --keep-empty-games Keep originally empty sets from the input(s)
Normally, any sets that are considered empty will not be included in
the output, this flag allows these empty sets to be added to the
output.
-clean, --clean Clean game names according to WoD standards
Game names will be sanitized to remove what the original WoD
standards deemed as unneeded information, such as parenthesized or
@@ -929,7 +948,7 @@ Features and Options:
children based on the cloneof tag. This is incompatible with the
other --dat-X flags.
-dfm, --dat-full-merged Force creating fully merged sets
-dfm, --dat-full-merged Create fully merged sets
Preprocess the DAT to have parent sets contain all items from the
children based on the cloneof tag while also performing deduplication
within a parent. This is incompatible with the other --dat-X flags.
@@ -1032,9 +1051,9 @@ Features and Options:
operations. Multiple instances of this flag are allowed.
-bg, --by-game Diff against by game instead of hashes
By default, diffing against uses hashes to determine similar files.
This flag enables using using each game as a comparision point
instead.
By default, diffing against uses hashes to determine similar
files. This flag enables using using each game as a comparision
point instead.
-br, --base-replace Replace from base DATs in order
By default, no item names are changed except when there is a merge
@@ -1044,6 +1063,20 @@ Features and Options:
others will be discarded. If no additional flag is given, it will
default to updating names.
-bd=, --base-dat= Add a base DAT for processing
Add a DAT or folder of DATs to the base set to be used for all
operations. Multiple instances of this flag are allowed.
-uf=, --update-field= Update a game/rom field from base DATs
Update any valid item or machine field from base DAT(s). Examples
include: romof, publisher, and offset.
-ons, --only-same Only update description if machine name matches description
Normally, updating the description will always overwrite if
the machine names are the same. With this flag, descriptions
will only be overwritten if they are the same as the machine
names.
-rbr, --reverse-base-replace Replace item names from base DATs in reverse
By default, no item names are changed except when there is a merge
occurring. This flag enables users to define a DAT or set of base
@@ -1055,12 +1088,10 @@ Features and Options:
-bd=, --base-dat= Add a base DAT for processing
Add a DAT or folder of DATs to the base set to be used for all
operations. Multiple instances of this flag are allowed.
[Both base-replace and reverse-base-replace]
-uf, --update-field Update a game/rom field from base DATs
-uf=, --update-field= Update a game/rom field from base DATs
Update any valid item or machine field from base DAT(s). Examples
include: romof, publisher, and offset.
[Both base-replace and reverse-base-replace]
-ons, --only-same Only update description if machine name matches description
Normally, updating the description will always overwrite if
@@ -1075,6 +1106,11 @@ Features and Options:
allow for the creation of rollback sets or even just reduce the
amount of duplicates across multiple sets.
-sf, --skip-first-output Skip output of first DAT
In times where the first DAT does not need to be written out a
second time, this will skip writing it. This can often speed up
the output process.
-drc, --diff-reverse-cascade Enable reverse cascaded diffing
This flag allows for a special type of diffing in which the last DAT
is considered a base, and for each additional input DAT, it only
@@ -1085,18 +1121,18 @@ Features and Options:
-sf, --skip-first-output Skip output of first DAT
In times where the first DAT does not need to be written out a
second time, this will skip writing it. This can often speed up
the output process. [Both diff-cascade and diff-reverse-cascade]
the output process.
-ini=, --extra-ini= Apply a MAME INI for given field(s)
Apply any valid MAME INI for any valid field in the DatFile. Inputs are
of the form 'Field:path\to\ini'. Multiple instances of this flag are
allowed.
Apply any valid MAME INI for any valid field in the DatFile. Inputs
are of the form 'Field:path\to\ini'. Multiple instances of this flag
are allowed.
-fi=, --filter= Filter a game/rom field with the given value(s)
Filter any valid item or machine field from inputs. Filters are input
in the form 'key=value' or 'key!=value', where the '!' signifies 'not
matching'. Numeric values may also prefix the 'value' with '>', '<', or
'=' accordingly. Key examples include: romof, category, and game.
matching'. Numeric values may also prefix the 'value' with '>', '<',
or '=' accordingly. Key examples include: romof, category, and game.
Additionally, the user can specify an exact match or full C#-style
regex for pattern matching. Multiple instances of this flag are
allowed.
@@ -1116,9 +1152,6 @@ Features and Options:
directory, if set). This flag enables users to write out to the
directory that the DATs originated from.
v, version Prints version
Prints current program version.
ve, verify Verify a folder against DATs
When used, this will use an input DAT or set of DATs to blindly check
against an input folder. The base of the folder is considered the base
@@ -1130,12 +1163,12 @@ Features and Options:
User-supplied DAT for use in all operations. Multiple instances of
this flag are allowed.
-dep, --depot Assume directories are romba depots
-dep, --depot Assume directories are Romba depots
Normally, input directories will be treated with no special format.
If this flag is used, all input directories will be assumed to be
romba-style depots.
Romba-style depots.
--depd, --depot-depth Set depth of depot for inputs
-depd=, --depot-depth= Set depth of depot for inputs
Optionally, set the depth of input depots. Defaults to 4 deep
otherwise.
@@ -1162,10 +1195,10 @@ Features and Options:
or specific copier headers by name (such as "fds.xml") to determine
if a file matches or not.
-caf, --aaruformats-as-files Treat AaruFormats as regular files
-caf, --aaruformats-as-files Treat AaruFormats as files
Normally, AaruFormats would be processed using their internal hash to
compare against the input DATs. This flag forces all AaruFormats to be
treated like regular files.
compare against the input DATs. This flag forces all AaruFormats to
be treated like regular files.
-ic, --chds-as-files Treat CHDs as regular files
Normally, CHDs would be processed using their internal hash to
@@ -1181,7 +1214,7 @@ Features and Options:
children based on the cloneof tag. This is incompatible with the
other --dat-X flags.
-dfm, --dat-full-merged Force creating fully merged sets
-dfm, --dat-full-merged Create fully merged sets
Preprocess the DAT to have parent sets contain all items from the
children based on the cloneof tag while also performing deduplication
within a parent. This is incompatible with the other --dat-X flags.
@@ -1191,30 +1224,30 @@ Features and Options:
children based on the romof and cloneof tags. This is incompatible
with the other --dat-X flags.
-dnd, --dat-device-non-merged Create device non-merged sets
Preprocess the DAT to have child sets contain all items from the
device references. This is incompatible with the other --dat-X flags.
-dnm, --dat-non-merged Force creating non-merged sets
Preprocess the DAT to have child sets contain all items from the
parent set based on the romof and cloneof tags. This is incompatible
with the other --dat-X flags.
-dnd, --dat-device-non-merged Create device non-merged sets
Preprocess the DAT to have child sets contain all items from the
device references. This is incompatible with the other --dat-X flags.
-df, --dat-full-non-merged Create fully non-merged sets
Preprocess the DAT to have child sets contain all items from the
parent sets based on the cloneof and romof tags as well as device
references. This is incompatible with the other --dat-X flags.
-ini=, --extra-ini= Apply a MAME INI for given field(s)
Apply any valid MAME INI for any valid field in the DatFile. Inputs are
of the form 'Field:path\to\ini'. Multiple instances of this flag are
allowed.
Apply any valid MAME INI for any valid field in the DatFile. Inputs
are of the form 'Field:path\to\ini'. Multiple instances of this flag
are allowed.
-fi=, --filter= Filter a game/rom field with the given value(s)
Filter any valid item or machine field from inputs. Filters are input
in the form 'key=value' or 'key!=value', where the '!' signifies 'not
matching'. Numeric values may also prefix the 'value' with '>', '<', or
'=' accordingly. Key examples include: romof, category, and game.
matching'. Numeric values may also prefix the 'value' with '>', '<',
or '=' accordingly. Key examples include: romof, category, and game.
Additionally, the user can specify an exact match or full C#-style
regex for pattern matching. Multiple instances of this flag are
allowed.
@@ -1225,6 +1258,9 @@ Features and Options:
This can allow for more advanced set-building, especially in
arcade-based sets.
v, version Prints version
Prints current program version.
** Section 3.0 - Examples
Here are a few usage examples based on features that are commonly used by most

View File

@@ -24,6 +24,8 @@ namespace SabreTools.Features
// Hash Features
AddFeature(IncludeCrcFlag);
AddFeature(IncludeMd2Flag);
AddFeature(IncludeMd4Flag);
AddFeature(IncludeMd5Flag);
AddFeature(IncludeSha1Flag);
AddFeature(IncludeSha256Flag);