mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Build] Add help text for TGZTest; add logging
This commit is contained in:
@@ -248,6 +248,17 @@ SimpleSort scanning levels:
|
|||||||
2 Only hash archive
|
2 Only hash archive
|
||||||
");
|
");
|
||||||
break;
|
break;
|
||||||
|
case "TGZTest":
|
||||||
|
Console.WriteLine(@"TGZTest - Test TorrentGZ output
|
||||||
|
-----------------------------------------
|
||||||
|
Usage: TGZTest [options] [filename|dirname] ...
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-?, -h, --help Show this help
|
||||||
|
-out= Output directory
|
||||||
|
-d, --delete Delete input files
|
||||||
|
-r, --romba Enable Romba depot dir output");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Console.Write("This is the default help output");
|
Console.Write("This is the default help output");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ namespace SabreTools
|
|||||||
private bool _romba;
|
private bool _romba;
|
||||||
private Logger _logger;
|
private Logger _logger;
|
||||||
|
|
||||||
|
// We still need access permissions for each of the archive files as well, kind of like DATFromDir
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new TGZTest object
|
/// Create a new TGZTest object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -186,11 +188,13 @@ namespace SabreTools
|
|||||||
{
|
{
|
||||||
foreach (string input in _inputs)
|
foreach (string input in _inputs)
|
||||||
{
|
{
|
||||||
|
_logger.User("Processing file " + input);
|
||||||
ArchiveTools.WriteTorrentGZ(input, _outdir, _romba, _logger);
|
ArchiveTools.WriteTorrentGZ(input, _outdir, _romba, _logger);
|
||||||
if (_delete)
|
if (_delete)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
_logger.User("Attempting to delete " + input);
|
||||||
File.Delete(input);
|
File.Delete(input);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user