mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Localize all help.
This commit is contained in:
13
Aaru.CommonTypes/Localization/LocalizedDescription.cs
Normal file
13
Aaru.CommonTypes/Localization/LocalizedDescription.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel;
|
||||
using Aaru.Localization;
|
||||
|
||||
namespace Aaru.CommonTypes;
|
||||
|
||||
public class LocalizedDescriptionAttribute : DescriptionAttribute
|
||||
{
|
||||
private readonly string _resourceKey;
|
||||
|
||||
public LocalizedDescriptionAttribute(string resourceKey) => _resourceKey = resourceKey;
|
||||
|
||||
public override string Description => UI.ResourceManager.GetString(_resourceKey) ?? _resourceKey;
|
||||
}
|
||||
52
Aaru.Localization/UI.Designer.cs
generated
52
Aaru.Localization/UI.Designer.cs
generated
@@ -735,9 +735,9 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Disc_image_path {
|
||||
public static string Media_image_path {
|
||||
get {
|
||||
return ResourceManager.GetString("Disc_image_path", resourceCulture);
|
||||
return ResourceManager.GetString("Media_image_path", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6573,5 +6573,53 @@ namespace Aaru.Localization {
|
||||
return ResourceManager.GetString("Title_Open_device", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Model_of_drive_used_by_media {
|
||||
get {
|
||||
return ResourceManager.GetString("Model_of_drive_used_by_media", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Barcode_of_the_media {
|
||||
get {
|
||||
return ResourceManager.GetString("Barcode_of_the_media", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Take_metadata_from_existing_Aaru_sidecar {
|
||||
get {
|
||||
return ResourceManager.GetString("Take_metadata_from_existing_Aaru_sidecar", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Ignore_negative_sectors {
|
||||
get {
|
||||
return ResourceManager.GetString("Ignore_negative_sectors", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Ignore_overflow_sectors {
|
||||
get {
|
||||
return ResourceManager.GetString("Ignore_overflow_sectors", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Create_sidecar_block_size_help {
|
||||
get {
|
||||
return ResourceManager.GetString("Create_sidecar_block_size_help", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Decode_media_tags {
|
||||
get {
|
||||
return ResourceManager.GetString("Decode_media_tags", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Path_to_log_file {
|
||||
get {
|
||||
return ResourceManager.GetString("Path_to_log_file", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -718,8 +718,8 @@
|
||||
<data name="Disc_image_does_not_support_verification" xml:space="preserve">
|
||||
<value>La imagen de disco no soporta la verificación</value>
|
||||
</data>
|
||||
<data name="Disc_image_path" xml:space="preserve">
|
||||
<value>Ruta a la imagen de disco</value>
|
||||
<data name="Media_image_path" xml:space="preserve">
|
||||
<value>Ruta a la imagen del medio</value>
|
||||
</data>
|
||||
<data name="Disc_information" xml:space="preserve">
|
||||
<value>Información del disco</value>
|
||||
@@ -3287,4 +3287,28 @@ Probadores:
|
||||
<data name="Title_Open_device" xml:space="preserve">
|
||||
<value>Abrir dispositivo</value>
|
||||
</data>
|
||||
<data name="Model_of_drive_used_by_media" xml:space="preserve">
|
||||
<value>Modelo de la unidad usada para leer el medio representado por la imagen.</value>
|
||||
</data>
|
||||
<data name="Barcode_of_the_media" xml:space="preserve">
|
||||
<value>Código de barras del medio representado por la imagen.</value>
|
||||
</data>
|
||||
<data name="Take_metadata_from_existing_Aaru_sidecar" xml:space="preserve">
|
||||
<value>Obtener metadatos de un sidecar de metadatos de Aaru existente.</value>
|
||||
</data>
|
||||
<data name="Ignore_negative_sectors" xml:space="preserve">
|
||||
<value>Ignorar sectores negativos.</value>
|
||||
</data>
|
||||
<data name="Ignore_overflow_sectors" xml:space="preserve">
|
||||
<value>Ignorar sectores de sobrecarga.</value>
|
||||
</data>
|
||||
<data name="Create_sidecar_block_size_help" xml:space="preserve">
|
||||
<value>Sólo usado en cintas, indica el tamaño del bloque. Los archivos en la carpeta cuyo tamaño no sea un múltiplo de este valor simplemente serán ignorados.</value>
|
||||
</data>
|
||||
<data name="Decode_media_tags" xml:space="preserve">
|
||||
<value>Descodificar etiquetas del medio.</value>
|
||||
</data>
|
||||
<data name="Path_to_log_file" xml:space="preserve">
|
||||
<value>Ruta al archivo de registro.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -371,8 +371,8 @@ In you are unsure, please press N to not continue.</value>
|
||||
<data name="Namespace_to_use_for_filenames" xml:space="preserve">
|
||||
<value>Namespace to use for filenames.</value>
|
||||
</data>
|
||||
<data name="Disc_image_path" xml:space="preserve">
|
||||
<value>Disc image path</value>
|
||||
<data name="Media_image_path" xml:space="preserve">
|
||||
<value>Media image path</value>
|
||||
</data>
|
||||
<data name="Directory_where_extracted_files_will_be_created" xml:space="preserve">
|
||||
<value>Directory where extracted files will be created. Will abort if it exists</value>
|
||||
@@ -3362,4 +3362,28 @@ Do you want to continue?</value>
|
||||
<data name="Title_Open_device" xml:space="preserve">
|
||||
<value>Open device</value>
|
||||
</data>
|
||||
<data name="Model_of_drive_used_by_media" xml:space="preserve">
|
||||
<value>Model of the drive used to read the media represented by the image.</value>
|
||||
</data>
|
||||
<data name="Barcode_of_the_media" xml:space="preserve">
|
||||
<value>Barcode of the media represented by the image.</value>
|
||||
</data>
|
||||
<data name="Take_metadata_from_existing_Aaru_sidecar" xml:space="preserve">
|
||||
<value>Take metadata from existing Aaru Metadata sidecar.</value>
|
||||
</data>
|
||||
<data name="Ignore_negative_sectors" xml:space="preserve">
|
||||
<value>Ignore negative sectors.</value>
|
||||
</data>
|
||||
<data name="Ignore_overflow_sectors" xml:space="preserve">
|
||||
<value>Ignore overflow sectors.</value>
|
||||
</data>
|
||||
<data name="Create_sidecar_block_size_help" xml:space="preserve">
|
||||
<value>Only used for tapes, indicates block size. Files in the folder whose size is not a multiple of this value will simply be ignored.</value>
|
||||
</data>
|
||||
<data name="Decode_media_tags" xml:space="preserve">
|
||||
<value>Decode media tags.</value>
|
||||
</data>
|
||||
<data name="Path_to_log_file" xml:space="preserve">
|
||||
<value>Path to log file.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -156,7 +156,7 @@ sealed class ArchiveExtractCommand : Command<ArchiveExtractCommand.Settings>
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0; i < archive.NumberOfEntries; i++)
|
||||
for(var i = 0; i < archive.NumberOfEntries; i++)
|
||||
{
|
||||
ErrorNumber errno = archive.GetFilename(i, out string fileName);
|
||||
|
||||
@@ -229,7 +229,7 @@ sealed class ArchiveExtractCommand : Command<ArchiveExtractCommand.Settings>
|
||||
.Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn())
|
||||
.Start(ctx =>
|
||||
{
|
||||
int position = 0;
|
||||
var position = 0;
|
||||
|
||||
var outputFile =
|
||||
new FileStream(outputPath,
|
||||
@@ -241,7 +241,7 @@ sealed class ArchiveExtractCommand : Command<ArchiveExtractCommand.Settings>
|
||||
ctx.AddTask(string.Format(UI.Reading_file_0, Markup.Escape(fileName)));
|
||||
|
||||
task.MaxValue = uncompressedSize;
|
||||
byte[] outBuf = new byte[BUFFER_SIZE];
|
||||
var outBuf = new byte[BUFFER_SIZE];
|
||||
Stream inputFile = filter.GetDataForkStream();
|
||||
|
||||
while(position < stat.Length)
|
||||
@@ -419,21 +419,21 @@ sealed class ArchiveExtractCommand : Command<ArchiveExtractCommand.Settings>
|
||||
|
||||
public class Settings : ArchiveFamily
|
||||
{
|
||||
[Description("Name of character encoding to use.")]
|
||||
[LocalizedDescription(nameof(UI.Name_of_character_encoding_to_use))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-e|--encoding")]
|
||||
public string Encoding { get; init; }
|
||||
|
||||
[Description("Extract extended attributes if present.")]
|
||||
[LocalizedDescription(nameof(UI.Extract_extended_attributes_if_present))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("-x|--xattrs")]
|
||||
public bool XAttrs { get; init; }
|
||||
|
||||
[Description("Archive file path")]
|
||||
[LocalizedDescription(nameof(UI.Archive_file_path))]
|
||||
[CommandArgument(0, "<path>")]
|
||||
public string Path { get; init; }
|
||||
|
||||
[Description("Directory where extracted files will be created. Will abort if it exists")]
|
||||
[LocalizedDescription(nameof(UI.Directory_where_extracted_files_will_be_created))]
|
||||
[CommandArgument(1, "<output>")]
|
||||
public string OutputDir { get; init; }
|
||||
}
|
||||
|
||||
@@ -149,11 +149,11 @@ sealed class ArchiveInfoCommand : Command<ArchiveInfoCommand.Settings>
|
||||
public class Settings : ArchiveFamily
|
||||
{
|
||||
[CommandOption("-e|--encoding")]
|
||||
[Description("Name of character encoding to use.")]
|
||||
[LocalizedDescription(nameof(UI.Name_of_character_encoding_to_use))]
|
||||
[DefaultValue(null)]
|
||||
public string Encoding { get; init; }
|
||||
|
||||
[Description("Archive file path")]
|
||||
[LocalizedDescription(nameof(UI.Archive_file_path))]
|
||||
[CommandArgument(0, "<path>")]
|
||||
public string Path { get; init; }
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ sealed class ArchiveListCommand : Command<ArchiveListCommand.Settings>
|
||||
|
||||
if(!settings.LongFormat)
|
||||
{
|
||||
for(int i = 0; i < archive.NumberOfEntries; i++)
|
||||
for(var i = 0; i < archive.NumberOfEntries; i++)
|
||||
{
|
||||
ErrorNumber errno = archive.GetFilename(i, out string fileName);
|
||||
|
||||
@@ -173,8 +173,8 @@ sealed class ArchiveListCommand : Command<ArchiveListCommand.Settings>
|
||||
}
|
||||
|
||||
var table = new Table();
|
||||
int files = 0;
|
||||
int folders = 0;
|
||||
var files = 0;
|
||||
var folders = 0;
|
||||
long totalSize = 0;
|
||||
long totalUncompressed = 0;
|
||||
|
||||
@@ -235,7 +235,7 @@ sealed class ArchiveListCommand : Command<ArchiveListCommand.Settings>
|
||||
|
||||
ctx.Refresh();
|
||||
|
||||
for(int i = 0; i < archive.NumberOfEntries; i++)
|
||||
for(var i = 0; i < archive.NumberOfEntries; i++)
|
||||
{
|
||||
ErrorNumber errno = archive.GetFilename(i, out string fileName);
|
||||
|
||||
@@ -255,7 +255,7 @@ sealed class ArchiveListCommand : Command<ArchiveListCommand.Settings>
|
||||
continue;
|
||||
}
|
||||
|
||||
char[] attr = new char[5];
|
||||
var attr = new char[5];
|
||||
|
||||
if(stat.Attributes.HasFlag(FileAttributes.Directory))
|
||||
{
|
||||
@@ -332,7 +332,8 @@ sealed class ArchiveListCommand : Command<ArchiveListCommand.Settings>
|
||||
$"[teal]{compressedSize}[/]",
|
||||
$"[{color}]{Markup.Escape(fileName)}[/]");
|
||||
|
||||
AaruLogging.Information($"Date: {stat.LastWriteTime?.ToShortDateString() ?? ""} " +
|
||||
AaruLogging
|
||||
.Information($"Date: {stat.LastWriteTime?.ToShortDateString() ?? ""} " +
|
||||
$"Time: ({stat.LastWriteTime?.ToLongTimeString() ?? ""}), " +
|
||||
$"Attributes: {new string(attr)}, " +
|
||||
$"Uncompressed Size: {uncompressedSize}, " +
|
||||
@@ -347,7 +348,8 @@ sealed class ArchiveListCommand : Command<ArchiveListCommand.Settings>
|
||||
$"[lime]{uncompressedSize}[/]",
|
||||
$"[{color}]{Markup.Escape(fileName)}[/]");
|
||||
|
||||
AaruLogging.Information($"Date: {stat.LastWriteTime?.ToShortDateString() ?? ""} " +
|
||||
AaruLogging
|
||||
.Information($"Date: {stat.LastWriteTime?.ToShortDateString() ?? ""} " +
|
||||
$"Time: ({stat.LastWriteTime?.ToLongTimeString() ?? ""}), " +
|
||||
$"Attributes: {new string(attr)}, " +
|
||||
$"Uncompressed Size: {uncompressedSize}, " +
|
||||
@@ -403,16 +405,16 @@ sealed class ArchiveListCommand : Command<ArchiveListCommand.Settings>
|
||||
public class Settings : ArchiveFamily
|
||||
{
|
||||
[CommandOption("-e|--encoding")]
|
||||
[Description("Name of character encoding to use.")]
|
||||
[LocalizedDescription(nameof(UI.Name_of_character_encoding_to_use))]
|
||||
[DefaultValue(null)]
|
||||
public string Encoding { get; init; }
|
||||
|
||||
[CommandOption("-l|--long-format")]
|
||||
[Description("Use long format.")]
|
||||
[LocalizedDescription(nameof(UI.Use_long_format))]
|
||||
[DefaultValue(false)]
|
||||
public bool LongFormat { get; init; }
|
||||
|
||||
[Description("Archive file path")]
|
||||
[LocalizedDescription(nameof(UI.Archive_file_path))]
|
||||
[CommandArgument(0, "<path>")]
|
||||
public string Path { get; init; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.ComponentModel;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.Localization;
|
||||
using Spectre.Console.Cli;
|
||||
|
||||
namespace Aaru.Commands;
|
||||
@@ -6,21 +8,21 @@ namespace Aaru.Commands;
|
||||
public class BaseSettings : CommandSettings
|
||||
{
|
||||
[CommandOption("-v|--verbose")]
|
||||
[Description("Shows verbose output.")]
|
||||
[LocalizedDescription(nameof(UI.Shows_verbose_output))]
|
||||
[DefaultValue(false)]
|
||||
public bool Verbose { get; init; }
|
||||
|
||||
[CommandOption("-d|--debug")]
|
||||
[Description("Shows debug output from plugins.")]
|
||||
[LocalizedDescription(nameof(UI.Shows_debug_output_from_plugins))]
|
||||
[DefaultValue(false)]
|
||||
public bool Debug { get; init; }
|
||||
|
||||
[CommandOption("--logfile <PATH>")]
|
||||
[Description("Path to log file.")]
|
||||
[LocalizedDescription(nameof(UI.Path_to_log_file))]
|
||||
public string? LogFile { get; set; }
|
||||
|
||||
[CommandOption("--pause")]
|
||||
[Description("Pauses before exiting.")]
|
||||
[LocalizedDescription(nameof(UI.Pauses_before_exiting))]
|
||||
[DefaultValue(false)]
|
||||
public bool Pause { get; init; }
|
||||
}
|
||||
@@ -35,6 +35,7 @@ using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.Core;
|
||||
using Aaru.Database;
|
||||
@@ -105,11 +106,11 @@ sealed class UpdateCommand : AsyncCommand<UpdateCommand.Settings>
|
||||
public class Settings : DatabaseFamily
|
||||
{
|
||||
[CommandOption("--clear")]
|
||||
[Description("Clear existing main database.")]
|
||||
[LocalizedDescription(nameof(UI.Clear_existing_main_database))]
|
||||
[DefaultValue(false)]
|
||||
public bool Clear { get; init; }
|
||||
[CommandOption("--clear-all")]
|
||||
[Description("Clear existing main and local database.")]
|
||||
[LocalizedDescription(nameof(UI.Clear_existing_main_and_local_database))]
|
||||
[DefaultValue(false)]
|
||||
public bool ClearAll { get; init; }
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interop;
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
@@ -125,7 +125,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
Type = dev.Type
|
||||
};
|
||||
|
||||
bool removable = false;
|
||||
var removable = false;
|
||||
string jsonFile;
|
||||
|
||||
switch(string.IsNullOrWhiteSpace(dev.Manufacturer))
|
||||
@@ -361,7 +361,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
reporter.ReportScsiModes(ref report, out byte[] cdromMode, out MediumTypes mediumType);
|
||||
|
||||
string mediumManufacturer;
|
||||
bool sense = true;
|
||||
var sense = true;
|
||||
|
||||
switch(dev.ScsiType)
|
||||
{
|
||||
@@ -717,7 +717,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
|
||||
Console.ReadKey(true);
|
||||
|
||||
bool mediaIsRecognized = true;
|
||||
var mediaIsRecognized = true;
|
||||
|
||||
await AnsiConsole.Status()
|
||||
.StartAsync(Localization.Core.Waiting_for_drive_to_become_ready,
|
||||
@@ -742,7 +742,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
case 0x04 when decSense.Value.ASCQ == 0x01:
|
||||
case 0x28:
|
||||
{
|
||||
int leftRetries = 50;
|
||||
var leftRetries = 50;
|
||||
|
||||
while(leftRetries > 0)
|
||||
{
|
||||
@@ -821,7 +821,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
|
||||
task.MaxValue = ushort.MaxValue;
|
||||
|
||||
for(ushort i = (ushort)(mediaTest.BlockSize ?? 0);; i++)
|
||||
for(var i = (ushort)(mediaTest.BlockSize ?? 0);; i++)
|
||||
{
|
||||
task.Description =
|
||||
string.Format($"[slateblue1]{Localization.Core
|
||||
@@ -933,7 +933,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
|
||||
mediumModel = AnsiConsole.Ask<string>(Localization.Core.Please_write_media_model);
|
||||
|
||||
bool mediaIsRecognized = true;
|
||||
var mediaIsRecognized = true;
|
||||
|
||||
await AnsiConsole.Status()
|
||||
.StartAsync(Localization.Core.Waiting_for_drive_to_become_ready,
|
||||
@@ -960,7 +960,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
case 0x04 when decSense.Value.ASCQ == 0x01:
|
||||
case 0x28:
|
||||
{
|
||||
int leftRetries = 50;
|
||||
var leftRetries = 50;
|
||||
|
||||
while(leftRetries > 0)
|
||||
{
|
||||
@@ -1052,7 +1052,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
|
||||
Console.ReadKey(true);
|
||||
|
||||
bool mediaIsRecognized = true;
|
||||
var mediaIsRecognized = true;
|
||||
|
||||
await AnsiConsole.Status()
|
||||
.StartAsync(Localization.Core.Waiting_for_drive_to_become_ready,
|
||||
@@ -1077,7 +1077,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
case 0x04 when decSense.Value.ASCQ == 0x01:
|
||||
case 0x28:
|
||||
{
|
||||
int leftRetries = 50;
|
||||
var leftRetries = 50;
|
||||
|
||||
while(leftRetries > 0)
|
||||
{
|
||||
@@ -1144,7 +1144,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
|
||||
task.MaxValue = ushort.MaxValue;
|
||||
|
||||
for(ushort i = (ushort)(mediaTest.BlockSize ?? 0);; i++)
|
||||
for(var i = (ushort)(mediaTest.BlockSize ?? 0);; i++)
|
||||
{
|
||||
task.Value = i;
|
||||
|
||||
@@ -1268,7 +1268,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
|
||||
mediumModel = AnsiConsole.Ask<string>(Localization.Core.Please_write_media_model);
|
||||
|
||||
bool mediaIsRecognized = true;
|
||||
var mediaIsRecognized = true;
|
||||
|
||||
await AnsiConsole.Status()
|
||||
.StartAsync(Localization.Core.Waiting_for_drive_to_become_ready,
|
||||
@@ -1291,7 +1291,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
case 0x3A:
|
||||
case 0x04 when decSense.Value.ASCQ == 0x01:
|
||||
{
|
||||
int leftRetries = 20;
|
||||
var leftRetries = 20;
|
||||
|
||||
while(leftRetries > 0)
|
||||
{
|
||||
@@ -1347,7 +1347,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
|
||||
task.MaxValue = ushort.MaxValue;
|
||||
|
||||
for(ushort i = (ushort)(mediaTest.BlockSize ?? 0);; i++)
|
||||
for(var i = (ushort)(mediaTest.BlockSize ?? 0);; i++)
|
||||
{
|
||||
task.Value = i;
|
||||
|
||||
@@ -1464,8 +1464,7 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
|
||||
task.MaxValue = ushort.MaxValue;
|
||||
|
||||
for(ushort i = (ushort)(report.SCSI.ReadCapabilities.BlockSize ?? 0);;
|
||||
i++)
|
||||
for(var i = (ushort)(report.SCSI.ReadCapabilities.BlockSize ?? 0);; i++)
|
||||
{
|
||||
task.Value = i;
|
||||
|
||||
@@ -1577,11 +1576,11 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
|
||||
public class Settings : DeviceFamily
|
||||
{
|
||||
[Description("Does a device report using a trap disc.")]
|
||||
[LocalizedDescription(nameof(UI.Device_report_using_trap_disc))]
|
||||
[CommandOption("-t|--trap-disc")]
|
||||
public bool TrapDisc { get; init; }
|
||||
|
||||
[Description("Device path")]
|
||||
[LocalizedDescription(nameof(UI.Device_path))]
|
||||
[CommandArgument(0, "<device-path>")]
|
||||
public string Path { get; init; }
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ sealed class DeviceInfoCommand : Command<DeviceInfoCommand.Settings>
|
||||
if((devInfo.AtaMcptError.Value.DeviceHead & 0x08) == 0x08)
|
||||
AaruLogging.WriteLine(Localization.Core.Media_card_is_write_protected);
|
||||
|
||||
ushort specificData = (ushort)(devInfo.AtaMcptError.Value.CylinderHigh * 0x100 +
|
||||
var specificData = (ushort)(devInfo.AtaMcptError.Value.CylinderHigh * 0x100 +
|
||||
devInfo.AtaMcptError.Value.CylinderLow);
|
||||
|
||||
if(specificData != 0) AaruLogging.WriteLine(Localization.Core.Card_specific_data_0, specificData);
|
||||
@@ -1191,7 +1191,7 @@ sealed class DeviceInfoCommand : Command<DeviceInfoCommand.Settings>
|
||||
{
|
||||
case DeviceType.MMC:
|
||||
{
|
||||
bool noInfo = true;
|
||||
var noInfo = true;
|
||||
|
||||
if(devInfo.CID != null)
|
||||
{
|
||||
@@ -1233,7 +1233,7 @@ sealed class DeviceInfoCommand : Command<DeviceInfoCommand.Settings>
|
||||
break;
|
||||
case DeviceType.SecureDigital:
|
||||
{
|
||||
bool noInfo = true;
|
||||
var noInfo = true;
|
||||
|
||||
if(devInfo.CID != null)
|
||||
{
|
||||
@@ -1341,11 +1341,11 @@ sealed class DeviceInfoCommand : Command<DeviceInfoCommand.Settings>
|
||||
|
||||
public class Settings : DeviceFamily
|
||||
{
|
||||
[Description("Prefix for saving binary information from device.")]
|
||||
[LocalizedDescription(nameof(UI.Prefix_for_saving_binary_information))]
|
||||
[CommandOption("-w|--output-prefix")]
|
||||
public string OutputPrefix { get; init; }
|
||||
|
||||
[Description("Device path")]
|
||||
[LocalizedDescription(nameof(UI.Device_path))]
|
||||
[CommandArgument(0, "<device-path>")]
|
||||
public string Path { get; init; }
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.Core;
|
||||
using Aaru.Devices;
|
||||
@@ -123,7 +124,7 @@ sealed class ListDevicesCommand : Command<ListDevicesCommand.Settings>
|
||||
public class Settings : DeviceFamily
|
||||
{
|
||||
[CanBeNull]
|
||||
[Description("aaruremote host")]
|
||||
[LocalizedDescription(nameof(UI.aaruremote_host))]
|
||||
[CommandArgument(0, "[aaru-remote-host]")]
|
||||
[DefaultValue(null)]
|
||||
public string AaruRemoteHost { get; init; }
|
||||
|
||||
@@ -226,7 +226,7 @@ sealed class ExtractFilesCommand : Command<ExtractFilesCommand.Settings>
|
||||
|
||||
AaruLogging.WriteLine(UI._0_partitions_found, partitions.Count);
|
||||
|
||||
for(int i = 0; i < partitions.Count; i++)
|
||||
for(var i = 0; i < partitions.Count; i++)
|
||||
{
|
||||
AaruLogging.WriteLine();
|
||||
AaruLogging.WriteLine($"[bold]{string.Format(UI.Partition_0, partitions[i].Sequence)}[/]");
|
||||
@@ -575,7 +575,7 @@ sealed class ExtractFilesCommand : Command<ExtractFilesCommand.Settings>
|
||||
ctx.AddTask(string.Format(UI.Reading_file_0, Markup.Escape(entry)));
|
||||
|
||||
task.MaxValue = stat.Length;
|
||||
byte[] outBuf = new byte[BUFFER_SIZE];
|
||||
var outBuf = new byte[BUFFER_SIZE];
|
||||
error = fs.OpenFile(path + "/" + entry, out IFileNode fileNode);
|
||||
|
||||
if(error == ErrorNumber.NoError)
|
||||
@@ -661,26 +661,26 @@ sealed class ExtractFilesCommand : Command<ExtractFilesCommand.Settings>
|
||||
public class Settings : FilesystemFamily
|
||||
{
|
||||
[CommandOption("-e|--encoding")]
|
||||
[Description("Name of character encoding to use.")]
|
||||
[LocalizedDescription(nameof(UI.Name_of_character_encoding_to_use))]
|
||||
[DefaultValue(null)]
|
||||
public string Encoding { get; init; }
|
||||
[CommandOption("-O|--options")]
|
||||
[Description("Comma separated name=value pairs of options to pass to filesystem plugin.")]
|
||||
[LocalizedDescription(nameof(UI.Comma_separated_name_value_pairs_of_filesystem_options))]
|
||||
[DefaultValue(null)]
|
||||
public string Options { get; init; }
|
||||
[CommandOption("-x|--xattrs")]
|
||||
[Description("Extract extended attributes if present.")]
|
||||
[LocalizedDescription(nameof(UI.Extract_extended_attributes_if_present))]
|
||||
[DefaultValue(false)]
|
||||
public bool Xattrs { get; init; }
|
||||
[CommandOption("-n|--namespace")]
|
||||
[Description("Namespace to use for filenames.")]
|
||||
[LocalizedDescription(nameof(UI.Namespace_to_use_for_filenames))]
|
||||
[DefaultValue(null)]
|
||||
public string Namespace { get; init; }
|
||||
[CommandArgument(1, "<output-dir>")]
|
||||
[Description("Directory where extracted files will be created. Will abort if it exists")]
|
||||
[LocalizedDescription(nameof(UI.Directory_where_extracted_files_will_be_created))]
|
||||
public string OutputDir { get; init; }
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
[Description("Disc image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ sealed class FilesystemInfoCommand : Command<FilesystemInfoCommand.Settings>
|
||||
|
||||
PluginRegister plugins = PluginRegister.Singleton;
|
||||
|
||||
bool checkRaw = false;
|
||||
var checkRaw = false;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -204,7 +204,7 @@ sealed class FilesystemInfoCommand : Command<FilesystemInfoCommand.Settings>
|
||||
{
|
||||
AaruLogging.WriteLine(UI._0_partitions_found, partitionsList.Count);
|
||||
|
||||
for(int i = 0; i < partitionsList.Count; i++)
|
||||
for(var i = 0; i < partitionsList.Count; i++)
|
||||
{
|
||||
Table table = new()
|
||||
{
|
||||
@@ -400,19 +400,19 @@ sealed class FilesystemInfoCommand : Command<FilesystemInfoCommand.Settings>
|
||||
|
||||
public class Settings : FilesystemFamily
|
||||
{
|
||||
[Description("Name of character encoding to use.")]
|
||||
[LocalizedDescription(nameof(UI.Name_of_character_encoding_to_use))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-e|--encoding")]
|
||||
public string Encoding { get; init; }
|
||||
[Description("Searches and prints information about filesystems.")]
|
||||
[LocalizedDescription(nameof(UI.Searches_and_interprets_partitions))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("-p|--partitions")]
|
||||
public bool Partitions { get; init; }
|
||||
[Description("Searches and interprets partitions.")]
|
||||
[LocalizedDescription(nameof(UI.Searches_and_prints_information_about_filesystems))]
|
||||
[CommandOption("-f|--filesystems")]
|
||||
[DefaultValue(true)]
|
||||
public bool Filesystems { get; init; }
|
||||
[Description("Media image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ sealed class LsCommand : Command<LsCommand.Settings>
|
||||
|
||||
AaruLogging.WriteLine(UI._0_partitions_found, partitions.Count);
|
||||
|
||||
for(int i = 0; i < partitions.Count; i++)
|
||||
for(var i = 0; i < partitions.Count; i++)
|
||||
{
|
||||
AaruLogging.WriteLine();
|
||||
AaruLogging.WriteLine($"[bold]{string.Format(UI.Partition_0, partitions[i].Sequence)}[/]");
|
||||
@@ -440,19 +440,19 @@ sealed class LsCommand : Command<LsCommand.Settings>
|
||||
|
||||
public class Settings : FilesystemFamily
|
||||
{
|
||||
[Description("Name of character encoding to use.")]
|
||||
[LocalizedDescription(nameof(UI.Name_of_character_encoding_to_use))]
|
||||
[CommandOption("-e|--encoding")]
|
||||
[DefaultValue(null)]
|
||||
public string Encoding { get; init; }
|
||||
[Description("Comma separated name=value pairs of options to pass to filesystem plugin.")]
|
||||
[LocalizedDescription(nameof(UI.Comma_separated_name_value_pairs_of_filesystem_options))]
|
||||
[CommandOption("-O|--options")]
|
||||
[DefaultValue(null)]
|
||||
public string Options { get; init; }
|
||||
[Description("Namespace to use for filenames.")]
|
||||
[LocalizedDescription(nameof(UI.Namespace_to_use_for_filenames))]
|
||||
[CommandOption("-n|--namespace")]
|
||||
[DefaultValue(null)]
|
||||
public string Namespace { get; init; }
|
||||
[Description("Media image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -699,63 +699,63 @@ sealed class ChecksumCommand : Command<ChecksumCommand.Settings>
|
||||
|
||||
public class Settings : ImageFamily
|
||||
{
|
||||
[Description("Calculates Adler-32.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_Adler_32))]
|
||||
[CommandOption("-a|--adler32")]
|
||||
[DefaultValue(false)]
|
||||
public bool Adler32 { get; init; }
|
||||
[Description("Calculates CRC16.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_CRC16))]
|
||||
[CommandOption("--crc16")]
|
||||
[DefaultValue(true)]
|
||||
public bool Crc16 { get; init; }
|
||||
[Description("Calculates CRC32.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_CRC32))]
|
||||
[CommandOption("-c|--crc32")]
|
||||
[DefaultValue(true)]
|
||||
public bool Crc32 { get; init; }
|
||||
[Description("Calculates CRC64 (ECMA).")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_CRC64_ECMA))]
|
||||
[CommandOption("--crc64")]
|
||||
[DefaultValue(true)]
|
||||
public bool Crc64 { get; init; }
|
||||
[Description("Calculates Fletcher-16.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_Fletcher_16))]
|
||||
[CommandOption("--fletcher16")]
|
||||
[DefaultValue(false)]
|
||||
public bool Fletcher16 { get; init; }
|
||||
[Description("Calculates Fletcher-32.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_Fletcher_32))]
|
||||
[CommandOption("--fletcher32")]
|
||||
[DefaultValue(false)]
|
||||
public bool Fletcher32 { get; init; }
|
||||
[Description("Calculates MD5.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_MD5))]
|
||||
[CommandOption("-m|--md5")]
|
||||
[DefaultValue(true)]
|
||||
public bool Md5 { get; init; }
|
||||
[Description("Calculates SHA1.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_SHA1))]
|
||||
[CommandOption("-s|--sha1")]
|
||||
[DefaultValue(true)]
|
||||
public bool Sha1 { get; init; }
|
||||
[Description("Calculates SHA256.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_SHA256))]
|
||||
[CommandOption("--sha256")]
|
||||
[DefaultValue(false)]
|
||||
public bool Sha256 { get; init; }
|
||||
[Description("Calculates SHA384.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_SHA384))]
|
||||
[CommandOption("--sha384")]
|
||||
[DefaultValue(false)]
|
||||
public bool Sha384 { get; init; }
|
||||
[Description("Calculates SHA512.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_SHA512))]
|
||||
[CommandOption("--sha512")]
|
||||
[DefaultValue(true)]
|
||||
public bool Sha512 { get; init; }
|
||||
[Description("Calculates SpamSum fuzzy hash.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_SpamSum_fuzzy_hash))]
|
||||
[CommandOption("-f|--spamsum")]
|
||||
[DefaultValue(true)]
|
||||
public bool SpamSum { get; init; }
|
||||
[Description("Checksums the whole disc.")]
|
||||
[LocalizedDescription(nameof(UI.Checksums_the_whole_disc))]
|
||||
[CommandOption("-w|--whole-disc")]
|
||||
[DefaultValue(true)]
|
||||
public bool WholeDisc { get; init; }
|
||||
[Description("Checksums each track separately.")]
|
||||
[LocalizedDescription(nameof(UI.Checksums_each_track_separately))]
|
||||
[CommandOption("-t|--separated-tracks")]
|
||||
[DefaultValue(true)]
|
||||
public bool SeparatedTracks { get; init; }
|
||||
[Description("Media image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -535,10 +534,10 @@ sealed class CompareCommand : Command<CompareCommand.Settings>
|
||||
|
||||
public class Settings : ImageFamily
|
||||
{
|
||||
[Description("First media image path")]
|
||||
[LocalizedDescription(nameof(UI.First_media_image_path))]
|
||||
[CommandArgument(0, "<image-path1>")]
|
||||
public string ImagePath1 { get; init; }
|
||||
[Description("Second media image path")]
|
||||
[LocalizedDescription(nameof(UI.Second_media_image_path))]
|
||||
[CommandArgument(1, "<image-path1>")]
|
||||
public string ImagePath2 { get; init; }
|
||||
}
|
||||
|
||||
@@ -2032,9 +2032,7 @@ sealed class ConvertImageCommand : Command<ConvertImageCommand.Settings>
|
||||
result = true;
|
||||
|
||||
if(settings.Force)
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_negative_sector_1_continuing, errno, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_negative_sector_1_not_continuing,
|
||||
@@ -2056,9 +2054,7 @@ sealed class ConvertImageCommand : Command<ConvertImageCommand.Settings>
|
||||
result = true;
|
||||
|
||||
if(settings.Force)
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_negative_sector_1_continuing, errno, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_negative_sector_1_not_continuing,
|
||||
@@ -2133,9 +2129,7 @@ sealed class ConvertImageCommand : Command<ConvertImageCommand.Settings>
|
||||
result = true;
|
||||
|
||||
if(settings.Force)
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_negative_sector_1_continuing, errno, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_negative_sector_1_not_continuing,
|
||||
@@ -2224,9 +2218,7 @@ sealed class ConvertImageCommand : Command<ConvertImageCommand.Settings>
|
||||
result = true;
|
||||
|
||||
if(settings.Force)
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_overflow_sector_1_continuing, errno, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_overflow_sector_1_not_continuing,
|
||||
@@ -2256,9 +2248,7 @@ sealed class ConvertImageCommand : Command<ConvertImageCommand.Settings>
|
||||
result = true;
|
||||
|
||||
if(settings.Force)
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_overflow_sector_1_continuing, errno, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
AaruLogging.Error(UI.Error_0_reading_overflow_sector_1_not_continuing,
|
||||
@@ -2388,125 +2378,125 @@ sealed class ConvertImageCommand : Command<ConvertImageCommand.Settings>
|
||||
|
||||
public class Settings : ImageFamily
|
||||
{
|
||||
[Description("Take metadata from existing CICM XML sidecar.")]
|
||||
[LocalizedDescription(nameof(UI.Take_metadata_from_existing_CICM_XML_sidecar))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-x|--cicm-xml")]
|
||||
public string CicmXml { get; init; }
|
||||
[Description("Image comments.")]
|
||||
[LocalizedDescription(nameof(UI.Image_comments))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--comments")]
|
||||
public string Comments { get; init; }
|
||||
[Description("How many sectors to convert at once.")]
|
||||
[LocalizedDescription(nameof(UI.How_many_sectors_to_convert_at_once))]
|
||||
[DefaultValue(64)]
|
||||
[CommandOption("-c|--count")]
|
||||
public int Count { get; init; }
|
||||
[Description("Who (person) created the image?")]
|
||||
[LocalizedDescription(nameof(UI.Who_person_created_the_image))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--creator")]
|
||||
public string Creator { get; init; }
|
||||
[Description("Manufacturer of the drive used to read the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Manufacturer_of_drive_read_the_media_by_image))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--drive-manufacturer")]
|
||||
public string DriveManufacturer { get; init; }
|
||||
[Description("Model of the drive used to read the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Model_of_drive_used_by_media))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--drive-model")]
|
||||
public string DriveModel { get; init; }
|
||||
[Description("Firmware revision of the drive used to read the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Firmware_revision_of_drive_read_the_media_by_image))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--drive-revision")]
|
||||
public string DriveFirmwareRevision { get; init; }
|
||||
[Description("Serial number of the drive used to read the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Serial_number_of_drive_read_the_media_by_image))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--drive-serial")]
|
||||
public string DriveSerialNumber { get; init; }
|
||||
[Description("Continue conversion even if sector or media tags will be lost in the process.")]
|
||||
[LocalizedDescription(nameof(UI.Continue_conversion_even_if_data_lost))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("-f|--force")]
|
||||
public bool Force { get; init; }
|
||||
[Description("Format of the output image, as plugin name or plugin id. If not present, will try to detect it from output image extension.")]
|
||||
[LocalizedDescription(nameof(UI.Format_of_the_output_image_as_plugin_name_or_plugin_id))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-p|--format")]
|
||||
public string Format { get; init; }
|
||||
[Description("Barcode of the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Barcode_of_the_media))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--media-barcode")]
|
||||
public string MediaBarcode { get; init; }
|
||||
[Description("Last media of the sequence the media represented by the image corresponds to.")]
|
||||
[LocalizedDescription(nameof(UI.Last_media_of_sequence_by_image))]
|
||||
[DefaultValue(0)]
|
||||
[CommandOption("--media-lastsequence")]
|
||||
public int LastMediaSequence { get; init; }
|
||||
[Description("Manufacturer of the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Manufacturer_of_media_by_image))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--media-manufacturer")]
|
||||
public string MediaManufacturer { get; init; }
|
||||
[Description("Model of the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Model_of_media_by_image))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--media-model")]
|
||||
public string MediaModel { get; init; }
|
||||
[Description("Part number of the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Part_number_of_media_by_image))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--media-partnumber")]
|
||||
public string MediaPartNumber { get; init; }
|
||||
[Description("Number in sequence for the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Number_in_sequence_for_media_by_image))]
|
||||
[DefaultValue(0)]
|
||||
[CommandOption("--media-sequence")]
|
||||
public int MediaSequence { get; init; }
|
||||
[Description("Serial number of the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Serial_number_of_media_by_image))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--media-serial")]
|
||||
public string MediaSerialNumber { get; init; }
|
||||
[Description("Title of the media represented by the image.")]
|
||||
[LocalizedDescription(nameof(UI.Title_of_media_represented_by_image))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("--media-title")]
|
||||
public string MediaTitle { get; init; }
|
||||
[Description("Comma separated name=value pairs of options to pass to output image plugin.")]
|
||||
[LocalizedDescription(nameof(UI.Comma_separated_name_value_pairs_of_image_options))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-O|--options")]
|
||||
public string Options { get; init; }
|
||||
[Description("Take list of dump hardware from existing resume file.")]
|
||||
[LocalizedDescription(nameof(UI.Take_dump_hardware_from_existing_resume))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-r|--resume-file")]
|
||||
public string ResumeFile { get; init; }
|
||||
[Description("Force geometry, only supported in not tape block media. Specify as C/H/S.")]
|
||||
[LocalizedDescription(nameof(UI.Force_geometry_help))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-g|--geometry")]
|
||||
public string Geometry { get; init; }
|
||||
[Description("Store subchannel according to the sector they describe.")]
|
||||
[LocalizedDescription(nameof(UI.Fix_subchannel_position_help))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("--fix-subchannel-position")]
|
||||
public bool FixSubchannelPosition { get; init; }
|
||||
[Description("Try to fix subchannel. Implies fixing subchannel position.")]
|
||||
[LocalizedDescription(nameof(UI.Fix_subchannel_help))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--fix-subchannel")]
|
||||
public bool FixSubchannel { get; init; }
|
||||
[Description("If subchannel looks OK but CRC fails, rewrite it. Implies fixing subchannel.")]
|
||||
[LocalizedDescription(nameof(UI.Fix_subchannel_crc_help))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--fix-subchannel-crc")]
|
||||
public bool FixSubchannelCrc { get; init; }
|
||||
[Description("Generates missing subchannels.")]
|
||||
[LocalizedDescription(nameof(UI.Generates_subchannels_help))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--generate-subchannels")]
|
||||
public bool GenerateSubchannels { get; init; }
|
||||
[Description("Try to decrypt encrypted sectors.")]
|
||||
[LocalizedDescription(nameof(UI.Decrypt_sectors_help))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--decrypt")]
|
||||
public bool Decrypt { get; init; }
|
||||
[Description("Take metadata from existing Aaru Metadata sidecar.")]
|
||||
[LocalizedDescription(nameof(UI.Take_metadata_from_existing_Aaru_sidecar))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-m|--aaru-metadata")]
|
||||
public string AaruMetadata { get; init; }
|
||||
[Description("Input image path")]
|
||||
[LocalizedDescription(nameof(UI.Input_image_path))]
|
||||
[CommandArgument(0, "<input-image>")]
|
||||
public string InputPath { get; init; }
|
||||
[Description("Output image path")]
|
||||
[LocalizedDescription(nameof(UI.Output_image_path))]
|
||||
[CommandArgument(1, "<output-image>")]
|
||||
public string OutputPath { get; init; }
|
||||
[Description("Ignore negative sectors.")]
|
||||
[LocalizedDescription(nameof(UI.Ignore_negative_sectors))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--ignore-negative-sectors")]
|
||||
public bool IgnoreNegativeSectors { get; init; }
|
||||
[Description("Ignore overflow sectors.")]
|
||||
[LocalizedDescription(nameof(UI.Ignore_overflow_sectors))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--ignore-overflow-sectors")]
|
||||
public bool IgnoreOverflowSectors { get; init; }
|
||||
|
||||
@@ -129,9 +129,11 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
||||
}
|
||||
|
||||
if(settings.Verbose)
|
||||
{
|
||||
AaruLogging.Verbose(UI.Image_format_identified_by_0_1,
|
||||
Markup.Escape(imageFormat.Name),
|
||||
imageFormat.Id);
|
||||
}
|
||||
else
|
||||
AaruLogging.WriteLine(UI.Image_format_identified_by_0, Markup.Escape(imageFormat.Name));
|
||||
|
||||
@@ -349,18 +351,18 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
||||
public class Settings : ImageFamily
|
||||
{
|
||||
[CommandOption("-b|--block-size")]
|
||||
[Description("Only used for tapes, indicates block size. Files in the folder whose size is not a multiple of this value will simply be ignored.")]
|
||||
[LocalizedDescription(nameof(UI.Create_sidecar_block_size_help))]
|
||||
[DefaultValue(512)]
|
||||
public int BlockSize { get; init; }
|
||||
[CommandOption("-e|--encoding")]
|
||||
[Description("Name of character encoding to use.")]
|
||||
[LocalizedDescription(nameof(UI.Name_of_character_encoding_to_use))]
|
||||
[DefaultValue(null)]
|
||||
public string Encoding { get; init; }
|
||||
[CommandOption("-t|--tape")]
|
||||
[Description("When used indicates that input is a folder containing alphabetically sorted files extracted from a linear block-based tape with fixed block size (e.g. a SCSI tape device).")]
|
||||
[LocalizedDescription(nameof(UI.Tape_argument_input_help))]
|
||||
[DefaultValue(false)]
|
||||
public bool Tape { get; init; }
|
||||
[Description("Media image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -381,23 +381,23 @@ sealed class DecodeCommand : Command<DecodeCommand.Settings>
|
||||
|
||||
public class Settings : ImageFamily
|
||||
{
|
||||
[Description("Decode media tags.")]
|
||||
[LocalizedDescription(nameof(UI.Decode_media_tags))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("-f|--disk-tags")]
|
||||
public bool DiskTags { get; init; }
|
||||
[Description("How many sectors to decode, or \"all\".")]
|
||||
[LocalizedDescription(nameof(UI.How_many_sectors_to_decode_or_all))]
|
||||
[DefaultValue("all")]
|
||||
[CommandOption("-l|--length")]
|
||||
public string Length { get; init; }
|
||||
[Description("Decode sector tags.")]
|
||||
[LocalizedDescription(nameof(UI.Decode_sector_tags))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("-p|--sector-tags")]
|
||||
public bool SectorTags { get; init; }
|
||||
[Description("Sector to start decoding from.")]
|
||||
[LocalizedDescription(nameof(UI.Sector_to_start_decoding_from))]
|
||||
[DefaultValue(0)]
|
||||
[CommandOption("-s|--start")]
|
||||
public ulong StartSector { get; init; }
|
||||
[Description("Media image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -212,19 +212,19 @@ sealed class EntropyCommand : Command<EntropyCommand.Settings>
|
||||
|
||||
public class Settings : ImageFamily
|
||||
{
|
||||
[Description("Calculates how many sectors are duplicated (have same exact data in user area).")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_how_many_sectors_are_duplicated))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("-p|--duplicated-sectors")]
|
||||
public bool DuplicatedSectors { get; init; }
|
||||
[Description("Calculates entropy for each track separately.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_entropy_for_each_track_separately))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("-t|--separated-tracks")]
|
||||
public bool SeparatedTracks { get; init; }
|
||||
[Description("Calculates entropy for the whole disc.")]
|
||||
[LocalizedDescription(nameof(UI.Calculates_entropy_for_the_whole_disc))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("-w|--whole-disc")]
|
||||
public bool WholeDisc { get; init; }
|
||||
[Description("Media image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
@@ -141,7 +140,7 @@ sealed class ImageInfoCommand : Command<ImageInfoCommand.Settings>
|
||||
|
||||
public class Settings : ImageFamily
|
||||
{
|
||||
[Description("Media image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -208,23 +208,23 @@ sealed class PrintHexCommand : Command<PrintHexCommand.Settings>
|
||||
|
||||
public class Settings : ImageFamily
|
||||
{
|
||||
[Description("How many sectors to print.")]
|
||||
[LocalizedDescription(nameof(UI.How_many_sectors_to_print))]
|
||||
[DefaultValue(1ul)]
|
||||
[CommandOption("-l|--length")]
|
||||
public ulong Length { get; init; }
|
||||
[Description("Print sectors with tags included.")]
|
||||
[LocalizedDescription(nameof(UI.Print_sectors_with_tags_included))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("-r|--long-sectors")]
|
||||
public bool LongSectors { get; init; }
|
||||
[Description("Starting sector.")]
|
||||
[LocalizedDescription(nameof(UI.Starting_sector))]
|
||||
[DefaultValue(0ul)]
|
||||
[CommandOption("-s|--start")]
|
||||
public ulong Start { get; init; }
|
||||
[Description("How many bytes to print per line.")]
|
||||
[LocalizedDescription(nameof(UI.How_many_bytes_to_print_per_line))]
|
||||
[DefaultValue((ushort)32)]
|
||||
[CommandOption("-w|--width")]
|
||||
public ushort Width { get; init; }
|
||||
[Description("Media image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -196,9 +196,7 @@ sealed class VerifyCommand : Command<VerifyCommand.Settings>
|
||||
opticalMediaImage.Info.Sectors);
|
||||
}
|
||||
else if(settings.CreateGraph)
|
||||
{
|
||||
mediaGraph = new BlockMap(settings.Dimensions, settings.Dimensions, opticalMediaImage.Info.Sectors);
|
||||
}
|
||||
|
||||
List<Track> inputTracks = opticalMediaImage.Tracks;
|
||||
ulong currentSectorAll = 0;
|
||||
@@ -396,16 +394,18 @@ sealed class VerifyCommand : Command<VerifyCommand.Settings>
|
||||
if(failingLbas.Count == (int)inputFormat.Info.Sectors)
|
||||
AaruLogging.Verbose($"\t[red]{UI.all_sectors}[/]");
|
||||
else
|
||||
foreach(ulong t in failingLbas)
|
||||
AaruLogging.Verbose("\t{0}", t);
|
||||
{
|
||||
foreach(ulong t in failingLbas) AaruLogging.Verbose("\t{0}", t);
|
||||
}
|
||||
|
||||
AaruLogging.WriteLine($"[yellow3_1]{UI.LBAs_without_checksum}[/]");
|
||||
|
||||
if(unknownLbas.Count == (int)inputFormat.Info.Sectors)
|
||||
AaruLogging.Verbose($"\t[yellow3_1]{UI.all_sectors}[/]");
|
||||
else
|
||||
foreach(ulong t in unknownLbas)
|
||||
AaruLogging.Verbose("\t{0}", t);
|
||||
{
|
||||
foreach(ulong t in unknownLbas) AaruLogging.Verbose("\t{0}", t);
|
||||
}
|
||||
}
|
||||
|
||||
var table = new Table();
|
||||
@@ -452,23 +452,23 @@ sealed class VerifyCommand : Command<VerifyCommand.Settings>
|
||||
|
||||
public class Settings : ImageFamily
|
||||
{
|
||||
[Description("Verify media image if supported.")]
|
||||
[LocalizedDescription(nameof(UI.Verify_media_image_if_supported))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("-w|--verify-disc")]
|
||||
public bool VerifyDisc { get; init; }
|
||||
[Description("Verify all sectors if supported.")]
|
||||
[LocalizedDescription(nameof(UI.Verify_all_sectors_if_supported))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("-s|--verify-sectors")]
|
||||
public bool VerifySectors { get; init; }
|
||||
[Description("Create graph of verified disc (currently only implemented for optical discs).")]
|
||||
[LocalizedDescription(nameof(UI.Create_graph_of_verified_disc))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("-g|--create-graph")]
|
||||
public bool CreateGraph { get; init; }
|
||||
[Description("Dimensions, as a square, in pixels, for the graph of verified media.")]
|
||||
[LocalizedDescription(nameof(UI.Verify_dimensions_paramater_help))]
|
||||
[DefaultValue(1080)]
|
||||
[CommandOption("-d|--dimensions")]
|
||||
public int Dimensions { get; init; }
|
||||
[Description("Disc image path")]
|
||||
[LocalizedDescription(nameof(UI.Media_image_path))]
|
||||
[CommandArgument(0, "<image-path>")]
|
||||
public string ImagePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
|
||||
bool fixSubchannel = settings.FixSubchannel;
|
||||
bool fixSubchannelCrc = settings.FixSubchannelCrc;
|
||||
bool fixSubchannelPosition = settings.FixSubchannelPosition;
|
||||
uint maxBlocks = (uint)settings.MaxBlocks;
|
||||
var maxBlocks = (uint)settings.MaxBlocks;
|
||||
bool eject = settings.Eject;
|
||||
|
||||
fixSubchannel |= fixSubchannelCrc;
|
||||
@@ -644,138 +644,138 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
|
||||
|
||||
public class Settings : MediaFamily
|
||||
{
|
||||
[Description("Take metadata from existing CICM XML sidecar.")]
|
||||
[LocalizedDescription(nameof(UI.Take_metadata_from_existing_CICM_XML_sidecar))]
|
||||
[CommandOption("-x|--cicm-xml")]
|
||||
[DefaultValue(null)]
|
||||
public string CicmXml { get; init; }
|
||||
[Description("Name of character encoding to use.")]
|
||||
[LocalizedDescription(nameof(UI.Name_of_character_encoding_to_use))]
|
||||
[CommandOption("-e|--encoding")]
|
||||
[DefaultValue(null)]
|
||||
public string Encoding { get; init; }
|
||||
[Description("Try to read first track pregap. Only applicable to CD/DDCD/GD.")]
|
||||
[LocalizedDescription(nameof(UI.Try_to_read_first_track_pregap))]
|
||||
[CommandOption("--first-pregap")]
|
||||
[DefaultValue(false)]
|
||||
public bool FirstPregap { get; init; }
|
||||
[Description("Fix audio tracks offset. Only applicable to CD/GD.")]
|
||||
[LocalizedDescription(nameof(UI.Fix_audio_tracks_offset))]
|
||||
[CommandOption("--fix-offset")]
|
||||
[DefaultValue(true)]
|
||||
public bool FixOffset { get; init; }
|
||||
[Description("Continue dumping whatever happens.")]
|
||||
[LocalizedDescription(nameof(UI.Continue_dumping_whatever_happens))]
|
||||
[CommandOption("-f|--force")]
|
||||
[DefaultValue(false)]
|
||||
public bool Force { get; init; }
|
||||
[Description("Format of the output image, as plugin name or plugin id. If not present, will try to detect it from output image extension.")]
|
||||
[LocalizedDescription(nameof(UI.Format_of_the_output_image_as_plugin_name_or_plugin_id))]
|
||||
[CommandOption("-t|--format")]
|
||||
[DefaultValue(null)]
|
||||
public string Format { get; init; }
|
||||
[Description("Enables creating Aaru Metadata sidecar.")]
|
||||
[LocalizedDescription(nameof(UI.Enables_creating_Aaru_Metadata_sidecar))]
|
||||
[CommandOption("--metadata")]
|
||||
[DefaultValue(true)]
|
||||
public bool Metadata { get; init; }
|
||||
[Description("Enables trimming errored from skipped sectors.")]
|
||||
[LocalizedDescription(nameof(UI.Enables_trimming_errored_from_skipped_sectors))]
|
||||
[CommandOption("--trim")]
|
||||
[DefaultValue(true)]
|
||||
public bool Trim { get; init; }
|
||||
[Description("Comma separated name=value pairs of options to pass to output image plugin.")]
|
||||
[LocalizedDescription(nameof(UI.Comma_separated_name_value_pairs_of_image_options))]
|
||||
[CommandOption("-O|--options")]
|
||||
[DefaultValue(null)]
|
||||
public string Options { get; init; }
|
||||
[Description("Try to recover partial or incorrect data.")]
|
||||
[LocalizedDescription(nameof(UI.Try_to_recover_partial_or_incorrect_data))]
|
||||
[CommandOption("--persistent")]
|
||||
[DefaultValue(false)]
|
||||
public bool Persistent { get; init; }
|
||||
[Description("Create/use resume mapfile.")]
|
||||
[LocalizedDescription(nameof(UI.Create_or_use_resume_mapfile))]
|
||||
[CommandOption("-r|--resume")]
|
||||
[DefaultValue(true)]
|
||||
public bool Resume { get; init; }
|
||||
[Description("How many retry passes to do.")]
|
||||
[LocalizedDescription(nameof(UI.How_many_retry_passes_to_do))]
|
||||
[CommandOption("-p|--retry-passes")]
|
||||
[DefaultValue(5)]
|
||||
public int RetryPasses { get; init; }
|
||||
[Description("When an unreadable sector is found skip this many sectors.")]
|
||||
[LocalizedDescription(nameof(UI.When_an_unreadable_sector_is_found_skip_this_many_sectors))]
|
||||
[CommandOption("-k|--skip")]
|
||||
[DefaultValue(512)]
|
||||
public int Skip { get; init; }
|
||||
[Description("Stop media dump on first error.")]
|
||||
[LocalizedDescription(nameof(UI.Stop_media_dump_on_first_error))]
|
||||
[CommandOption("-s|--stop-on-error")]
|
||||
[DefaultValue(false)]
|
||||
public bool StopOnError { get; init; }
|
||||
[Description("Subchannel to dump. Only applicable to CD/GD. Values: any, rw, rw-or-pq, pq, none.")]
|
||||
[LocalizedDescription(nameof(UI.Subchannel_to_dump_help))]
|
||||
[CommandOption("--subchannel")]
|
||||
[DefaultValue("any")]
|
||||
public string Subchannel { get; init; }
|
||||
[Description("Speed to dump. Only applicable to optical drives, 0 for maximum.")]
|
||||
[LocalizedDescription(nameof(UI.Speed_to_dump))]
|
||||
[CommandOption("--speed")]
|
||||
[DefaultValue(0)]
|
||||
public int Speed { get; init; }
|
||||
[Description("Do not store paths and serial numbers in log or metadata.")]
|
||||
[LocalizedDescription(nameof(UI.Do_not_store_paths_and_serial_numbers_in_log_or_metadata))]
|
||||
[CommandOption("--private")]
|
||||
[DefaultValue(false)]
|
||||
public bool Private { get; init; }
|
||||
[Description("Store subchannel according to the sector they describe.")]
|
||||
[LocalizedDescription(nameof(UI.Fix_subchannel_position_help))]
|
||||
[CommandOption("--fix-subchannel-position")]
|
||||
[DefaultValue(true)]
|
||||
public bool FixSubchannelPosition { get; init; }
|
||||
[Description("Retry subchannel. Implies fixing subchannel position.")]
|
||||
[LocalizedDescription(nameof(UI.Retry_subchannel_help))]
|
||||
[CommandOption("--retry-subchannel")]
|
||||
[DefaultValue(true)]
|
||||
public bool RetrySubchannel { get; init; }
|
||||
[Description("Try to fix subchannel. Implies fixing subchannel position.")]
|
||||
[LocalizedDescription(nameof(UI.Fix_subchannel_help))]
|
||||
[CommandOption("--fix-subchannel")]
|
||||
[DefaultValue(false)]
|
||||
public bool FixSubchannel { get; init; }
|
||||
[Description("If subchannel looks OK but CRC fails, rewrite it. Implies fixing subchannel.")]
|
||||
[LocalizedDescription(nameof(UI.Fix_subchannel_crc_help))]
|
||||
[CommandOption("--fix-subchannel-crc")]
|
||||
[DefaultValue(false)]
|
||||
public bool FixSubchannelCrc { get; init; }
|
||||
[Description("Generates missing subchannels (they don\'t count as dumped in resume file).")]
|
||||
[LocalizedDescription(nameof(UI.Generate_subchannels_dump_help))]
|
||||
[CommandOption("--generate-subchannels")]
|
||||
[DefaultValue(false)]
|
||||
public bool GenerateSubchannels { get; init; }
|
||||
[Description("Skip the hole between data and audio in a CD-i Ready disc.")]
|
||||
[LocalizedDescription(nameof(UI.Skip_CDi_Ready_hole_help))]
|
||||
[CommandOption("--skip-cdiready-hole")]
|
||||
[DefaultValue(true)]
|
||||
public bool SkipCdiReadyHole { get; init; }
|
||||
[Description("Eject media after dump finishes.")]
|
||||
[LocalizedDescription(nameof(UI.Eject_media_after_dump_finishes))]
|
||||
[CommandOption("--eject")]
|
||||
[DefaultValue(false)]
|
||||
public bool Eject { get; init; }
|
||||
[Description("Maximum number of blocks to read at once.")]
|
||||
[LocalizedDescription(nameof(UI.Maximum_number_of_blocks_to_read_at_once))]
|
||||
[CommandOption("--max-blocks")]
|
||||
[DefaultValue(64)]
|
||||
public int MaxBlocks { get; init; }
|
||||
[Description("Use OS buffered reads if CMD23 is not supported. Only applicable to MMC/SD.")]
|
||||
[LocalizedDescription(nameof(UI.OS_buffered_reads_help))]
|
||||
[CommandOption("--use-buffered-reads")]
|
||||
[DefaultValue(true)]
|
||||
public bool UseBufferedReads { get; init; }
|
||||
[Description("Store encrypted data as is.")]
|
||||
[LocalizedDescription(nameof(UI.Store_encrypted_data_as_is))]
|
||||
[CommandOption("--store-encrypted")]
|
||||
[DefaultValue(true)]
|
||||
public bool StoreEncrypted { get; init; }
|
||||
[Description("Try to read the title keys from CSS encrypted DVDs (very slow).")]
|
||||
[LocalizedDescription(nameof(UI.Try_to_read_the_title_keys_from_CSS_DVDs))]
|
||||
[CommandOption("--title-keys")]
|
||||
[DefaultValue(true)]
|
||||
public bool TitleKeys { get; init; }
|
||||
[Description("How many CD-R(W) run-out sectors to ignore and regenerate (0 for none).")]
|
||||
[LocalizedDescription(nameof(UI.How_many_CDRW_run_out_sectors_to_ignore_and_regenerate))]
|
||||
[CommandOption("--ignore-cdr-runouts")]
|
||||
[DefaultValue(10)]
|
||||
public int IgnoreCdrRunOuts { get; init; }
|
||||
[Description("Create graph of dumped media. Currently only supported for CD/DVD/BD/GD/UMD.")]
|
||||
[LocalizedDescription(nameof(UI.Create_graph_of_dumped_media))]
|
||||
[CommandOption("-g|--create-graph")]
|
||||
[DefaultValue(true)]
|
||||
public bool CreateGraph { get; init; }
|
||||
[Description("Dimensions in pixels of the square that will contain the graph of dumped media.")]
|
||||
[LocalizedDescription(nameof(UI.Dump_graph_dimensions_argument_help))]
|
||||
[CommandOption("--dimensions")]
|
||||
[DefaultValue(1080)]
|
||||
public int Dimensions { get; init; }
|
||||
[Description("Take metadata from existing Aaru Metadata sidecar.")]
|
||||
[LocalizedDescription(nameof(UI.Take_metadata_from_existing_Aaru_sidecar))]
|
||||
[CommandOption("--aaru-metadata")]
|
||||
[DefaultValue(null)]
|
||||
public string AaruMetadata { get; init; }
|
||||
[Description("Device path")]
|
||||
[LocalizedDescription(nameof(UI.Device_path))]
|
||||
[CommandArgument(0, "<device-path>")]
|
||||
public string DevicePath { get; init; }
|
||||
[Description("Output image path. If filename starts with # and exists, it will be read as a list of output images, its extension will be used to detect the image output format, each media will be ejected and confirmation for the next one will be asked.")]
|
||||
[LocalizedDescription(nameof(UI.Output_image_path_Dump_help))]
|
||||
[CommandArgument(1, "<output-path>")]
|
||||
public string OutputPath { get; init; }
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
@@ -790,7 +791,7 @@ sealed class MediaInfoCommand : Command<MediaInfoCommand.Settings>
|
||||
|
||||
AaruLogging.Write(Localization.Core.Media_Serial_Number);
|
||||
|
||||
for(int i = 4; i < scsiInfo.MediaSerialNumber.Length; i++)
|
||||
for(var i = 4; i < scsiInfo.MediaSerialNumber.Length; i++)
|
||||
AaruLogging.Write("[teal]{0:X2}[/]", scsiInfo.MediaSerialNumber[i]);
|
||||
|
||||
AaruLogging.WriteLine("");
|
||||
@@ -805,7 +806,7 @@ sealed class MediaInfoCommand : Command<MediaInfoCommand.Settings>
|
||||
|
||||
if(tracks != null)
|
||||
{
|
||||
uint firstLba = (uint)tracks.Min(t => t.StartSector);
|
||||
var firstLba = (uint)tracks.Min(t => t.StartSector);
|
||||
|
||||
bool supportsPqSubchannel = Dump.SupportsPqSubchannel(dev, null, firstLba);
|
||||
bool supportsRwSubchannel = Dump.SupportsRwSubchannel(dev, null, firstLba);
|
||||
@@ -828,7 +829,7 @@ sealed class MediaInfoCommand : Command<MediaInfoCommand.Settings>
|
||||
out bool inexactPositioning,
|
||||
false);
|
||||
|
||||
for(int t = 1; t < tracks.Length; t++) tracks[t - 1].EndSector = tracks[t].StartSector - 1;
|
||||
for(var t = 1; t < tracks.Length; t++) tracks[t - 1].EndSector = tracks[t].StartSector - 1;
|
||||
|
||||
tracks[^1].EndSector = (ulong)lastSector;
|
||||
|
||||
@@ -931,11 +932,11 @@ sealed class MediaInfoCommand : Command<MediaInfoCommand.Settings>
|
||||
|
||||
public class Settings : MediaFamily
|
||||
{
|
||||
[Description("Prefix for saving binary information from device.")]
|
||||
[LocalizedDescription(nameof(UI.Prefix_for_saving_binary_information))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-w|--output-prefix")]
|
||||
public string OutputPrefix { get; init; }
|
||||
[Description("Device path")]
|
||||
[LocalizedDescription(nameof(UI.Device_path))]
|
||||
[CommandArgument(0, "<device-path>")]
|
||||
public string DevicePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.Core;
|
||||
using Aaru.Core.Devices.Scanning;
|
||||
@@ -206,19 +207,19 @@ sealed class MediaScanCommand : Command<MediaScanCommand.Settings>
|
||||
|
||||
public class Settings : MediaFamily
|
||||
{
|
||||
[Description("Write a log of the scan in the format used by MHDD.")]
|
||||
[LocalizedDescription(nameof(UI.Write_a_log_of_the_scan_in_the_format_used_by_MHDD))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-m|--mhdd-log")]
|
||||
public string MhddLog { get; init; }
|
||||
[Description("Write a log of the scan in the format used by ImgBurn.")]
|
||||
[LocalizedDescription(nameof(UI.Write_a_log_of_the_scan_in_the_format_used_by_ImgBurn))]
|
||||
[DefaultValue(null)]
|
||||
[CommandOption("-b|--ibg-log")]
|
||||
public string IbgLog { get; init; }
|
||||
[Description("For MMC/SD, use OS buffered reads if CMD23 is not supported.")]
|
||||
[LocalizedDescription(nameof(UI.OS_buffered_reads_help))]
|
||||
[DefaultValue(true)]
|
||||
[CommandOption("--use-buffered-reads")]
|
||||
public bool UseBufferedReads { get; init; }
|
||||
[Description("Media device path")]
|
||||
[LocalizedDescription(nameof(UI.Device_path))]
|
||||
[CommandArgument(0, "<device-path>")]
|
||||
public string DevicePath { get; init; }
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
// TODO: Fix errors returned
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.Core;
|
||||
using Aaru.Localization;
|
||||
@@ -114,7 +114,7 @@ sealed class RemoteCommand : Command<RemoteCommand.Settings>
|
||||
public class Settings : BaseSettings
|
||||
{
|
||||
[CommandArgument(0, "<host>")]
|
||||
[Description("Aaru host")]
|
||||
[LocalizedDescription(nameof(UI.aaruremote_host))]
|
||||
public string Host { get; init; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user