轻便,方便轻松重复和定制文字

Repify CLI

轻量、用户友好的命令行应用,专为文本重复设计。

安装

RepeatCLI 尚未在任何包管理器中提供,且没有编译后的版本 😮‍💨。所以你必须手动编译。

使用

RepeatCLI 是一个命令行应用,这意味着该应用程序必须从 终端 执行。

基本重复

使用 repeat-cli <text> 重复文本。其中 <text> 是你的文本。

repeat-cli Hello

结果:

% repeat-cli Hello
Hello
Hello

要重复几个单词甚至是整个句子,文本必须用 '" 符号包裹在两侧。

repeat-cli 'Be faster 🐢'

结果:

% repeat-cli 'Be faster 🐢'
Be faster 🐢
Be faster 🐢

注意:如果缺少 <text>,你将会收到此错误:

Error: Missing expected argument '<text>'

重复次数

默认情况下,文本仅重复两次。

要设置自定义重复次数,请使用 --count <count> 选项。其中 <count> 是一个数字。

repeat-cli 'I promise to always use UTF-8 🐶' --count 5

注意:你也可以使用较短的输入。

repeat-cli 'I promise to always use UTF-8 🐶' -c 5

结果:

% repeat-cli 'I promise to always use UTF-8 🐶' --count 5
I promise to always use UTF-8 🐶
I promise to always use UTF-8 🐶
I promise to always use UTF-8 🐶
I promise to always use UTF-8 🐶
I promise to always use UTF-8 🐶

注意:<count> 必须大于零。否则你将会收到此错误:

Error: 'count' must be greater than zero.

重复计数器

要包括重复计数器,请使用 --include-counter 选项。

repeat-cli 'Yare yare daze...' --count 3 --include-counter

注意:你也可以使用较短的输入。

repeat-cli 'Yare yare daze...' -c 3 -i

结果:

% repeat-cli 'Yare yare daze...' --count 3 --include-counter
1: Yare yare daze...
2: Yare yare daze...
3: Yare yare daze...

多行

如果你需要重复一个由多行组成的文本,或以更易读的版本编写参数,那么多行将会很有用。

要使用多行,你必须使用 \ 作为换行符。

repeat-cli 'Dum-dum-dum-dum, ditty dum-dum-dum \
            Dum, dum, dum