diff --git a/code-cleanup-on-save.csx b/code-cleanup-on-save.csx index 7e67684..4f47674 100644 --- a/code-cleanup-on-save.csx +++ b/code-cleanup-on-save.csx @@ -8,4 +8,5 @@ var path = Directory.GetFiles(@".idea", "workspace.xml", SearchOption.AllDirecto """; var content = File.ReadAllText(path); content = content.Replace(findStr, replaceStr); + Console.WriteLine(content); File.WriteAllText(path, content); \ No newline at end of file diff --git a/code-format.cmd b/code-format.cmd index 253fbb5..2a4cd3e 100644 --- a/code-format.cmd +++ b/code-format.cmd @@ -1,3 +1,3 @@ -dot rm-bom -dot rm-blank -dot tolf \ No newline at end of file +dot rm-bom -w +dot rm-blank -w +dot tolf -w \ No newline at end of file diff --git a/src/DirOption.cs b/src/DirOption.cs index 46acf25..a71933f 100644 --- a/src/DirOption.cs +++ b/src/DirOption.cs @@ -9,6 +9,6 @@ public class DirOption : OptionBase public string Path { get; set; } - [Option('r', "readonly", HelpText = nameof(Str.ReadOnly), Default = false, ResourceType = typeof(Str))] - public bool ReadOnly { get; set; } + [Option('w', "write", HelpText = nameof(Str.WriteMode), Default = false, ResourceType = typeof(Str))] + public bool WriteMode { get; set; } } \ No newline at end of file diff --git a/src/Lang/Str.en-US.resx b/src/Lang/Str.en-US.resx index 075b05b..f03a9fc 100644 --- a/src/Lang/Str.en-US.resx +++ b/src/Lang/Str.en-US.resx @@ -1,4 +1,4 @@ - + @@ -74,9 +74,6 @@ Press any key to continue... - - Read-only mode (only for testing, no actual modification) - No documents to be processed @@ -173,4 +170,22 @@ Json text escaped into a string - \ No newline at end of file + + Enable write mode + + + Read-only mode, the file will not be modified in real time! + + + read + + + write + + + skip + + + Write statistics + + diff --git a/src/Lang/Str.resx b/src/Lang/Str.resx index e7be8a6..4fc22a6 100644 --- a/src/Lang/Str.resx +++ b/src/Lang/Str.resx @@ -137,8 +137,8 @@ 按下任意键继续... - - 只读模式(仅做测试,不实际修改) + + 启用写入模式 没有需要处理的文件 @@ -183,7 +183,7 @@ 查找 "{0}" 下所有git仓库目录... - 演习模式, 不会真实修改文件! + 只读模式, 不会真实修改文件! 读取 @@ -196,4 +196,7 @@ 跳过 + + 写入统计 + \ No newline at end of file diff --git a/src/RmBlank/Main.cs b/src/RmBlank/Main.cs index f2e7be4..d78471c 100644 --- a/src/RmBlank/Main.cs +++ b/src/RmBlank/Main.cs @@ -35,7 +35,7 @@ public sealed class Main : ToolBase