[SabreTools, Flags, DatFiles/, Utilities] Fix flags

Fix some long flag names to be more descriptive
This commit is contained in:
Matt Nadareski
2018-01-08 11:34:56 -08:00
parent b25bb249ce
commit 326a09a52d
8 changed files with 710 additions and 644 deletions

View File

@@ -5591,15 +5591,15 @@ namespace SabreTools.Library.DatFiles
}
//MAME Listroms
if ((DatFormat & DatFormat.Listroms) != 0
if ((DatFormat & DatFormat.Listrom) != 0
&& (DatFormat & DatFormat.AttractMode) == 0)
{
outfileNames.Add(DatFormat.Listroms, CreateOutfileNamesHelper(outDir, ".txt", overwrite));
outfileNames.Add(DatFormat.Listrom, CreateOutfileNamesHelper(outDir, ".txt", overwrite));
}
if ((DatFormat & DatFormat.Listroms) != 0
if ((DatFormat & DatFormat.Listrom) != 0
&& (DatFormat & DatFormat.AttractMode) != 0)
{
outfileNames.Add(DatFormat.Listroms, CreateOutfileNamesHelper(outDir, ".lr.txt", overwrite));
outfileNames.Add(DatFormat.Listrom, CreateOutfileNamesHelper(outDir, ".lr.txt", overwrite));
}
// Logiqx XML

View File

@@ -21,21 +21,21 @@ using NaturalSort;
namespace SabreTools.Library.DatFiles
{
/// <summary>
/// Represents parsing and writing of a MAME Listroms DAT
/// Represents parsing and writing of a MAME Listrom DAT
/// </summary>
internal class Listroms : DatFile
internal class Listrom : DatFile
{
/// <summary>
/// Constructor designed for casting a base DatFile
/// </summary>
/// <param name="datFile">Parent DatFile to copy from</param>
public Listroms(DatFile datFile)
public Listrom(DatFile datFile)
: base(datFile, cloneHeader: false)
{
}
/// <summary>
/// Parse a MAME Listroms DAT and return all found games and roms within
/// Parse a MAME Listrom DAT and return all found games and roms within
/// </summary>
/// <param name="filename">Name of the file to be parsed</param>
/// <param name="sysid">System ID for the DAT</param>
@@ -44,7 +44,7 @@ namespace SabreTools.Library.DatFiles
/// <param name="clean">True if game names are sanitized, false otherwise (default)</param>
/// <param name="remUnicode">True if we should remove non-ASCII characters from output, false otherwise (default)</param>
/// <remarks>
/// In a new style MAME listroms DAT, each game has the following format:
/// In a new style MAME listrom DAT, each game has the following format:
///
/// ROMs required for driver "005".
/// Name Size Checksum

View File

@@ -208,10 +208,10 @@ namespace SabreTools.Library.Data
MissFile = AttractMode << 1,
CSV = MissFile << 1,
TSV = CSV << 1,
Listroms = TSV << 1,
Listrom = TSV << 1,
// SFV-similar Formats
RedumpSFV = Listroms << 1,
RedumpSFV = Listrom << 1,
RedumpMD5 = RedumpSFV << 1,
RedumpSHA1 = RedumpMD5 << 1,
RedumpSHA256 = RedumpSHA1 << 1,

View File

@@ -169,30 +169,30 @@ Options:
current date. It will also treat all archives as possible games and add
all three hashes for each file.
-nm, --noMD5 Don't include MD5 in output
-nm, --skip-md5 Don't include MD5 in output
This allows the user to skip calculating the MD5 for each of the
files which will speed up the creation of the DAT.
-ns, --noSHA1 Don't include SHA1 in output
-ns, --skip-sha1 Don't include SHA1 in output
This allows the user to skip calculating the SHA-1 for each of the
files which will speed up the creation of the DAT.
-ns256, --noSHA256 Include SHA-256 in output
-ns256, --skip-sha256 Include SHA-256 in output
This allows the user to include calculating the SHA-256 for each of
the files which will speed up the creation of the DAT.
(Will be inverted later)
-ns384, --noSHA384 Include SHA-384 in output
-ns384, --skip-sha384 Include SHA-384 in output
This allows the user to include calculating the SHA-384 for each of
the files which will speed up the creation of the DAT.
(Will be inverted later)
-ns512, --noSHA512 Include SHA-512 in output
-ns512, --skip-sha512 Include SHA-512 in output
This allows the user to include calculating the SHA-512 for each of
the files which will speed up the creation of the DAT.
(Will be inverted later)
-b, --bare Don't include date in file name
-b, --no-automatic-date Don't include date in file name
Normally, the DAT will be created with the date in the file name.
This flag removes that but keeps the date tag intact.
@@ -200,7 +200,7 @@ Options:
Set the forcepacking flag to one of the supported values:
None, Zip, Unzip
-f, --files Treat archives as files
-f, --archives-as-files Treat archives as files
Instead of trying to enumerate the files within archives, treat the
archives as files themselves. This is good for uncompressed sets
that include archives that should be read as-is.
@@ -209,7 +209,7 @@ Options:
Add outputting the created DAT in all available formats. See
specific formats for additional flags that may be used.
-oam, --output-am Output in AttractMode format
-oam, --output-attractmode Output in AttractMode format
Add outputting the created DAT to AttractMode format
-oc, --output-cmp Output in CMP format
@@ -218,10 +218,10 @@ Options:
-ocsv, --output-csv Output in Comma-Separated Value format
Add outputting the created DAT to standardized CSV format
-od, --output-dc Output in DOSCenter format
-od, --output-doscenter Output in DOSCenter format
Add outputting the created DAT to DOSCenter format
-olr, --output-lr Output in MAME Listrom format
-olr, --output-listrom Output in MAME Listrom format
Add outputting the created DAT to MAME Listrom format
-om, --output-miss Output in Missfile format
@@ -230,13 +230,13 @@ Options:
-omd5, --output-md5 Output in MD5 format
Add outputting the created DAT to MD5 format
-ool, --output-ol Output in OfflineList format
-ool, --output-offlinelist Output in OfflineList format
Add outputting the created DAT to OfflineList XML format
-or, --output-rc Output in RomCenter format
-or, --output-romcenter Output in RomCenter format
Add outputting the created DAT to RomCenter format
-os, --output-sd Output in SabreDAT format
-os, --output-sabredat Output in SabreDAT format
Add outputting the created DAT to SabreDAT XML format
-osfv, --output-sfv Output in SFV format
@@ -254,7 +254,7 @@ Options:
-osha512, --output-sha512 Output in SHA-512 format
Add outputting the created DAT to SHA-512 format
-osl, --output-sl Output in Software List format
-osl, --output-softwarelist Output in Software List format
Add outputting the created DAT to Software List XML format
-otsv, --output-tsv Output in Tab-Separated Value format
@@ -268,10 +268,10 @@ Options:
depot. This implies that the files will be in the TorrentGZ format
as well, including naming convention.
-ska, --skiparc Skip archive files
-ska, --skip-archives Skip archive files
Skip any files that are treated like archives
-skf, --skipfile Skip non-archive files
-skf, --skip-files Skip non-archive files
Skip any files that are not treated like archives
-f=, --filename= Set the external name of the DAT
@@ -321,7 +321,7 @@ Options:
removed from the beginning. For example "01.01.01-Game_Name-GROUP"
would become "Game_Name-Group".
-ab, --add-blank Output blank files for folders
-ab, --add-blank-files Output blank files for folders
If this flag is set, then blank entries will be created for each of
the empty directories in the source. This is useful for tools that
require all folders be accounted for in the output DAT.
@@ -345,7 +345,7 @@ Options:
that skipper exists, then it will be used instead of trying to find
one that matches.
-ic, --ignore-chd Treat CHDs as regular files
-ic, --chds-as-files Treat CHDs as regular files
Normally, CHDs would be processed using their internal hash to
compare against the input DATs. This flag forces all CHDs to
be treated like regular files.
@@ -420,7 +420,7 @@ Options:
Add outputting the created DAT in all available formats. See
specific formats for additional flags that may be used.
-oam, --output-am Output in AttractMode format
-oam, --output-attractmode Output in AttractMode format
Add outputting the created DAT to AttractMode format
-oc, --output-cmp Output in CMP format
@@ -429,10 +429,10 @@ Options:
-ocsv, --output-csv Output in Comma-Separated Value format
Add outputting the created DAT to standardized CSV format
-od, --output-dc Output in DOSCenter format
-od, --output-doscenter Output in DOSCenter format
Add outputting the created DAT to DOSCenter format
-olr, --output-lr Output in MAME Listrom format
-olr, --output-listrom Output in MAME Listrom format
Add outputting the created DAT to MAME Listrom format
-om, --output-miss Output in Missfile format
@@ -441,13 +441,13 @@ Options:
-omd5, --output-md5 Output in MD5 format
Add outputting the created DAT to MD5 format
-ool, --output-ol Output in OfflineList format
-ool, --output-offlinelist Output in OfflineList format
Add outputting the created DAT to OfflineList XML format
-or, --output-rc Output in RomCenter format
-or, --output-romcenter Output in RomCenter format
Add outputting the created DAT to RomCenter format
-os, --output-sd Output in SabreDAT format
-os, --output-sabredat Output in SabreDAT format
Add outputting the created DAT to SabreDAT XML format
-osfv, --output-sfv Output in SFV format
@@ -465,7 +465,7 @@ Options:
-osha512, --output-sha512 Output in SHA-512 format
Add outputting the created DAT to SHA-512 format
-osl, --output-sl Output in Software List format
-osl, --output-softwarelist Output in Software List format
Add outputting the created DAT to Software List XML format
-otsv, --output-tsv Output in Tab-Separated Value format
@@ -483,7 +483,7 @@ Options:
writing them out to the runtime folder by default (or the output
folder if overridden).
-es, --ext Split a DAT by two file extensions
-es, --extension Split a DAT by two file extensions
For a DAT, or set of DATs, allow for splitting based on a list of
input extensions. This can allow for combined DAT files, such as
those combining two separate systems, to be split. Files with any
@@ -572,7 +572,7 @@ Options:
to the temp folder. On the downside, it can only get the CRC and
size from most archive formats, leading to possible issues.
-ic, --ignore-chd Treat CHDs as regular files
-ic, --chds-as-files Treat CHDs as regular files
Normally, CHDs would be processed using their internal hash to
compare against the input DATs. This flag forces all CHDs to
be treated like regular files.
@@ -583,7 +583,7 @@ Options:
This will technically invalidate the output files as proper
TorrentZip files because the date will not match the standard.
-t7z Enable Torrent 7zip output
-t7z, --torrent-7zip Enable Torrent 7zip output
Instead of ouputting the files to folder, files will be rebuilt to
Torrent7Zip (T7Z) files. This format is based on the LZMA container
format 7zip, but with custom header information. This is currently
@@ -597,7 +597,7 @@ Options:
formats around it. It is widely used in backup applications and
source code archives.
-tgz Enable Torrent GZ output
-tgz, --torrent-gzip Enable Torrent GZ output
Instead of outputting the files to folder, files will be rebuilt to
TorrentGZ (TGZ) files. This format is based on the GZip archive
format, but with custom header information and a file name replaced
@@ -613,48 +613,48 @@ Options:
files, .romba_size and .romba_size.backup, that have the
compressed size of the folder inside for use with Romba.
-tlrz Enable Torrent Long-Range Zip output [UNIMPLEMENTED]
-tlrz, --torrent-lrzip Enable Torrent Long-Range Zip output [UNIMPLEMENTED]
Instead of ouputting the files to folder, files will be rebuilt to
Torrent Long-Range Zip (TLRZ) files. This format is based on the
LRZip file format as defined at https://github.com/ckolivas/lrzip
but with custom header information. This is currently unused by any
major application.
-tlz4 Enable Torrent LZ4 output [UNIMPLEMENTED]
-tlz4, --torrent-lz4 Enable Torrent LZ4 output [UNIMPLEMENTED]
Instead of ouputting the files to folder, files will be rebuilt to
Torrent LZ4 (TLZ4) files. This format is based on the LZ4 file
format as defined at https://github.com/lz4/lz4 but with custom
header information. This is currently unused by any major
application.
-trar Enable Torrent RAR output [UNIMPLEMENTED]
-trar, --torrent-rar Enable Torrent RAR output [UNIMPLEMENTED]
Instead of outputting files to folder, files will be rebuilt to
Torrent RAR (TRAR) files. This format is based on the RAR propietary
format but with custom header information. This is currently unused
by any major application.
-txz Enable Torrent XZ output [UNSUPPORTED]
-txz, --torrent-xz Enable Torrent XZ output [UNSUPPORTED]
Instead of outputting files to folder, files will be rebuilt to
Torrent XZ (TXZ) files. This format is based on the LZMA container
format XZ, but with custom header information. This is currently
unused by any major application. Currently does not produce proper
Torrent-compatible outputs.
-tzip Enable Torrent Zip output
-tzip, --torrent-zip Enable Torrent Zip output
Instead of ouputting files to folder, files will be rebuilt to
TorrentZip (TZip) files. This format is based on the ZIP archive
format, but with custom header information. This is primarily used
by external tool RomVault (http://www.romvault.com/) and is already
widely used.
-tzpaq Enable Torrent ZPAQ output [UNIMPLEMENTED]
-tzpaq, --torrent-zpaq Enable Torrent ZPAQ output [UNIMPLEMENTED]
Instead of ouputting the files to folder, files will be rebuilt to
Torrent ZPAQ (TZPAQ) files. This format is based on the ZPAQ file
format as defined at https://github.com/zpaq/zpaq but with custom
header information. This is currently unused by any major
application.
-tzstd Enable Torrent Zstd output [UNIMPLEMENTED]
-tzstd, --torrent-zstd Enable Torrent Zstd output [UNIMPLEMENTED]
Instead of ouputting the files to folder, files will be rebuilt to
Torrent Zstd (TZstd) files. This format is based on the Zstd file
format as defined at https://github.com/skbkontur/ZstdNet but with
@@ -695,17 +695,17 @@ Options:
children based on the romof and cloneof tags. This is incompatible
with the other --dat-X flags.
-dnm, --dat-nonmerged Force creating non-merged sets
-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 cloneof tag. This is incompatible with the
other --dat-X flags.
-dnd, --dat-devnonmerged Force creating device non-merged sets
-dnd, --dat-device-non-merged Force creating 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-fullnonmerged Force creating fully non-merged sets
-df, --dat-full-non-merged Force creating 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.
@@ -736,7 +736,7 @@ Options:
-as, --all-stats Write all statistics to all available formats
Output all rom information to all available formats
-bc, --baddump-col Add statistics for baddumps to output
-bc, --baddump-column Add statistics for baddumps to output
Add a new column or field for counting the number of baddumps in the
DAT
@@ -754,7 +754,7 @@ Options:
This will output by default the combined statistics for all input
DAT files.
-nc, --nodump-col Add statistics for nodumps to output
-nc, --nodump-column Add statistics for nodumps to output
Add a new column or field for counting the number of nodumps in the
DAT
@@ -780,7 +780,7 @@ Options:
Add outputting the created DAT in all available formats. See
specific formats for additional flags that may be used.
-oam, --output-am Output in AttractMode format
-oam, --output-attractmode Output in AttractMode format
Add outputting the created DAT to AttractMode format
-oc, --output-cmp Output in CMP format
@@ -809,10 +809,10 @@ Options:
-q, --quotes Put double-quotes around each item
This quotes only the item and not the prefix and postfix
-od, --output-dc Output in DOSCenter format
-od, --output-doscenter Output in DOSCenter format
Add outputting the created DAT to DOSCenter format
-olr, --output-lr Output in MAME Listrom format
-olr, --output-listrom Output in MAME Listrom format
Add outputting the created DAT to MAME Listrom format
-om, --output-miss Output in Missfile format
@@ -852,7 +852,7 @@ Options:
-re=, --rep-ext= Replace all extensions with specified
When an extension exists, replace it with the provided instead
-rme, --rem-ext Remove all extensions from all items
-rme, --remove-extensions Remove all extensions from all items
For each item, the extension is removed
-ro, --romba Output in Romba format (requires SHA-1)
@@ -867,13 +867,13 @@ Options:
This allows for the name of the game to be used as a prefix to
each file
-ool, --output-ol Output in OfflineList format
-ool, --output-offlinelist Output in OfflineList format
Add outputting the created DAT to OfflineList XML format
-or, --output-rc Output in RomCenter format
-or, --output-romcenter Output in RomCenter format
Add outputting the created DAT to RomCenter format
-os, --output-sd Output in SabreDAT format
-os, --output-sabredat Output in SabreDAT format
Add outputting the created DAT to SabreDAT XML format
-osfv, --output-sfv Output in SFV format
@@ -911,7 +911,7 @@ Options:
This allows for the name of the game to be used as a prefix to
each file
-osl, --output-sl Output in Software List format
-osl, --output-softwarelist Output in Software List format
Add outputting the created DAT to Software List XML format
-otsv, --output-tsv Output in Tab-Separated Value format
@@ -1008,32 +1008,32 @@ Options:
standards deemed as unneeded information, such as parenthized or
bracketed strings
-ru, --rem-uni Remove unicode characters from names
-ru, --remove-unicode Remove unicode characters from names
By default, the character set from the original file(s) will be used
for item naming. This flag removes all Unicode characters from the
item names, machine names, and machine descriptions.
-rmd5, --rem-md5 Remove MD5 hashes from the output
-rmd5, --remove-md5 Remove MD5 hashes from the output
By default, all available hashes will be written out to the DAT.
This will remove all MD5 hashes from the output file(s).
-rsha1, --rem-sha1 Remove SHA-1 hashes from the output
-rsha1, --remove-sha1 Remove SHA-1 hashes from the output
By default, all available hashes will be written out to the DAT.
This will remove all SHA-1 hashes from the output file(s).
-rsha256, --rem-sha256 Remove SHA-256 hashes from the output
-rsha256, --remove-sha256 Remove SHA-256 hashes from the output
By default, all available hashes will be written out to the DAT.
This will remove all SHA-256 hashes from the output file(s).
-rsha384, --rem-sha384 Remove SHA-384 hashes from the output
-rsha384, --remove-sha384 Remove SHA-384 hashes from the output
By default, all available hashes will be written out to the DAT.
This will remove all SHA-384 hashes from the output file(s).
-rsha512, --rem-sha512 Remove SHA-512 hashes from the output
-rsha512, --remove-sha512 Remove SHA-512 hashes from the output
By default, all available hashes will be written out to the DAT.
This will remove all SHA-512 hashes from the output file(s).
-dan, --desc-name Use Software List name instead of description
-dan, --description-as-name Use Software List name instead of description
By default, all DATs are converted exactly as they are input.
Enabling this flag allows for the machine names in the DAT to be
replaced by the machine description instead. In most cases, this
@@ -1051,12 +1051,17 @@ Options:
children based on the romof and cloneof tags. This is incompatible
with the other --dat-X flags.
-dnm, --dat-nonmerged Create non-merged sets
-dnm, --dat-non-merged Create non-merged sets
Preprocess the DAT to have child sets contain all items from the
parent set based on the cloneof tag. This is incompatible with the
other --dat-X flags.
-df, --dat-fullnonmerged Create fully non-merged sets
-dnd, --dat-device-non-merged Force creating 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.
@@ -1069,7 +1074,7 @@ Options:
In the case that the files will not be stored from the root
directory, a new root can be set for path length calculations
-si, --single All game names replaced by '!'
-si, --single-set All game names replaced by '!'
This is useful for keeping all roms in a DAT in the same archive or
folder
@@ -1089,7 +1094,7 @@ Options:
specified flags. With this flag enabled, all of the input DATs are
merged into a single output. This is best used with the dedupe flag.
-b, --bare Don't include date in file name
-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.
@@ -1124,12 +1129,12 @@ Options:
Add a DAT or folder of DATs to the base set to be used in
comparison against all inputs
-b, --bare Don't include date in file name
-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.
-c, --cascade Enable cascaded diffing
-rc, --rev-cascade Enable reverse cascaded diffing
-rc, --reverse-cascade Enable reverse cascaded diffing
Each of the above flags allow for a special type of diffing in
which the first (or last) DAT is considered a base, and for each
additional input DAT, it only leaves the files that are not in
@@ -1137,7 +1142,7 @@ Options:
rollback sets or even just reduce the amount of duplicates
across multiple sets
-sf, --skip Skip output of first DAT
-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.
@@ -1162,7 +1167,7 @@ Options:
-uh, --update-hashes Update hashes from base DATs
This flag enables updating of hashes from base DATs.
-udd, --update-desc Update machine descriptions from base DATs
-udd, --update-description Update machine descriptions from base DATs
This flag enables updating of machine descriptions from base
DATs
@@ -1170,7 +1175,7 @@ Options:
This flag enables updating of machine years from base
DATs
-um, --update-manu Update machine manufacturers from base DATs
-um, --update-manufacturer Update machine manufacturers from base DATs
This flag enables updating of machine manufacturers from base
DATs
@@ -1194,7 +1199,7 @@ Options:
match or can use full C#-style regex for pattern matching. Multiples
of each of the above inputs are allowed.
-ofg, --of-as-game Allow cloneof and romof tags to match game name
-ofg, --match-of-tags Allow cloneof and romof tags to match game name
If filter or exclude by game name is used, this flag will allow
those filters to be checked against the romof and cloneof tags as
well. This can allow for more advanced set-building, especially in
@@ -1238,7 +1243,7 @@ Options:
-run, --runnable Include only items that are marked runnable
This allows users to include only verified runnable games
-nrun, --not-run Include only items that are not marked runnable
-nrun, --not-runnable Include only items that are not marked runnable
This allows users to include only unrunnable games
-out= Set the name of the output directory
@@ -1295,7 +1300,7 @@ Options:
that skipper exists, then it will be used instead of trying to find
one that matches.
-ic, --ignore-chd Treat CHDs as regular files
-ic, --chds-as-files Treat CHDs as regular files
Normally, CHDs would be processed using their internal hash to
compare against the input DATs. This flag forces all CHDs to
be treated like regular files.
@@ -1310,12 +1315,17 @@ Options:
children based on the romof and cloneof tags. This is incompatible
with the other --dat-X flags.
-dnm, --dat-nonmerged Force checking non-merged sets
-dnm, --dat-non-merged Force checking non-merged sets
Preprocess the DAT to have child sets contain all items from the
parent set based on the cloneof tag. This is incompatible with the
other --dat-X flags.
-df, --dat-fullnonmerged Force checking fully non-merged sets
-dnd, --dat-device-non-merged Force creating 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 Force checking 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.
@@ -1398,3 +1408,57 @@ All other external code is marked as such within the source and correctly
attributed to the site and/or person(s) that originally wrote the code. All
code written by project members is licensed under GPL v3. See LICENSE for
more details.
** Section 20.0 - TEMPORARY REMAPPINGS
This section contains remappings from old flag names to new ones for the purposes of testing
-ab, --add-blank -> -ab, --add-blank-files
-bc, --baddump-col -> -bc, --baddump-column
-b, --bare -> -b, --no-automatic-date
-dnd, --dat-devnonmerged -> -dnd, --dat-device-non-merged
-df, --dat-fullnonmerged -> -df, --dat-full-non-merged
-dnm, --dat-nonmerged -> -dnm, --dat-non-merged
-dan, --desc-name -> -dan, --description-as-name
-es, --ext -> -es, --extension
-f, --files -> -f, --archives-as-files
-ic, --ignore-chd -> -ic, --chds-as-files
-nc, --nodump-col -> -nc, --nodump-column
-nm, --noMD5 -> -nm, --skip-md5
-ns, --noSHA1 -> -ns, --skip-sha1
-ns256, --noSHA256 -> -ns256, --skip-sha256
-ns384, --noSHA384 -> -nm, --skip-sha384
-ns512, --noSHA512 -> -nm, --skip-sha512
-nrun, --not-run -> -nrun, --not-runnable
-ofg, --of-as-game -> -ofg, --match-of-tags
-oam, --output-am -> -oam, --output-attractmode
-od, --output-dc -> -od, --output-doscenter
-olr, --output-lr -> -olr, --output-listrom
-ool, --output-ol -> -ol, --output-offlinelist
-or, --output-rc -> -or, --output-romcenter
-os, --output-sd -> -os, --output-sabredat
-osl, --output-sl -> -osl, --output-softwarelist
-rme, --rem-ext -> -rme, --remove-extensions
-rmd5, --rem-md5 -> -rmd5, --remove-md5
-rsha1, --rem-sha1 -> -rsha1, --remove-sha1
-rsha256, --rem-sha256 -> -rsha256, --remove-sha256
-rsha384, --rem-sha384 -> -rsha384, --remove-sha384
-rsha512, --rem-sha512 -> -rsha512, --remove-sha512
-ru, --rem-uni -> -ru, --remove-unicode
-rc, --rev-cascade -> -rc, --reverse-cascade
-si, --single -> -ind, --individual [For stat output case]
-si, --single -> -si, --single-set [For '!' case]
-sf, --skip -> -sf, --skip-first-output
-ska, --skiparc -> -ska, --skip-archives
-skf, --skipfile -> -skf, --skip-files
-t7z, --t7z -> -t7z, --torrent-7zip
-tgz, --tgz -> -tgz, --torrent-gzip
-tlrz, --tlrz -> -tlrz, --torrent-lrzip
-tlz4, --tlz4 -> -tlz4, --torrent-lz4
-trar, --trar -> -trar, --torrent-rar
-txz, --txz -> -txz, --torrent-xz
-tzip, --tzip -> -tzip, --torrent-zip
-tzpaq, --tzpaq -> -tzpaq, --torrent-zpaq
-tzstd, --tzstd -> -tzstd, --torrent-zstd
-udd, --update-desc -> -udd, --update-description
-um, --update-manu -> -um, --update-manufacturer

View File

@@ -122,7 +122,7 @@
<Compile Include="DatFiles\DosCenter.cs" />
<Compile Include="DatFiles\Filter.cs" />
<Compile Include="DatFiles\Hashfile.cs" />
<Compile Include="DatFiles\Listroms.cs" />
<Compile Include="DatFiles\Listrom.cs" />
<Compile Include="DatFiles\Logiqx.cs" />
<Compile Include="DatFiles\Missfile.cs" />
<Compile Include="DatFiles\OfflineList.cs" />

View File

@@ -593,8 +593,8 @@ namespace SabreTools.Library.Tools
return new DatFiles.SeparatedValue(baseDat, ',');
case DatFormat.DOSCenter:
return new DosCenter(baseDat);
case DatFormat.Listroms:
return new Listroms(baseDat);
case DatFormat.Listrom:
return new Listrom(baseDat);
case DatFormat.Logiqx:
return new Logiqx(baseDat);
case DatFormat.MissFile:
@@ -1083,7 +1083,7 @@ namespace SabreTools.Library.Tools
// If we have a listroms DAT
else if (first.StartsWith("roms required for driver"))
{
return DatFormat.Listroms;
return DatFormat.Listrom;
}
// If we have a CMP-based DAT

File diff suppressed because it is too large Load Diff

View File

@@ -72,7 +72,7 @@ namespace SabreTools
}
// User flags
bool addBlankFilesForEmptyFolder = false,
bool addBlankFiles = false,
addFileDates = false,
archivesAsFiles = false,
basedat = false,
@@ -86,14 +86,14 @@ namespace SabreTools
individual = false,
inplace = false,
inverse = false,
noAutomaticDate = false,
nostore = false,
quickScan = false,
removeDateFromAutomaticName = false,
removeUnicode = false,
showBaddumpColumn = false,
showNodumpColumn = false,
shortname = false,
skip = false,
skipFirstOutput = false,
updateDat = false;
Hash omitFromScan = Hash.DeepHashes; // TODO: All instances of Hash.DeepHashes should be made into 0x0 eventually
OutputFormat outputFormat = OutputFormat.Folder;
@@ -180,8 +180,8 @@ namespace SabreTools
switch (feat.Key)
{
// User flags
case "add-blank":
addBlankFilesForEmptyFolder = true;
case "add-blank-files":
addBlankFiles = true;
break;
case "add-date":
addFileDates = true;
@@ -192,11 +192,11 @@ namespace SabreTools
case "all-stats":
statDatFormat = StatReportFormat.All;
break;
case "baddump-col":
showBaddumpColumn = true;
case "archives-as-files":
archivesAsFiles = true;
break;
case "bare":
removeDateFromAutomaticName = true;
case "baddump-column":
showBaddumpColumn = true;
break;
case "base":
basedat = true;
@@ -207,6 +207,9 @@ namespace SabreTools
case "cascade":
updateMode |= UpdateMode.DiffCascade;
break;
case "chds-as-Files":
chdsAsFiles = true;
break;
case "copy-files":
copyFiles = true;
break;
@@ -216,16 +219,16 @@ namespace SabreTools
case "csv":
statDatFormat |= StatReportFormat.CSV;
break;
case "dat-devnonmerged":
case "dat-device-non-merged":
splitType = SplitType.DeviceNonMerged;
break;
case "dat-fullnonmerged":
case "dat-full-non-merged":
splitType = SplitType.FullNonMerged;
break;
case "dat-merged":
splitType = SplitType.Merged;
break;
case "dat-nonmerged":
case "dat-non-merged":
splitType = SplitType.NonMerged;
break;
case "dat-split":
@@ -240,7 +243,7 @@ namespace SabreTools
case "depot":
depot = true;
break;
case "desc-name":
case "description-as-name":
descAsName = true;
break;
case "diff":
@@ -258,12 +261,9 @@ namespace SabreTools
case "exclude-of":
datHeader.ExcludeOf = true;
break;
case "ext":
case "extension":
splittingMode |= SplittingMode.Extension;
break;
case "files":
archivesAsFiles = true;
break;
case "game-dedup":
datHeader.DedupeRoms = DedupeType.Game;
break;
@@ -279,9 +279,6 @@ namespace SabreTools
case "html":
statDatFormat |= StatReportFormat.HTML;
break;
case "ignore-chd":
chdsAsFiles = true;
break;
case "individual":
individual = true;
break;
@@ -294,40 +291,28 @@ namespace SabreTools
case "level":
splittingMode |= SplittingMode.Level;
break;
case "match-of-tags":
filter.IncludeOfInGame = true;
break;
case "merge":
updateMode |= UpdateMode.Merge;
break;
case "nodump-col":
case "no-automatic-date":
noAutomaticDate = true;
break;
case "nodump-column":
showNodumpColumn = true;
break;
case "noMD5":
omitFromScan |= Hash.MD5;
break;
case "noSHA1":
omitFromScan |= Hash.SHA1;
break;
case "noSHA256":
omitFromScan &= ~Hash.SHA256; // This needs to be inverted later
break;
case "noSHA384":
omitFromScan &= ~Hash.SHA384; // This needs to be inverted later
break;
case "noSHA512":
omitFromScan &= ~Hash.SHA512; // This needs to be inverted later
break;
case "not-run":
case "not-runnable":
filter.Runnable = false;
break;
case "no-store-header":
nostore = true;
break;
case "of-as-game":
filter.IncludeOfInGame = true;
break;
case "output-all":
datHeader.DatFormat |= DatFormat.ALL;
break;
case "output-am":
case "output-attractmode":
datHeader.DatFormat |= DatFormat.AttractMode;
break;
case "output-cmp":
@@ -336,11 +321,11 @@ namespace SabreTools
case "output-csv":
datHeader.DatFormat |= DatFormat.CSV;
break;
case "output-dc":
case "output-doscenter":
datHeader.DatFormat |= DatFormat.DOSCenter;
break;
case "output-lr":
datHeader.DatFormat |= DatFormat.Listroms;
case "output-listrom":
datHeader.DatFormat |= DatFormat.Listrom;
break;
case "output-miss":
datHeader.DatFormat |= DatFormat.MissFile;
@@ -348,13 +333,13 @@ namespace SabreTools
case "output-md5":
datHeader.DatFormat |= DatFormat.RedumpMD5;
break;
case "output-ol":
case "output-offlinelist":
datHeader.DatFormat |= DatFormat.OfflineList;
break;
case "output-rc":
case "output-romcenter":
datHeader.DatFormat |= DatFormat.RomCenter;
break;
case "output-sd":
case "output-sabredat":
datHeader.DatFormat |= DatFormat.SabreDat;
break;
case "output-sfv":
@@ -372,7 +357,7 @@ namespace SabreTools
case "output-sha512":
datHeader.DatFormat |= DatFormat.RedumpSHA512;
break;
case "output-sl":
case "output-softwarelist":
datHeader.DatFormat |= DatFormat.SoftwareList;
break;
case "output-tsv":
@@ -387,33 +372,33 @@ namespace SabreTools
case "quotes":
datHeader.Quotes = true;
break;
case "rem-md5":
case "remove-extensions":
datHeader.RemoveExtension = true;
break;
case "remove-md5":
datHeader.StripHash |= Hash.MD5;
break;
case "rem-sha1":
case "remove-sha1":
datHeader.StripHash |= Hash.SHA1;
break;
case "rem-sha256":
case "remove-sha256":
datHeader.StripHash |= Hash.SHA256;
break;
case "rem-sha384":
case "remove-sha384":
datHeader.StripHash |= Hash.SHA384;
break;
case "rem-sha512":
case "remremovesha512":
datHeader.StripHash |= Hash.SHA512;
break;
case "rem-uni":
case "remove-unicode":
removeUnicode = true;
break;
case "reverse-base-name":
updateMode |= UpdateMode.ReverseBaseReplace;
break;
case "rev-cascade":
case "reverse-cascade":
updateMode |= UpdateMode.DiffReverseCascade;
break;
case "rem-ext":
datHeader.RemoveExtension = true;
break;
case "romba":
datHeader.Romba = true;
break;
@@ -423,9 +408,6 @@ namespace SabreTools
case "runnable":
filter.Runnable = true;
break;
case "short":
shortname = true;
break;
case "scan-all":
sevenzip = 0;
gz = 0;
@@ -435,42 +417,72 @@ namespace SabreTools
case "scene-date-strip":
datHeader.SceneDateStrip = true;
break;
case "skip":
skip = true;
case "short":
shortname = true;
break;
case "skiparc":
case "skip-archives":
skipFileType = SkipFileType.Archive;
break;
case "skipfile":
case "skip-files":
skipFileType = SkipFileType.File;
break;
case "single":
case "skip-first-output":
skipFirstOutput = true;
break;
case "skip-md5":
omitFromScan |= Hash.MD5;
break;
case "skip-sha1":
omitFromScan |= Hash.SHA1;
break;
case "skip-sha256":
omitFromScan &= ~Hash.SHA256; // This needs to be inverted later
break;
case "skip-sha384":
omitFromScan &= ~Hash.SHA384; // This needs to be inverted later
break;
case "skip-sha512":
omitFromScan &= ~Hash.SHA512; // This needs to be inverted later
break;
case "single-set":
filter.Single = true;
break;
case "superdat":
datHeader.Type = "SuperDAT";
break;
case "t7z":
outputFormat = OutputFormat.Torrent7Zip;
break;
case "tar":
outputFormat = OutputFormat.TapeArchive;
break;
case "text":
statDatFormat |= StatReportFormat.Textfile;
break;
case "tgz":
case "torrent-7zip":
outputFormat = OutputFormat.Torrent7Zip;
break;
case "torrent-gzip":
outputFormat = OutputFormat.TorrentGzip;
break;
case "tlrz":
case "torrent-lrzip":
outputFormat = OutputFormat.TorrentLRZip;
break;
case "tlz4":
case "torrent-lz4":
outputFormat = OutputFormat.TorrentLZ4;
break;
case "trar":
case "torrent-rar":
outputFormat = OutputFormat.TorrentRar;
break;
case "torrent-xz":
outputFormat = OutputFormat.TorrentXZ;
break;
case "torrent-zip":
outputFormat = OutputFormat.TorrentZip;
break;
case "torrent-zpaq":
outputFormat = OutputFormat.TorrentZPAQ;
break;
case "torrent-zstd":
outputFormat = OutputFormat.TorrentZstd;
break;
case "trim":
filter.Trim = true;
break;
@@ -480,28 +492,16 @@ namespace SabreTools
case "type":
splittingMode |= SplittingMode.Type;
break;
case "txz":
outputFormat = OutputFormat.TorrentXZ;
break;
case "tzip":
outputFormat = OutputFormat.TorrentZip;
break;
case "tzpaq":
outputFormat = OutputFormat.TorrentZPAQ;
break;
case "tzstd":
outputFormat = OutputFormat.TorrentZstd;
break;
case "update-dat":
updateDat = true;
break;
case "update-desc":
case "update-description":
replaceMode |= ReplaceMode.Description;
break;
case "update-hashes":
replaceMode |= ReplaceMode.Hash;
break;
case "update-manu":
case "update-manufacturer":
replaceMode |= ReplaceMode.Manufacturer;
break;
case "update-names":
@@ -711,8 +711,8 @@ namespace SabreTools
// Create a DAT from a directory or set of directories
case "DATFromDir":
VerifyInputs(inputs, feature);
InitDatFromDir(inputs, datHeader, omitFromScan, removeDateFromAutomaticName, archivesAsFiles, chdsAsFiles,
skipFileType, addBlankFilesForEmptyFolder, addFileDates, tempDir, outDir, copyFiles);
InitDatFromDir(inputs, datHeader, omitFromScan, noAutomaticDate, archivesAsFiles, chdsAsFiles,
skipFileType, addBlankFiles, addFileDates, tempDir, outDir, copyFiles);
break;
// If we're in header extract and remove mode
case "Extract":
@@ -745,7 +745,7 @@ namespace SabreTools
// Convert, update, merge, diff, and filter a DAT or folder of DATs
case "Update":
VerifyInputs(inputs, feature);
InitUpdate(inputs, basePaths, datHeader, updateMode, inplace, skip, removeDateFromAutomaticName, filter,
InitUpdate(inputs, basePaths, datHeader, updateMode, inplace, skipFirstOutput, noAutomaticDate, filter,
splitType, outDir, cleanGameNames, removeUnicode, descAsName, replaceMode);
break;
// If we're using the verifier