diff --git a/Aaru.Archives/Aaru.Archives.csproj b/Aaru.Archives/Aaru.Archives.csproj
new file mode 100644
index 000000000..60aeddbf9
--- /dev/null
+++ b/Aaru.Archives/Aaru.Archives.csproj
@@ -0,0 +1,113 @@
+
+
+
+ Debug
+ AnyCPU
+ 2.0
+ {282271D0-CCC2-4ED7-BA38-EC06A84BB974}
+ Library
+ Aaru.Archives
+ Aaru.Archives
+ $(Version)
+ false
+ true
+ 5.2.99.3380-alpha
+ Claunia.com
+ Copyright © 2011-2021 Natalia Portillo
+ Aaru Data Preservation Suite
+ Aaru.Archives
+ $(Version)
+ netcoreapp3.1
+ 8
+ Archive implementations used by the Aaru Data Preservation Suite.
+ https://github.com/aaru-dps/
+ LGPL-2.1-only
+ https://github.com/aaru-dps/Aaru.Archives
+ true
+ en-US
+ true
+ true
+ snupkg
+ Natalia Portillo <claunia@claunia.com>
+
+
+ $(Version)+{chash:8}
+ true
+ true
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+ false
+
+
+ true
+ bin\Release
+ prompt
+ 4
+ false
+
+
+
+
+
+
+
+
+
+ LICENSE.LGPL
+
+
+
+
+
+ {CCAA7AFE-C094-4D82-A66D-630DE8A3F545}
+ Aaru.Console
+
+
+ {F8BDF57B-1571-4CD0-84B3-B422088D359A}
+ Aaru.Helpers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /Library/Frameworks/Mono.framework/Versions/Current/lib/mono
+ /usr/lib/mono
+ /usr/local/lib/mono
+
+ $(BaseFrameworkPathOverrideForMono)/4.0-api
+ $(BaseFrameworkPathOverrideForMono)/4.5-api
+ $(BaseFrameworkPathOverrideForMono)/4.5.1-api
+ $(BaseFrameworkPathOverrideForMono)/4.5.2-api
+ $(BaseFrameworkPathOverrideForMono)/4.6-api
+ $(BaseFrameworkPathOverrideForMono)/4.6.1-api
+ $(BaseFrameworkPathOverrideForMono)/4.6.2-api
+ $(BaseFrameworkPathOverrideForMono)/4.7-api
+ $(BaseFrameworkPathOverrideForMono)/4.7.1-api
+ true
+
+ $(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)
+
+
diff --git a/Aaru.Archives/Register.cs b/Aaru.Archives/Register.cs
new file mode 100644
index 000000000..f6ea0ce10
--- /dev/null
+++ b/Aaru.Archives/Register.cs
@@ -0,0 +1,73 @@
+// /***************************************************************************
+// Aaru Data Preservation Suite
+// ----------------------------------------------------------------------------
+//
+// Filename : Register.cs
+// Author(s) : Natalia Portillo
+//
+// Component : Core algorithms.
+//
+// --[ Description ] ----------------------------------------------------------
+//
+// Registers all plugins in this assembly.
+//
+// --[ License ] --------------------------------------------------------------
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// ----------------------------------------------------------------------------
+// Copyright © 2011-2021 Natalia Portillo
+// ****************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using Aaru.CommonTypes.Interfaces;
+
+namespace Aaru.Archives
+{
+ public sealed class Register : IPluginRegister
+ {
+ public List GetAllChecksumPlugins() => null;
+
+ public List GetAllFilesystemPlugins() => null;
+
+ public List GetAllFilterPlugins() => null;
+
+ public List GetAllFloppyImagePlugins() => null;
+
+ public List GetAllMediaImagePlugins() => null;
+
+ public List GetAllPartitionPlugins() => null;
+
+ public List GetAllReadOnlyFilesystemPlugins() => null;
+
+ public List GetAllWritableFloppyImagePlugins() => null;
+
+ public List GetAllWritableImagePlugins() => null;
+
+ public List GetAllArchivePlugins() => Assembly.GetExecutingAssembly().GetTypes().
+ Where(t => t.GetInterfaces().
+ Contains(typeof(IArchive
+ ))).Where(t => t.IsClass).
+ ToList();
+ }
+}
diff --git a/Aaru.Core/Aaru.Core.csproj b/Aaru.Core/Aaru.Core.csproj
index c028c743f..ef47040de 100644
--- a/Aaru.Core/Aaru.Core.csproj
+++ b/Aaru.Core/Aaru.Core.csproj
@@ -144,6 +144,7 @@
+
{ccaa7afe-c094-4d82-a66d-630de8a3f545}
Aaru.Console
@@ -249,4 +250,4 @@
$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)
-
\ No newline at end of file
+
diff --git a/Aaru.Core/GetPluginBase.cs b/Aaru.Core/GetPluginBase.cs
index ba7fa824e..6e8ed2df5 100644
--- a/Aaru.Core/GetPluginBase.cs
+++ b/Aaru.Core/GetPluginBase.cs
@@ -49,15 +49,17 @@ namespace Aaru.Core
IPluginRegister filesystemsRegister = new Aaru.Filesystems.Register();
IPluginRegister filtersRegister = new Filters.Register();
IPluginRegister partitionsRegister = new Aaru.Partitions.Register();
+ IPluginRegister archiveRegister = new Aaru.Archives.Register();
instance.AddPlugins(checksumRegister);
instance.AddPlugins(imagesRegister);
instance.AddPlugins(filesystemsRegister);
instance.AddPlugins(filtersRegister);
instance.AddPlugins(partitionsRegister);
+ instance.AddPlugins(archiveRegister);
return instance;
}
}
}
-}
\ No newline at end of file
+}
diff --git a/Aaru.sln b/Aaru.sln
index 352830551..ce727b0ab 100644
--- a/Aaru.sln
+++ b/Aaru.sln
@@ -34,17 +34,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Database", "Aaru.Datab
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Dto", "Aaru.Dto\Aaru.Dto.csproj", "{F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Gui", "Aaru.Gui\Aaru.Gui.csproj", "{18C4C44D-2562-4B6D-8181-32D7EA067D96}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Gui", "Aaru.Gui\Aaru.Gui.csproj", "{18C4C44D-2562-4B6D-8181-32D7EA067D96}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs", "cuetools.net\CUETools.Codecs\CUETools.Codecs.csproj", "{D1F69B02-A6A4-4EF2-A916-815BACC18F71}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUETools.Codecs", "cuetools.net\CUETools.Codecs\CUETools.Codecs.csproj", "{D1F69B02-A6A4-4EF2-A916-815BACC18F71}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Tests", "Aaru.Tests\Aaru.Tests.csproj", "{B2A2CCF8-150D-4A00-BCB5-1B0CBCFA95D5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Tests", "Aaru.Tests\Aaru.Tests.csproj", "{B2A2CCF8-150D-4A00-BCB5-1B0CBCFA95D5}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Tests.Devices", "Aaru.Tests.Devices\Aaru.Tests.Devices.csproj", "{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Tests.Devices", "Aaru.Tests.Devices\Aaru.Tests.Devices.csproj", "{A40662EB-D202-46A4-AB41-9C32ADE6D6B5}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.Flake", "cuetools.net\CUETools.Codecs.Flake\CUETools.Codecs.Flake.csproj", "{69FAC887-A3DE-4C23-84A5-9C5F64E4C3E1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUETools.Codecs.Flake", "cuetools.net\CUETools.Codecs.Flake\CUETools.Codecs.Flake.csproj", "{69FAC887-A3DE-4C23-84A5-9C5F64E4C3E1}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Decryption", "Aaru.Decryption\Aaru.Decryption.csproj", "{B609D333-80C5-4503-BF46-8B9B91F04E97}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Decryption", "Aaru.Decryption\Aaru.Decryption.csproj", "{B609D333-80C5-4503-BF46-8B9B91F04E97}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Archives", "Aaru.Archives\Aaru.Archives.csproj", "{282271D0-CCC2-4ED7-BA38-EC06A84BB974}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -230,6 +232,14 @@ Global
{B609D333-80C5-4503-BF46-8B9B91F04E97}.Release|Any CPU.Build.0 = Release|Any CPU
{B609D333-80C5-4503-BF46-8B9B91F04E97}.Release|x86.ActiveCfg = Release|Any CPU
{B609D333-80C5-4503-BF46-8B9B91F04E97}.Release|x86.Build.0 = Release|Any CPU
+ {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Debug|x86.Build.0 = Debug|Any CPU
+ {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Release|Any CPU.Build.0 = Release|Any CPU
+ {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Release|x86.ActiveCfg = Release|Any CPU
+ {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Aaru/Aaru.csproj b/Aaru/Aaru.csproj
index 75de583cc..1fdea9075 100644
--- a/Aaru/Aaru.csproj
+++ b/Aaru/Aaru.csproj
@@ -84,6 +84,8 @@
+
+
diff --git a/Aaru/Commands/Archive/ArchiveFamily.cs b/Aaru/Commands/Archive/ArchiveFamily.cs
new file mode 100644
index 000000000..29281bc40
--- /dev/null
+++ b/Aaru/Commands/Archive/ArchiveFamily.cs
@@ -0,0 +1,48 @@
+// /***************************************************************************
+// Aaru Data Preservation Suite
+// ----------------------------------------------------------------------------
+//
+// Filename : ArchiveFamily.cs
+// Author(s) : Michael Drüing
+//
+// Component : Commands.
+//
+// --[ Description ] ----------------------------------------------------------
+//
+// Implements the 'archive' command family.
+//
+// --[ License ] --------------------------------------------------------------
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// ----------------------------------------------------------------------------
+// Copyright © 2011-2021 Natalia Portillo
+// ****************************************************************************/
+
+using System.CommandLine;
+
+namespace Aaru.Commands.Archive
+{
+ internal sealed class ArchiveFamily : Command
+ {
+ internal ArchiveFamily() : base("archive",
+ "Commands to manage archive files")
+ {
+ AddAlias("arc");
+
+ AddCommand(new ArchiveInfoCommand());
+// AddCommand(new UpdateCommand(mainDbUpdate));
+ }
+ }
+}
diff --git a/Aaru/Commands/Archive/Info.cs b/Aaru/Commands/Archive/Info.cs
new file mode 100644
index 000000000..925fab857
--- /dev/null
+++ b/Aaru/Commands/Archive/Info.cs
@@ -0,0 +1,80 @@
+// /***************************************************************************
+// Aaru Data Preservation Suite
+// ----------------------------------------------------------------------------
+//
+// Filename : Info.cs
+// Author(s) : Michael Drüing
+//
+// Component : Commands.
+//
+// --[ Description ] ----------------------------------------------------------
+//
+// Implements the 'info' command.
+//
+// --[ License ] --------------------------------------------------------------
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// ----------------------------------------------------------------------------
+// Copyright © 2011-2021 Natalia Portillo
+// ****************************************************************************/
+
+using System;
+using System.CommandLine;
+using System.CommandLine.Invocation;
+using Aaru.CommonTypes;
+using Aaru.CommonTypes.Enums;
+using Aaru.CommonTypes.Interfaces;
+using Aaru.Console;
+using Aaru.Core;
+
+namespace Aaru.Commands.Archive
+{
+ internal sealed class ArchiveInfoCommand : Command
+ {
+ public ArchiveInfoCommand() : base("info",
+ "Opens an archive file and shows information about it.")
+ {
+ AddArgument(new Argument
+ {
+ Arity = ArgumentArity.ExactlyOne,
+ Description = "Archive file path",
+ Name = "archive-path"
+ });
+
+ Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke)));
+ }
+
+ public static int Invoke(bool debug, bool verbose, string imagePath)
+ {
+ MainClass.PrintCopyright();
+
+ if(debug)
+ AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine;
+
+ if(verbose)
+ AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine;
+
+ Statistics.AddCommand("archive-info");
+
+ AaruConsole.DebugWriteLine("Analyze command", "--debug={0}", debug);
+ AaruConsole.DebugWriteLine("Analyze command", "--input={0}", imagePath);
+ AaruConsole.DebugWriteLine("Analyze command", "--verbose={0}", verbose);
+
+ /* TODO: This is just a stub for now */
+
+ return (int)ErrorNumber.NoError;
+ }
+ }
+}
diff --git a/Aaru/Commands/Formats.cs b/Aaru/Commands/Formats.cs
index c97510a4d..990023cf7 100644
--- a/Aaru/Commands/Formats.cs
+++ b/Aaru/Commands/Formats.cs
@@ -147,7 +147,21 @@ namespace Aaru.Commands
else
AaruConsole.WriteLine(kvp.Value.Name);
+ AaruConsole.WriteLine();
+ AaruConsole.WriteLine("Supported archive formats ({0}):",
+ plugins.Archives.Count);
+
+ if(verbose)
+ AaruConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin");
+
+ foreach(KeyValuePair kvp in plugins.Archives)
+ if(verbose)
+ AaruConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name);
+ else
+ AaruConsole.WriteLine(kvp.Value.Name);
+
+
return (int)ErrorNumber.NoError;
}
}
-}
\ No newline at end of file
+}
diff --git a/Aaru/Main.cs b/Aaru/Main.cs
index a8c48f47b..14706c386 100644
--- a/Aaru/Main.cs
+++ b/Aaru/Main.cs
@@ -43,6 +43,7 @@ using Aaru.Commands.Device;
using Aaru.Commands.Filesystem;
using Aaru.Commands.Image;
using Aaru.Commands.Media;
+using Aaru.Commands.Archive;
using Aaru.Console;
using Aaru.Core;
using Aaru.Database;
@@ -185,6 +186,7 @@ namespace Aaru
rootCommand.AddCommand(new FilesystemFamily());
rootCommand.AddCommand(new ImageFamily());
rootCommand.AddCommand(new MediaFamily());
+ rootCommand.AddCommand(new ArchiveFamily());
rootCommand.AddCommand(new ConfigureCommand(false, false));
rootCommand.AddCommand(new FormatsCommand());
@@ -206,4 +208,4 @@ namespace Aaru
AaruConsole.WriteLine();
}
}
-}
\ No newline at end of file
+}