Cn Duplicate Remover

Other

Remove duplicate lines from text while optionally preserving order or sorting and counting duplicates.

Install

openclaw skills install cn-duplicate-remover

cn-duplicate-remover

重复行去除工具。去除文本中的重复行,支持保留顺序或排序。

功能

  • 去除重复行
  • 保留首次出现顺序
  • 统计重复次数

使用方法

python3 scripts/dedup.py --text "第一行\n第二行\n第一行"
python3 scripts/dedup.py --file input.txt --output output.txt

纯Python标准库。