[ALL] Add documentation for SimpleSort in SabreTools; port over Verify

This commit is contained in:
Matt Nadareski
2016-10-20 17:24:44 -07:00
parent 64c95b05c9
commit e67b85e901
8 changed files with 556 additions and 288 deletions

View File

@@ -140,6 +140,54 @@ Options:
-?, -h, --help Show the built-in help text
Built-in to most of the programs is a basic help text
-cv, --convert Enable conversion of input files to TorrentZip
Using a folder or set of folders, convert the input archives to TorrentZip, rebuilding
to another folder. This is useful for rebuilding non-TorrentZipped sets without having
to run them through a larger tool or helping to rebuild a romba depot
-dat= Name of the DAT to be used as a filter
A supplied DAT file to be used as a filter in conversion. If a file is found in the
DAT, it will be skipped on output. This allows convert to act like an anti-sort,
useful for finding useless files in an input folder.
-out= Set the name of the output directory
This sets an output folder to be used when the files are created. If a path
is not defined, the application directory is used instead.
-t=, --temp= Set the name of the temporary directory
Optionally, a temp folder can be supplied in the case the default temp directory
(inside the running folder) is not preferred. This is used for any operations
that require an archive to be extracted.
-del, --delete Delete input files
This is a WIP flag that allows for deletion of input files once they have been
rebuilt. It is not recommended for normal use because it does not discriminate
whether or not the input files were rebuilt or not before deletion
-tgz Enable Torrent GZ output
Instead of outputting the files to ZIP archives, 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 by the SHA-1 of the file inside. This is
primarily used by external tool Romba (https://github.com/uwedeportivo/romba), but
may be used more widely in the future.
-r, --romba Enable Romba depot directory output
As an extension of the parent flag, this outputs the TGZ files into directories
based on the structure used by Romba. This uses nested folders using the first
4 bytes of the SHA-1, 1 byte for each layer of the directory name. It also
includes two auxilary files, .romba_size and .romba_size.backup, that have the
compressed size of the folder inside for use with Romba.
-7z={0} Set scanning level for 7z archives
-gz={2} Set scanning level for GZip archives
-rar={2} Set scanning level for RAR archives
-zip={0} Set scanning level for ZIP archives
For each of the major archive types recognized by the libraries used by this
program, scan the archive in one of the following ways:
0 Hash both archive and its contents
1 Only hash contents of the archive
2 Only hash archive itself (treat like a regular file)
-d, --dfd Create a DAT from each input directory
Create a DAT file from an input directory or set of files. By default, this will
output a DAT named based on the input directory and the current date. It will also
@@ -209,7 +257,7 @@ Options:
-ox, -output-xml Output in Logiqx XML format (default)
Add outputting the created DAT to Logiqx XML format
-gz, --gz-files Allow reading of GZIP files as archives
-gzf, --gz-files Allow reading of GZIP files as archives
Since GZip files are not commonly used for file storage, this flag allows for
any GZip archives to have their contents hashed instead.
@@ -339,6 +387,82 @@ Options:
This should only be used if one of the inputs starts with a flag or another already
defined input.
-ss, --sort Sort input files by a set of DATs
This feature allows the user to quickly rebuild based on a supplied DAT file(s). By
default all files will be rebuilt to TorrentZip (TZ) 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.
-dat= Name of the DAT to be used for the various options
The user-supplied DAT used to check which files need to be rebuilt. Multiple
occurrences of this flag are allowed.
-out= Set the name of the output directory
This sets an output folder to be used when the files are created. If a path
is not defined, the application directory is used instead.
-t=, --temp= Set the name of the temporary directory
Optionally, a temp folder can be supplied in the case the default temp directory
(inside the running folder) is not preferred. This is used for any operations that
require an archive to be extracted.
-d, --delete Enable deletion of the input files
Optionally, the input files, once processed, can be deleted. This can be useful
when the original file structure is no longer needed or if there is limited space
on the source drive.
-qs, --quick Enable quick scanning of archives
For all archives, if this flag is enabled, it will only use the header information
to get the archive entries' file information. The upside to this is that it is much
quicker than extracting all files to the temp folder. On the downside, it can only
get the CRC and size from most archive formats, leading to possible issues.
-ad, --add-date Write dates for each file parsed, if available
If this flag is set, the the date in the DAT will be used for the output file
instead of the standard date and time for TorrentZip. This will technically
invalidate the output files as proper TorrentZip files because the date will not
match the standard.
-tgz Enable Torrent GZ output
Instead of outputting the files to ZIP archives, 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 by the SHA-1 of the file inside. This is
primarily used by external tool Romba (https://github.com/uwedeportivo/romba), but
may be used more widely in the future.
-r, --romba Enable Romba depot directory output
As an extension of the parent flag, this outputs the TGZ files into directories
based on the structure used by Romba. This uses nested folders using the first
4 bytes of the SHA-1, 1 byte for each layer of the directory name. It also
includes two auxilary files, .romba_size and .romba_size.backup, that have the
compressed size of the folder inside for use with Romba.
-do, --directory Enable outputting files uncompressed
Instead of outputting the files to ZIP archives, files will be rebuilt to named
subdirectories within the output folder. This is useful for when the DAT does not
already have the flag specified.
-h=, --header= Remove headers from hash calculations
If this is set, then all files that have copier headers that are detected will
have them removed from the hash calculation. This will allow for a headered collection
to be hashed without possibly variant information. If a particular header skipper is
defined, and that skipper exists, then it will be used instead of trying to find one
that matches.
-7z={0} Set scanning level for 7z archives
-gz={2} Set scanning level for GZip archives
-rar={2} Set scanning level for RAR archives
-zip={0} Set scanning level for ZIP archives
For each of the major archive types recognized by the libraries used by this
program, scan the archive in one of the following ways:
0 Hash both archive and its contents
1 Only hash contents of the archive
2 Only hash archive itself (treat like a regular file)
-ud, --update-dat Output updated DAT (rebuild only)
Once the files that were able to rebuilt are taken care of, a DAT of the files
that could not be matched will be output to the program directory.
-st, --stats Get statistics on all input DATs
This will output by default the combined statistics for all input DAT files. The stats
that are outputted are as follows:
@@ -668,6 +792,32 @@ Options:
-out= Set the name of the output directory
This sets an output folder to be used when the files are created. If a path
is not defined, the application directory is used instead.
-ve, --verify Verify a folder against an input DAT
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 for the combined DATs and games are
either the directories or archives within. This will only do a direct verification of the
items within and will create a fixdat afterwards for missing files.
-dat= Name of the DAT to be used for the various options
The user-supplied DAT used to check which files need to be verified. Multiple
occurrences of this flag are allowed.
-out= Set the name of the output directory
This sets an output folder to be used where the files will be verified. If a path
is not defined, the application directory is used instead.
-t=, --temp= Set the name of the temporary directory
Optionally, a temp folder can be supplied in the case the default temp directory
(inside the running folder) is not preferred. This is used for any operations that
require an archive to be extracted.
-h=, --header= Remove headers from hash calculations
If this is set, then all files that have copier headers that are detected will
have them removed from the hash calculation. This will allow for a headered collection
to be hashed without possibly variant information. If a particular header skipper is
defined, and that skipper exists, then it will be used instead of trying to find one
that matches.
** Section 2.3 - SimpleSort
@@ -1006,7 +1156,7 @@ Below are originally from SabreTools / DATabase -
-ox, -output-xml Output in Logiqx XML format (default)
Add outputting the created DAT to Logiqx XML format
-gzf, -gz-files Allow reading of GZIP files as archives
-gz, -gz-files Allow reading of GZIP files as archives
Since GZip files are not commonly used for file storage, this flag allows for
any GZip archives to have their contents hashed instead.