diff --git a/README.md b/README.md index fedb448..816e8aa 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,88 @@ # dot -[中](README.zh-CN.md) | **En** +Cross-platform, all-around utility set with a beautiful character interface-the Swiss Army knife -A full-featured utility - the programmer's swiss army knife +### Brief introduction -```mermaid -graph LR; -dot-v1.1.5-->File-newline-character-conversion-tool -dot-v1.1.5-->NTP-clock-synchronization-tool -dot-v1.1.5-->Various-text-codec-tools -dot-v1.1.5-->Remove-the-file-UTF-BOM -dot-v1.1.5-->Remove-the-blank-of-the-file -dot-v1.1.5-->Random-password-generator -dot-v1.1.5-->Json-utility -dot-v1.1.5-->Ip-utility-tool -dot-v1.1.5-->GUID-generator -dot-v1.1.5-->Git-command-bulk-executor -dot-v1.1.5-->Screen-coordinates-and-pixel-picker -``` \ No newline at end of file +The dot is the one based on the one. NET 7, a cross-platform command-line tool, integrates more than 10 utilities that program developers often use in their daily work, and is constantly increasing. + +``` +USAGE: + dot [OPTIONS] + +OPTIONS: + -h, --help Prints help information + -v, --version Prints version information + +COMMANDS: + git Git batch operation tool + color Screen coordinate color selection tool + guid GUID tool + ip IP tools + json Json tool + pwd Random password generator + rbom Remove the uf8 bom of the file + trim Remove line breaks and spaces at the end of the file + text Text encoding tool + time Time synchronization tool + tolf Convert newline characters to LF + get Multithreaded download tool + + +``` + + + +### Some functional examples + +- ##### Git batch management + +When you have a clone and a lot of git repositories, use this command to pull their latest code all at once: + +``` +dot git -a "pull" d:\repos +``` + +![20221212212417](./doc/snapshots/20221212212417.png) + +Similarly, you can execute any git commands on a bunch of git repositories in bulk: + +``` +dot git -a "config --get http.proxy" d:\repos +``` + +![20221212213957](./doc/snapshots/20221212213957.png) + +- ##### High-precision time-clock synchronization +Supports parallel requests from multiple NTP clock servers, while removing the network communication duration to set the precise synchronization of the native clocks with the NTP standard time: +``` +dot time -k +``` + +![20221212214514](./doc/snapshots/20221212214514.png) + +- ##### Text codec +Copy you need to view various codec text in the clipboard, and then enter the following command to view +``` +dot text +``` + +![20221212214904](./doc/snapshots/20221212214904.png) + + +- ##### Multi-threading download tool +Support setting the block size, number of threads to replace the single thread wget tool: +``` +dot get https://github.com/nsnail/dot/releases/download/v1.1.1/dot-v1.1.1-win-x64.7z +``` + +![20221212215259](./doc/snapshots/20221212215259.png) + + +- ##### Remove the blank at the end of the file +Remove excess spaces and line breaks in the tail of all files in the specified directory: +``` +dot trim d:\repos +``` + +![20221212215853](./doc/snapshots/20221212215853.png) \ No newline at end of file diff --git a/README.zh-CN.md b/README.zh-CN.md index 215994a..896ccf9 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,18 +1,87 @@ # dot -功能全面的实用工具 - 程序员的瑞士军刀 +跨平台的、具有美观字符界面的全能实用工具集 - 程序员的瑞士军刀 -```mermaid -graph LR; - dot-v1.1.5-->文件换行符转换工具 - dot-v1.1.5-->NTP时钟同步工具 - dot-v1.1.5-->各种文本编解码工具 - dot-v1.1.5-->移除文件UTF-BOM - dot-v1.1.5-->移除文件尾部空白符 - dot-v1.1.5-->随机密码生成器 - dot-v1.1.5-->Json实用工具 - dot-v1.1.5-->Ip实用工具 - dot-v1.1.5-->GUID生成器 - dot-v1.1.5-->Git命令批量执行器 - dot-v1.1.5-->屏幕坐标和颜色选取工具 -``` \ No newline at end of file +### 简介 + +dot 是一款基于.NET7,跨平台的命令行工具,集成10多种程序开发人员在日常工作常常用到的实用功能,并且还在不断增加。 + +``` +USAGE: + dot [OPTIONS] + +OPTIONS: + -h, --help Prints help information + -v, --version Prints version information + +COMMANDS: + git Git批量操作工具 + color 屏幕坐标颜色选取工具 + guid GUID工具 + ip IP工具 + json Json工具 + pwd 随机密码生成器 + rbom 移除文件的uf8 bom + trim 移除文件尾部换行和空格 + text 文本编码工具 + time 时间同步工具 + tolf 转换换行符为LF + get 多线程下载工具 + +``` + + + +### 部分功能示例 + +- ##### Git批量管理 + +当你clone了大量的git仓库, 使用这条命令可以一次性拉取它们的最新代码: + +``` +dot git -a "pull" d:\repos +``` + +![20221212212417](./doc/snapshots/20221212212417.png) + +类似地,你可以批量对一堆git仓库执行任何git命令: + +``` +dot git -a "config --get http.proxy" d:\repos +``` + +![20221212213957](./doc/snapshots/20221212213957.png) + +- ##### 高精度时钟同步 +支持多个NTP时钟服务器并行请求,同时除去网络通信时长以设置本机时钟与NTP标准时间精确同步: +``` +dot time -k +``` + +![20221212214514](./doc/snapshots/20221212214514.png) + +- ##### 文本编解码 +复制你需要查看各种编解码的文本在剪贴板中,然后输入如下命令,即可查看 +``` +dot text +``` + +![20221212214904](./doc/snapshots/20221212214904.png) + + +- ##### 多线程下载工具 +支持设置分块大小,线程数量,用以替代单线程的wget工具: +``` +dot get https://github.com/nsnail/dot/releases/download/v1.1.1/dot-v1.1.1-win-x64.7z +``` + +![20221212215259](./doc/snapshots/20221212215259.png) + + +- ##### 移除文件末尾空白 +移除指定目录下所有文件尾部多余的空格和换行符: +``` +dot trim d:\repos +``` + +![20221212215853](./doc/snapshots/20221212215853.png) \ No newline at end of file diff --git a/doc/snapshots/20221212212417.png b/doc/snapshots/20221212212417.png new file mode 100644 index 0000000..0a28e51 Binary files /dev/null and b/doc/snapshots/20221212212417.png differ diff --git a/doc/snapshots/20221212213957.png b/doc/snapshots/20221212213957.png new file mode 100644 index 0000000..08ed0a2 Binary files /dev/null and b/doc/snapshots/20221212213957.png differ diff --git a/doc/snapshots/20221212214514.png b/doc/snapshots/20221212214514.png new file mode 100644 index 0000000..0873907 Binary files /dev/null and b/doc/snapshots/20221212214514.png differ diff --git a/doc/snapshots/20221212214904.png b/doc/snapshots/20221212214904.png new file mode 100644 index 0000000..49c5b31 Binary files /dev/null and b/doc/snapshots/20221212214904.png differ diff --git a/doc/snapshots/20221212215259.png b/doc/snapshots/20221212215259.png new file mode 100644 index 0000000..4f3d6dd Binary files /dev/null and b/doc/snapshots/20221212215259.png differ diff --git a/doc/snapshots/20221212215853.png b/doc/snapshots/20221212215853.png new file mode 100644 index 0000000..bfbf597 Binary files /dev/null and b/doc/snapshots/20221212215853.png differ diff --git a/doc/snapshots/img-optimize.cmd b/doc/snapshots/img-optimize.cmd new file mode 100644 index 0000000..4a697a0 --- /dev/null +++ b/doc/snapshots/img-optimize.cmd @@ -0,0 +1,2 @@ +for %%i in (*.png) do pngquant %%i --force --output %%i --skip-if-larger +for %%i in (*.jpg) do jpegtran -copy none -optimize -perfect %%i %%i \ No newline at end of file diff --git a/src/Program.cs b/src/Program.cs index 0236a2c..b30c867 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -1,3 +1,4 @@ +using System.Globalization; using System.Text; using Dot; using Dot.Git; @@ -28,4 +29,6 @@ app.Configure(config => { }); Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); +CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); +CultureInfo.CurrentUICulture = CultureInfo.GetCultureInfo("en-US"); return app.Run(args); \ No newline at end of file