rust - 环境和项目初始化
$ cargo new blog_tool --bin
$ cd blog_tool
$ tree .
.
├── Cargo.toml
└── src
└── main.rs- 新增一个扫描命令
- 找到项目根目录,根目录标志是存在一个blog_tool.toml的配置文件,例如docPath: "istr-docs"
- 读取配置文件中的docPath路径地址
- 递归处理docPath下的所有md文件,找出所有./assets 开头的图片地址
- 将图片迁移到docPath目录下的 `./.imgs/{年-月}/{guid}.{图片类型后缀}`,并且修改md文档中的图片地址
- 记录md文件中的所有图片地址,将md文件中存在但./assets中没有的,./.imgs下存在但markdown文件没有使用的都记录下来
- 使用另外的两个命令,用来删除无用的image文件和显示错误的markdown文件ssh root@150.158.34.129
Jianfei@you#查看用户列表
cat /etc/passwd
#查看用户组
cat /etc/group
#查看ubuntu版本
lsb_release -a
cat /etc/os-release