mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Merge MergeDAT, part 6
This commit is contained in:
@@ -1345,38 +1345,6 @@ Make a selection:
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wrap splitting a DAT by 2 extensions
|
||||
/// </summary>
|
||||
/// <param name="input">Input file or folder to be split</param>
|
||||
/// <param name="exta">First extension to split on</param>
|
||||
/// <param name="extb">Second extension to split on</param>
|
||||
/// <param name="outdir">Output directory for the split files</param>
|
||||
private static void InitExtSplit(string input, string exta, string extb, string outdir)
|
||||
{
|
||||
// Strip any quotations from the names
|
||||
input = input.Replace("\"", "");
|
||||
exta = exta.Replace("\"", "");
|
||||
extb = extb.Replace("\"", "");
|
||||
outdir = outdir.Replace("\"", "");
|
||||
|
||||
if (input != "" && File.Exists(input))
|
||||
{
|
||||
if (exta == "" || extb == "")
|
||||
{
|
||||
logger.Warning("Two extensions are needed to split a DAT!");
|
||||
return;
|
||||
}
|
||||
ExtSplit es = new ExtSplit(input, exta, extb, outdir, logger);
|
||||
es.Split();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Log("I'm sorry but " + input + "doesn't exist!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wrap merging, diffing, and deduping 2 or mor DATs
|
||||
/// </summary>
|
||||
@@ -1414,6 +1382,38 @@ Make a selection:
|
||||
md.Process();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wrap splitting a DAT by 2 extensions
|
||||
/// </summary>
|
||||
/// <param name="input">Input file or folder to be split</param>
|
||||
/// <param name="exta">First extension to split on</param>
|
||||
/// <param name="extb">Second extension to split on</param>
|
||||
/// <param name="outdir">Output directory for the split files</param>
|
||||
private static void InitExtSplit(string input, string exta, string extb, string outdir)
|
||||
{
|
||||
// Strip any quotations from the names
|
||||
input = input.Replace("\"", "");
|
||||
exta = exta.Replace("\"", "");
|
||||
extb = extb.Replace("\"", "");
|
||||
outdir = outdir.Replace("\"", "");
|
||||
|
||||
if (input != "" && File.Exists(input))
|
||||
{
|
||||
if (exta == "" || extb == "")
|
||||
{
|
||||
logger.Warning("Two extensions are needed to split a DAT!");
|
||||
return;
|
||||
}
|
||||
ExtSplit es = new ExtSplit(input, exta, extb, outdir, logger);
|
||||
es.Split();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Log("I'm sorry but " + input + "doesn't exist!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wrap adding a new source to the database
|
||||
/// </summary>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<Compile Include="Generate.cs" />
|
||||
<Compile Include="Import.cs" />
|
||||
<Compile Include="DATabase.cs" />
|
||||
<Compile Include="MergeDAT.cs" />
|
||||
<Compile Include="MergeDiff.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TrimMerge.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user