| title | password | tags | katex | Comments | aside | date | top_img | cover | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
Docs-wutils |
| false | true | true | 2024-08-05 21:47:19 -0700 | https://pan.weidows.tech/d/local/blog/1d36e9d50555af6fca23e5fd36246cf5490809012.jpg |
https://github.com/Weidows/wutils
{% pullquote mindmap mindmap-sm %}
{% endpullquote %}
Some command line programs are basically what I need. If I don’t find one that meets the needs, I will simply write one for服务(service)
# install with golang
go install github.com/Weidows/wutils/cmd/common-starter@master
go install github.com/Weidows/wutils/cmd/gmm@master
go install github.com/Weidows/wutils/cmd/subdir-extracter@master
go install github.com/Weidows/wutils/cmd/wutils@master
# or use scoop
scoop install wutils
# or, just download from release:
https://github.com/Weidows/wutils/releasesDefault configuration | default config: https://github.com/Weidows/wutils/tree/master/config
If it is a scoop/release installation, the configuration will be in the compressed package
CPU: <0.1% at most time.
RAM: <10MB, very tiny.
> ./wutils
NAME:
wutils - Documents(使用指南) at here:
https://blog.weidows.tech/post/lang/golang/wutils
USAGE:
wutils [global options] command [command options]
AUTHOR:
Weidows <[email protected]>
COMMANDS:
config print config file
diff diff - Differential set between two files
文件对比工具, 但不是 Git-diff 那种
是用来求 '行-差集' 的工具
输入为两个特定名称的文件: './inputA.txt', './inputB.txt'
parallel, pl 并行+后台执行任务 (配置取自wutils.yml)
dsg Disk sleep guard
防止硬盘睡眠 (每隔一段自定义的时间, 往指定盘里写一个时间戳)
外接 HDD 频繁启停甚是头疼, 后台让它怠速跑着, 免得起起停停增加损坏率
ol Opacity Listener
后台持续运行, 并每隔指定时间扫一次运行的窗口
把指定窗口设置opacity, 使其透明化 (same as BLend)
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help Some subprogramming in wutils is designed to run continuously according to the configuration file.
So a separate configuration item is released to control the subroutine to run together.
The program that continuously runs and controls window transparency, as shown in the figure:
Only used and tested on Windows platform, there may be bugs on other platforms
The software that can be used for analogy is BLend. That software is too old and there are always some bugs, so I wrote one myself
Now most of the tools you can search are more manual, and each newly opened window must be manually set again.
wutils only needs to be changed once, and any window can be effective immediately
Adjustable parameters
Unified control of transparency of the same program
Transparency control of different programs separately
Configurable
Avoid adjusting every time
Will continue to update
Haha, after all, it's mainly because I'm using it myself
The path is config/cmd/wutils.yml
debug : false
parallel :
dsg : true
ol : true
dsg :
disk :
- " E: "
- " D: "
delay : 30
ol :
delay : 2
patterns :
- title : xyplorer
opacity : 210
- title : XYplorer
opacity : 210
- title : " - Microsoft Edge$ "
opacity : 200
- title : " - Visual Studio Code "
opacity : 180The matching rules are based on the title, so just follow the above to modify it, it is quite intuitive
title is a regex string
^ is matched from the beginning, $ is the end
For example, in my Edge browser, the title is so long through the wutils ol list command Weidows/wutils: Some demos and utils in learning u0026 developing golang. 和另外154 个页面- 个人- Microsoft Edge
I want wutils to match a window that starts with "Weidows" and ends with "- Microsoft Edge", and that should be filled in ^Weidows.*- Microsoft Edge$
opacity is transparency, (0,255]
Generally, it is more comfortable to set in the range of 200~240
{% media "bilibili" "bvid:BV1d94y1j7JC" %}
See the above introduction
Naturally, the 'row-difference' approach can be implemented through Git and some similar tools, but they cannot output as difference sets
test case at here
> ./wutils diff
================== Missing in A ==================
onlyB1
onlyB2
================== Missing in B:==================
onlyA1
onlyA2 Simple and easy to understand, crack the compressed package
password.txt in the directory where the command line is located>=1000 test/s~50% CPU usagenMB ~ nGB RAM usageFormat conversion starts, for example, some programs can only start .exe, and other formats can be started through this program, such as .bat
> common-starter ./test.batThe main function is to disband the first-level directory
subdir-extracter 0 ./1
params:
The following is before and after dissolution, the test file is in cmd/subdir-extracter/1
D:DESKTOP1
│ 2.3.txt
│
├─2.1
│ │ 3.1.txt
│ │ 3.2.txt
│ │
│ └─3.3
└─2.2
│ 3.1.txt
│ 3.2.txt
│
└─2.2
D:DESKTOP1
│ 2.2-3.2.txt
│ 2.3.txt
│ 3.1.txt
│ 3.2.txt
│
├─2.2
└─3.3
Applicable scenarios are very single: For example, a large number of picture packages/datasets, nesting many layers makes people uncomfortable (it is a headache to move it out manually at n > 10)
There is no corresponding tool to use, so I wrote this
Golang package Mirror Manager
> gmm test
proxy
125ms huawei
178ms baidu
219ms aliyun
338ms proxy-cn
476ms default
612ms proxy-io
623ms tencent
sumdb
433ms google
451ms default
743ms sumdb-io ╰─ gmm proxy huawei
Proxy use huawei https://repo.huaweicloud.com/repository/goproxy
╰─ gmm sumdb default
Sumdb use default https://sum.golang.org Generally, it is a package used in New, targeting对象(object)
Package used to crack compressed files, there are calls in cmd above
Tool-like functions are often used but difficult to deal with codes, targeting类型(type)
The comments that are more biased towards go are the documentation practices. There are various tool libraries in utils. You can install them first. Maybe you can use them at the beginning of development.
现存函数大大大概率不会删/改名. The base is roughly set and there will be deprecated/break change.
None yet.