计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
cli-batch-processing【效率与协作】Use Trafilatura's command line for stdin, URL/list, and local directory batch extraction with safe outputs, configs, backups, parallelism, and validation.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user wants Trafilatura from a shell or automation script rather than Python APIs: stdin extraction, -u/--URL, URL-list batches, local --input-dir batches, output directories, backups, --keep-dirs, output format flags, --parallel, --config-file, metadata filters, deduplication, precision/recall presets, and XML-TEI validation.
Do not use this sub-skill for direct Python function calls; route those requests to python-extraction. For feed/sitemap/crawl algorithms beyond the CLI flag invocation, route to discovery-downloads. For conceptual deduplication, corpus formats, and TEI quality details, route to corpus-quality.
trafilatura --version
trafilatura --help
# PATH fallback when the console script is unavailable:
python -m trafilatura.cli --help
-u/--URL: download and extract one URL;-i/--input-file: process a text file containing one URL per line;--input-dir: walk local downloaded HTML files.-o/--output-dir: print to stdout;-o DIR: write result files, creating directories as needed;--backup-dir DIR: keep gzipped raw HTML for URL downloads;--keep-dirs: preserve local input paths, but only with -o/--output-dir.--with-metadata, --only-with-metadata, --deduplicate, --precision, --recall, --xmltei --validate-tei, --json, --markdown, etc.python scripts/cli_fixture_runner.py
python scripts/cli_fixture_runner.py --json
references/cli-reference.md — flag groups, input/output rules, format interactions, safe command construction, exit statuses.references/batch-workflows.md — ready-to-adapt stdin, URL-list, directory, backup, config, listing, and TEI recipes.references/troubleshooting.md — CLI-specific failure symptoms and recoveries.scripts/cli_fixture_runner.py — no-network smoke helper for installed CLI behavior.subprocess.run([...]) argument lists over shell strings.--parallel 1, increase only when allowed, and use SLEEP_TIME in a config file for domain-level pacing.--list prints URLs only and ignores extraction/output-format expectations.--input-dir values when using --keep-dirs, so mirrored output paths stay inside the chosen output directory.This sub-skill distills Trafilatura 2.2.0 CLI behavior from public package docs, CLI source, settings source, and selected CLI/download tests. Evidence labels include docs/usage-cli.rst, docs/quickstart.rst, docs/installation.rst, docs/settings.rst, docs/troubleshooting.rst, trafilatura/cli.py, trafilatura/cli_utils.py, trafilatura/settings.py, trafilatura/settings.cfg, tests/cli_tests.py, and selected tests/downloads_tests.py queue cases.