From 474ca92c1c7872200d4f9831b40f74a1e9e38858 Mon Sep 17 00:00:00 2001 From: ikpil Date: Thu, 8 Jun 2023 23:28:30 +0900 Subject: [PATCH] remove converter project --- DotRecast.sln | 7 -- tools/ConvertVector/ConvertVector.csproj | 10 --- tools/ConvertVector/Program.cs | 95 ------------------------ 3 files changed, 112 deletions(-) delete mode 100644 tools/ConvertVector/ConvertVector.csproj delete mode 100644 tools/ConvertVector/Program.cs diff --git a/DotRecast.sln b/DotRecast.sln index 25c8005..58e4b2c 100644 --- a/DotRecast.sln +++ b/DotRecast.sln @@ -37,8 +37,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotRecast.Recast.Demo", "sr EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{65754308-3C9B-4544-9D7B-F2C16A4E2486}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConvertVector", "tools\ConvertVector\ConvertVector.csproj", "{2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotRecast.Recast.DemoTool", "src\DotRecast.Recast.DemoTool\DotRecast.Recast.DemoTool.csproj", "{DF987948-8C23-4337-AF83-D87D6407518D}" EndProject Global @@ -106,10 +104,6 @@ Global {023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Debug|Any CPU.Build.0 = Debug|Any CPU {023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Release|Any CPU.ActiveCfg = Release|Any CPU {023E1E6A-4895-4573-89AE-3D5D8E0B39C8}.Release|Any CPU.Build.0 = Release|Any CPU - {2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E7E2C58-BCA3-4590-BA9D-0872DE546DBD}.Release|Any CPU.Build.0 = Release|Any CPU {DF987948-8C23-4337-AF83-D87D6407518D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DF987948-8C23-4337-AF83-D87D6407518D}.Debug|Any CPU.Build.0 = Debug|Any CPU {DF987948-8C23-4337-AF83-D87D6407518D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -130,7 +124,6 @@ Global {DEB16B90-CCD4-497E-A2E9-4CC66FD7EF47} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD} {3CAA7306-088E-4373-A406-99755CC2B605} = {A7CB8D8B-70DA-4567-8316-0659FCAE1C73} {023E1E6A-4895-4573-89AE-3D5D8E0B39C8} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD} - {2E7E2C58-BCA3-4590-BA9D-0872DE546DBD} = {65754308-3C9B-4544-9D7B-F2C16A4E2486} {DF987948-8C23-4337-AF83-D87D6407518D} = {8ED75CF7-A3D6-423D-8499-9316DD413DAD} EndGlobalSection EndGlobal diff --git a/tools/ConvertVector/ConvertVector.csproj b/tools/ConvertVector/ConvertVector.csproj deleted file mode 100644 index f02677b..0000000 --- a/tools/ConvertVector/ConvertVector.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net7.0 - enable - enable - - - diff --git a/tools/ConvertVector/Program.cs b/tools/ConvertVector/Program.cs deleted file mode 100644 index 6b2839f..0000000 --- a/tools/ConvertVector/Program.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; - -public class FileLocation -{ - public required string Path { get; init; } - public required int Line { get; init; } - public required int Column { get; init; } - public required string Letter { get; init; } -}; - - -public static class Program -{ - private static List CreateLocations(string path) - { - List list = File.ReadAllLines(path) - .Where(line => line.Contains("error CS1061: ")) - .ToList(); - - List locations = new List(); - foreach (string input in list) - { - string pattern = "([A-Za-z]:\\\\[^\\\\]+\\\\[^\\\\]+(?:\\\\[^\\\\]+)*\\\\[^\\\\]+\\.cs)\\((\\d+),(\\d+)\\)"; - Match match = Regex.Match(input, pattern); - if (match.Success) - { - string str1 = match.Groups[1].Value; - string s1 = match.Groups[2].Value; - string s2 = match.Groups[3].Value; - string str2 = ""; - if (input.Contains("'x'에 대한")) - str2 = "x"; - if (input.Contains("'y'에 대한")) - str2 = "y"; - if (input.Contains("'z'에 대한")) - str2 = "z"; - FileLocation fileLocation = new FileLocation() - { - Path = str1, - Line = int.Parse(s1), - Column = int.Parse(s2), - Letter = str2 - }; - locations.Add(fileLocation); - } - } - - return locations; - } - - private static void Change(FileLocation location) - { - string[] contents = File.ReadAllLines(location.Path); - var line = contents[location.Line - 1]; - List list = line.ToCharArray() - .Select((x => x.ToString() ?? "")) - .ToList(); - - // 다르면 하지 말것 - if ("." != list[location.Column - 2] || location.Letter != list[location.Column - 1]) - return; - - list[location.Column - 2] = "["; - if (location.Letter == "x") - list[location.Column - 1] = "0]"; - else if (location.Letter == "y") - list[location.Column - 1] = "1]"; - else if (location.Letter == "z") - list[location.Column - 1] = "2]"; - string str = string.Join("", (IEnumerable)list); - contents[location.Line - 1] = str; - - File.WriteAllLines(location.Path, contents); - } - - public static void Main(string[] args) - { - var locations = CreateLocations("../../../../../error.log"); - var distinctLocations = locations.DistinctBy(x => x.Path + x.Line).ToList(); - if (0 >= distinctLocations.Count) - { - return; - } - - foreach (FileLocation location in distinctLocations) - { - Change(location); - Console.WriteLine($"{location.Path}({location.Line}:{location.Column})"); - } - } -} \ No newline at end of file