20 个版本
0.1.29 | 2024 年 6 月 19 日 |
---|---|
0.1.28 | 2023 年 1 月 11 日 |
0.1.27 | 2022 年 6 月 18 日 |
0.1.25 | 2021 年 11 月 15 日 |
0.1.17 | 2021 年 3 月 22 日 |
#1156 在 文本处理 中
每月 72 次下载
用于 aki-txpr-macro
32KB
556 行
aki-mcycle
用于标记循环颜色的文本的程序。
功能
- 使用循环颜色标记文本。
- 最低支持 rustc 1.58.1 (db9d1b20b 2022-01-20)
命令帮助
aki-mcycle --help
Usage:
aki-mcycle [options]
mark up text with the cyclic color.
Options:
-e, --exp <exp> write it in the cyclic color (default: ' ([0-9A-Z]{3,}):')
-H, --help display this help and exit
-V, --version display version information and exit
Option Parameters:
<exp> regular expression, color the entire match with the cyclic color.
Environments:
AKI_MCYCLE_COLOR_SEQ_RED_ST red start sequence specified by ansi
AKI_MCYCLE_COLOR_SEQ_GREEN_ST green start sequence specified by ansi
AKI_MCYCLE_COLOR_SEQ_BLUE_ST blue start sequence specified by ansi
AKI_MCYCLE_COLOR_SEQ_CYAN_ST cyan start sequence specified by ansi
AKI_MCYCLE_COLOR_SEQ_MAGENDA_ST magenda start sequence specified by ansi
AKI_MCYCLE_COLOR_SEQ_YELLOW_ST yellow start sequence specified by ansi
AKI_MCYCLE_COLOR_SEQ_ED color end sequence specified by ansi
快速安装
- 您可以将此安装到 cargo 的 bin 路径
cargo install aki-mcycle
- 您可以构建 Debian 软件包
cargo deb
并将 .deb 安装到您的本地 Debian 软件包仓库。
示例
命令行示例 1
从 rustup 目标列表中提取 "arm
" 并使 "linux-[^ ]+
" 着色。
- 第一次匹配:使 '
linux-musl
' 变红 - 第二次匹配:使 '
linux-musleabi
' 变绿 - 第三次匹配:使 '
linux-musleabihf
' 变蓝 - 第四次匹配:使 '
linux-muslabi64
' 变青
rustup target list | aki-mline -e arm | aki-mcycle -e "linux-[^ ]+"
结果输出
- aki-mline: 类似 grep 的提取匹配行命令。
库示例
请参阅 fn execute()
了解此库示例。
变更日志
许可
此项目根据您的选择,受以下其中之一许可协议的约束
- Apache 许可证 2.0 (LICENSE-APACHE 或 https://apache.ac.cn/licenses/LICENSE-2.0)
- MIT 许可证 (LICENSE-MIT 或 https://opensource.org/licenses/MIT)
。
依赖关系
~3-4MB
~81K SLoC