Skip to content

Developer/Tester common tools CLI. 开发/测试常用工具CLI

License

Notifications You must be signed in to change notification settings

shenguanjiejie/workwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

workwork

Developer/Tester common tools CLI.
开发/测试常用工具CLI

Base64 encode/decode.
Base64编码/解码

Calculater
计算器

Run Go scripts by string.
使用字符串, 像脚本一样直接运行Go代码

md5

Regex test tool.
正则表达式测试工具

Time format tool.
时间转换工具

Chinese/English Translate tool.
汉英/英汉翻译

URL encode/decode.
URL编码/解码

uuid

Install

Mac

brew install shenguanjiejie/tap/workwork

or

wget https://github.com/shenguanjiejie/workwork/releases/download/v1.0.1/workwork_1.0.1_darwin.tar.gz && tar -zxvf ./workwork_1.0.1_darwin.tar.gz && mv ./ww /usr/local/bin && rm ./workwork_1.0.1_darwin.tar.gz && rm ./ww

or

Download, Unpack, and move "ww" to /usr/local/bin.
release页面下载后, 解压出ww文件, 放在/usr/local/bin目录下即可

Linux

wget https://github.com/shenguanjiejie/workwork/releases/download/v1.0.1/workwork_1.0.1_linux_x86_64.tar.gz && tar -zxvf ./workwork_1.0.1_linux_x86_64.tar.gz && mv ./ww /usr/local/bin && rm ./workwork_1.0.1_linux_x86_64.tar.gz && rm ./ww

or

Download, Unpack, and move "ww" to /usr/local/bin.
release页面下载后, 解压出ww文件, 放在/usr/local/bin目录下即可

base64

Base64 encode/decode.
Base64编码/解码
Multiple encode/decode support, split with space.
支持用空格隔开, 一次进行多个编码/解码

params(参数) shorthand(缩写) default(默认值) usage(说明)
--file -f Specify full file path.
指定文件的全路径
--decode -d false Decode flag.
是否是要解码
--image -i false Image flag will append "data:image/png;base64," to header of decode result, and save image to current path after encode.
是否是对图片的编解码, 对图片编码会增加"data:image/png;base64,"前缀, 对base64进行图片解码会保存png文件到当前目录

base64

cc

Calculater
计算器
Based on Go interpreter, supports various operators, logical operations, and bitwise operations.
使用Go解释器实现,支持各种运算符,逻辑运算以及位运算

cc

go

Run Go scripts by string.
使用字符串, 像脚本一样直接运行Go代码
"fmt" "time" "os" "math" is imported by default,otherwise you should import packages by yourself.
fmt,time,os,math包默认引入, 其他包需单独import

go

md5

md5
Multiple encode support, split with space. and file supported too.
支持用空格隔开,传入多个字符串md5,支持文件md5

params(参数) shorthand(缩写) default(默认值) usage(说明)
--file -f Specify full file path.
指定文件的全路径

md5

regex

Regex test tool.
正则表达式测试工具 Source: https://github.com/any86/any-rule

params(参数) shorthand(缩写) default(默认值) usage(说明)
--file -f Specify full file path.
指定文件的全路径
--wanna -w Find common regex.
查找常用的正则表达式
--match -m false Return true or false by match result.
能否找到正则匹配的项, 返回true或者false
--count -c 1 Specify the maximum number of matches. return the first one by default.
使用查找匹配文本内容时, 用该int值指定返回的最大匹配数量, 默认只返回第一个匹配项

regex

time

Time format tool.
时间转换工具
Multiple support, split with space.
支持用空格隔开, 一次进行多个时间转换

params(参数) shorthand(缩写) default(默认值) usage(说明)
--unix -u false Input a Unix time or millisecond Unix time.
指定时间戳, 支持秒级和毫秒级时间戳

time

trans

Chinese/English Translate tool.
汉英/英汉翻译
更详细的单词释义音标等, 后续考虑加入

trans

url

URL encode/decode.
URL编码/解码

params(参数) shorthand(缩写) default(默认值) usage(说明)
--decode -d false Decode flag.
是否是要解码

url

uuid

uuid
Multiple support
支持输出多个uuid

params(参数) shorthand(缩写) default(默认值) usage(说明)
--count -c 1 UUID count.
UUID 个数
--version -v 4 UUID version, default: 4.
UUID 版本, 默认: 4

uuid

TODO:

  1. 默认保存路径配置, 默认读取文件路径配置. (Default I/O path config)
  2. 单元测试. (Unit testing)
  3. Alfred支持. (Alfred support)
  4. color command, 色值转换(类似"time")
  5. ...