agude / agude/wayback-machine-archiver
Add --json flag for per-URL structured output
- 主要言語
- Python
- スター
- 90
- フォーク
- 14
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
The tool's only outputs today are log lines (stderr) and a binary exit code. Archive results are discarded.
Add `--json` to emit one JSONL line to stdout per URL terminal state:
```json
{"url": "…", "status": "success", "archive_url": "…", "timestamp": "…"}
{"url": "…", "status": "error:blocked", "archive_url": null, "timestamp": "…"}
```
`status` values: `success`, the SPN2 `status_ext` code, `timeout`, `submit_failed`.
Each line is flushed immediately, so `> results.jsonl` persists progress through crashes. CSV is available via `jq`:
```
archiver --json … | jq -r '[.url, .archive_url] | @csv' > results.csv
```
## Implementation:
Add an `on_result` callback parameter to `run_archive_workflow`. `--json` wires it to a function that writes JSONL to stdout. Workflow stays format-agnostic.
Ref: PR #34
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。