From ff8db0103892bd6402f538ce6d3df2a311b29e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Tue, 21 Apr 2026 22:40:51 +0800 Subject: [PATCH] Delete tools/anew.yaml --- tools/anew.yaml | 81 ------------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 tools/anew.yaml diff --git a/tools/anew.yaml b/tools/anew.yaml deleted file mode 100644 index f55a2743..00000000 --- a/tools/anew.yaml +++ /dev/null @@ -1,81 +0,0 @@ -name: "anew" -command: "python3" -args: - - "-c" - - | - import shlex - import subprocess - import sys - - if len(sys.argv) < 2: - sys.stderr.write("缺少输入数据\n") - sys.exit(1) - - input_data = sys.argv[1] - output_file = sys.argv[2] if len(sys.argv) > 2 else "" - additional = sys.argv[3] if len(sys.argv) > 3 else "" - - cmd = ["anew"] - if additional: - cmd.extend(shlex.split(additional)) - if output_file: - cmd.append(output_file) - - proc = subprocess.run( - cmd, - input=input_data.encode("utf-8"), - capture_output=True, - text=True, - ) - - if proc.returncode != 0: - sys.stderr.write(proc.stderr or proc.stdout) - sys.exit(proc.returncode) - - sys.stdout.write(proc.stdout) -enabled: true -short_description: "数据去重工具,用于处理文件中的新行" -description: | - Anew是一个数据去重工具,用于将新行追加到文件中,自动过滤重复项。 - - **主要功能:** - - 数据去重 - - 文件追加 - - 唯一行过滤 - - 快速处理 - - **使用场景:** - - 数据处理 - - 结果去重 - - 数据合并 - - 工具链集成 -parameters: - - name: "input_data" - type: "string" - description: "输入数据" - required: true - position: 0 - format: "positional" - - name: "output_file" - type: "string" - description: "输出文件路径" - required: false - default: "" - position: 1 - format: "positional" - - name: "additional_args" - type: "string" - description: | - 额外的anew参数。用于传递未在参数列表中定义的anew选项。 - - **示例值:** - - 根据工具特性添加常用参数示例 - - **注意事项:** - - 多个参数用空格分隔 - - 确保参数格式正确,避免命令注入 - - 此参数会直接追加到命令末尾 - required: false - default: "" - position: 2 - format: "positional"