Skip to content
Snippets Groups Projects
Commit dc769cf9 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Make output cleaner

parent 5a8da699
Branches
No related tags found
No related merge requests found
......@@ -30,12 +30,14 @@ public static class Program
Console.WriteLine($"- Searching for PIDs containing \"{hostUrl}\" ...");
var pidMatches = epicClient.Search($"*{hostUrl}*"); // Define as wildcard with *<text>*
Console.WriteLine($"- Search yelded {pidMatches.Count()} results");
Console.WriteLine($"- Search yielded {pidMatches.Count()} results");
Console.WriteLine();
Console.WriteLine($"Iterating through {pidMatches.Count()} PIDs\n");
foreach (var pidMatch in pidMatches)
{
if (pidMatch.EpicPid != "")
{
Console.WriteLine($"┌ PID \"{pidMatch.EpicPid}\"");
// Get it from the EpicClient
......@@ -50,11 +52,12 @@ public static class Program
return false;
}))
{
Console.WriteLine($"└ PID already up to date, or NOT a Coscine PID. Skipping.\n");
Console.WriteLine($"└ PID already up to date. Skipping.\n");
continue;
}
MigratePid(pidMatch.EpicPid, "<UNKNOWN>", true, "unclassified");
MigratePid(pidMatch.EpicPid);
}
}
Console.WriteLine();
......@@ -78,15 +81,8 @@ public static class Program
return _epicClient;
}
public static void MigratePid(string pid, string displayName, bool isDeleted, string type)
{
Console.Write($"├ Is a ");
if (isDeleted)
public static void MigratePid(string pid)
{
Console.Write($"DELETED ");
}
Console.WriteLine($"{type} with display name \"{displayName}\"");
try
{
EpicUtil.UpdatePID(pid, _configuration, _dummyMode);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment