Browse Source

Bugfix batch addition mode

master
Starbeamrainbowlabs 4 years ago
parent
commit
c663882726
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 8
      SearchBox-CLI/Program.cs

8
SearchBox-CLI/Program.cs

@ -159,11 +159,13 @@ namespace SearchBoxCLI @@ -159,11 +159,13 @@ namespace SearchBoxCLI
string nextLine = "";
while ((nextLine = Source.ReadLine()) != null) {
string[] parts = nextLine.Split('|');
if (parts[0].Trim().Length == 0)
continue;
try {
searchBox.AddDocument(
parts[0].Trim(),
Regex.Split(parts[1], @",\s*"),
File.ReadAllText(parts[2].Trim())
parts[1].Trim(),
Regex.Split(parts[2], @",\s*"),
File.ReadAllText(parts[0].Trim())
);
Console.Error.WriteLine($"[Searchbox] [add] {parts[0].Trim()}");
} catch (FileNotFoundException) {

Loading…
Cancel
Save