mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Colorize create sidecar.
This commit is contained in:
@@ -1305,8 +1305,8 @@
|
|||||||
<value>Calcula la entropía y/o sectores duplicados de una imagen.</value>
|
<value>Calcula la entropía y/o sectores duplicados de una imagen.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Image_format_identified_by_0" xml:space="preserve">
|
<data name="Image_format_identified_by_0" xml:space="preserve">
|
||||||
<value>Formato de imagen identificado por {0}.</value>
|
<value>[slateblue1]Formato de imagen identificado por [green]{0}[/].[/]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Image_format_identified_by_0_1" xml:space="preserve">
|
<data name="Image_format_identified_by_0_1" xml:space="preserve">
|
||||||
<value>[slateblue1]Formato de imagen identificado por [green]{0}[/] ([italic][red]{1}[/][/]).[/]</value>
|
<value>[slateblue1]Formato de imagen identificado por [green]{0}[/] ([italic][red]{1}[/][/]).[/]</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1383,11 +1383,11 @@
|
|||||||
<value>El formato de entrada contiene la imagen de una cinta y esto no está soportado por el formato de salida, no se continuará...</value>
|
<value>El formato de entrada contiene la imagen de una cinta y esto no está soportado por el formato de salida, no se continuará...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Input_image_format_identified_by_0" xml:space="preserve">
|
<data name="Input_image_format_identified_by_0" xml:space="preserve">
|
||||||
<value>Formato de imagen de entrada identificado por {0}.</value>
|
<value>[slateblue1]Formato de imagen de entrada identificado por [green]{0}[/].[/]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Input_image_format_identified_by_0_1" xml:space="preserve">
|
<data name="Input_image_format_identified_by_0_1" xml:space="preserve">
|
||||||
<value>Formato de imagen de entrada identificado por {0} ({1}).</value>
|
<value>[slateblue1]Formato de imagen de entrada identificado por [green]{0}[/] ([italic][red]{1}[/][/]).[/]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Input_image_format_not_identified" xml:space="preserve">
|
<data name="Input_image_format_not_identified" xml:space="preserve">
|
||||||
<value>Formato de imagen de entrada no identificado, no se procederá con la conversión...</value>
|
<value>Formato de imagen de entrada no identificado, no se procederá con la conversión...</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -405,8 +405,8 @@ In you are unsure, please press N to not continue.</value>
|
|||||||
<value>[slateblue1]Image format identified by [green]{0}[/] ([italic][red]{1}[/][/]).[/]</value>
|
<value>[slateblue1]Image format identified by [green]{0}[/] ([italic][red]{1}[/][/]).[/]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Image_format_identified_by_0" xml:space="preserve">
|
<data name="Image_format_identified_by_0" xml:space="preserve">
|
||||||
<value>Image format identified by {0}.</value>
|
<value>[slateblue1]Image format identified by [green]{0}[/].[/]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Output_directory_missing" xml:space="preserve">
|
<data name="Output_directory_missing" xml:space="preserve">
|
||||||
<value>Output directory missing.</value>
|
<value>Output directory missing.</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -995,11 +995,11 @@ In you are unsure, please press N to not continue.</value>
|
|||||||
<value>Command not yet supported for this image type.</value>
|
<value>Command not yet supported for this image type.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Input_image_format_identified_by_0_1" xml:space="preserve">
|
<data name="Input_image_format_identified_by_0_1" xml:space="preserve">
|
||||||
<value>Input image format identified by {0} ({1}).</value>
|
<value>[slateblue1]Input image format identified by [green]{0}[/] ([italic][red]{1}[/][/]).[/]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Input_image_format_identified_by_0" xml:space="preserve">
|
<data name="Input_image_format_identified_by_0" xml:space="preserve">
|
||||||
<value>Input image format identified by {0}.</value>
|
<value>[slateblue1]Input image format identified by [green]{0}[/].[/]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Image_identifies_media_type_as_0" xml:space="preserve">
|
<data name="Image_identifies_media_type_as_0" xml:space="preserve">
|
||||||
<value>Image identifies media type as {0}.</value>
|
<value>Image identifies media type as {0}.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
|
|
||||||
AaruLogging.Debug(MODULE_NAME, "--block-size={0}", settings.BlockSize);
|
AaruLogging.Debug(MODULE_NAME, "--block-size={0}", settings.BlockSize);
|
||||||
AaruLogging.Debug(MODULE_NAME, "--debug={0}", settings.Debug);
|
AaruLogging.Debug(MODULE_NAME, "--debug={0}", settings.Debug);
|
||||||
AaruLogging.Debug(MODULE_NAME, "--encoding={0}", Markup.Escape(settings.Encoding ?? ""));
|
AaruLogging.Debug(MODULE_NAME, "--encoding={0}", settings.Encoding);
|
||||||
AaruLogging.Debug(MODULE_NAME, "--input={0}", Markup.Escape(settings.ImagePath ?? ""));
|
AaruLogging.Debug(MODULE_NAME, "--input={0}", settings.ImagePath);
|
||||||
AaruLogging.Debug(MODULE_NAME, "--tape={0}", settings.Tape);
|
AaruLogging.Debug(MODULE_NAME, "--tape={0}", settings.Tape);
|
||||||
AaruLogging.Debug(MODULE_NAME, "--verbose={0}", settings.Verbose);
|
AaruLogging.Debug(MODULE_NAME, "--verbose={0}", settings.Verbose);
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
sidecarClass.UpdateProgressEvent += (text, current, maximum) =>
|
sidecarClass.UpdateProgressEvent += (text, current, maximum) =>
|
||||||
{
|
{
|
||||||
_progressTask1 ??= ctx.AddTask("Progress");
|
_progressTask1 ??= ctx.AddTask("Progress");
|
||||||
_progressTask1.Description = Markup.Escape(text);
|
_progressTask1.Description = text;
|
||||||
_progressTask1.Value = current;
|
_progressTask1.Value = current;
|
||||||
_progressTask1.MaxValue = maximum;
|
_progressTask1.MaxValue = maximum;
|
||||||
};
|
};
|
||||||
@@ -189,7 +189,7 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
sidecarClass.UpdateProgressEvent2 += (text, current, maximum) =>
|
sidecarClass.UpdateProgressEvent2 += (text, current, maximum) =>
|
||||||
{
|
{
|
||||||
_progressTask2 ??= ctx.AddTask("Progress");
|
_progressTask2 ??= ctx.AddTask("Progress");
|
||||||
_progressTask2.Description = Markup.Escape(text);
|
_progressTask2.Description = text;
|
||||||
_progressTask2.Value = current;
|
_progressTask2.Value = current;
|
||||||
_progressTask2.MaxValue = maximum;
|
_progressTask2.MaxValue = maximum;
|
||||||
};
|
};
|
||||||
@@ -206,10 +206,7 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
_progressTask2 = null;
|
_progressTask2 = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
sidecarClass.UpdateStatusEvent += text =>
|
sidecarClass.UpdateStatusEvent += text => { AaruLogging.WriteLine(text); };
|
||||||
{
|
|
||||||
AaruLogging.WriteLine(Markup.Escape(text));
|
|
||||||
};
|
|
||||||
|
|
||||||
Console.CancelKeyPress += (_, e) =>
|
Console.CancelKeyPress += (_, e) =>
|
||||||
{
|
{
|
||||||
@@ -244,7 +241,6 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
AaruLogging.Error(string.Format(UI.Error_reading_file_0, Markup.Escape(ex.Message)));
|
|
||||||
AaruLogging.Exception(ex, UI.Error_reading_file_0, ex.Message);
|
AaruLogging.Exception(ex, UI.Error_reading_file_0, ex.Message);
|
||||||
|
|
||||||
return (int)ErrorNumber.UnexpectedException;
|
return (int)ErrorNumber.UnexpectedException;
|
||||||
@@ -280,7 +276,7 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
sidecarClass.UpdateProgressEvent += (text, current, maximum) =>
|
sidecarClass.UpdateProgressEvent += (text, current, maximum) =>
|
||||||
{
|
{
|
||||||
_progressTask1 ??= ctx.AddTask("Progress");
|
_progressTask1 ??= ctx.AddTask("Progress");
|
||||||
_progressTask1.Description = Markup.Escape(text);
|
_progressTask1.Description = text;
|
||||||
_progressTask1.Value = current;
|
_progressTask1.Value = current;
|
||||||
_progressTask1.MaxValue = maximum;
|
_progressTask1.MaxValue = maximum;
|
||||||
};
|
};
|
||||||
@@ -288,7 +284,7 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
sidecarClass.UpdateProgressEvent2 += (text, current, maximum) =>
|
sidecarClass.UpdateProgressEvent2 += (text, current, maximum) =>
|
||||||
{
|
{
|
||||||
_progressTask2 ??= ctx.AddTask("Progress");
|
_progressTask2 ??= ctx.AddTask("Progress");
|
||||||
_progressTask2.Description = Markup.Escape(text);
|
_progressTask2.Description = text;
|
||||||
_progressTask2.Value = current;
|
_progressTask2.Value = current;
|
||||||
_progressTask2.MaxValue = maximum;
|
_progressTask2.MaxValue = maximum;
|
||||||
};
|
};
|
||||||
@@ -305,7 +301,7 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
_progressTask2 = null;
|
_progressTask2 = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
sidecarClass.UpdateStatusEvent += text => { AaruLogging.WriteLine(Markup.Escape(text)); };
|
sidecarClass.UpdateStatusEvent += text => { AaruLogging.WriteLine(text); };
|
||||||
|
|
||||||
Console.CancelKeyPress += (_, e) =>
|
Console.CancelKeyPress += (_, e) =>
|
||||||
{
|
{
|
||||||
@@ -315,7 +311,7 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
|
|
||||||
sidecar = sidecarClass.BlockTape(Path.GetFileName(settings.ImagePath),
|
sidecar = sidecarClass.BlockTape(Path.GetFileName(settings.ImagePath),
|
||||||
files,
|
files,
|
||||||
settings.BlockSize);
|
(uint)settings.BlockSize);
|
||||||
});
|
});
|
||||||
|
|
||||||
Core.Spectre.ProgressSingleSpinner(ctx =>
|
Core.Spectre.ProgressSingleSpinner(ctx =>
|
||||||
@@ -353,7 +349,7 @@ sealed class CreateSidecarCommand : Command<CreateSidecarCommand.Settings>
|
|||||||
[CommandOption("-b|--block-size")]
|
[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.")]
|
[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.")]
|
||||||
[DefaultValue(512)]
|
[DefaultValue(512)]
|
||||||
public uint BlockSize { get; init; }
|
public int BlockSize { get; init; }
|
||||||
[CommandOption("-e|--encoding")]
|
[CommandOption("-e|--encoding")]
|
||||||
[Description("Name of character encoding to use.")]
|
[Description("Name of character encoding to use.")]
|
||||||
[DefaultValue(null)]
|
[DefaultValue(null)]
|
||||||
|
|||||||
Reference in New Issue
Block a user