← 返回
开发者工具 中文

archive-extractor

Recursively extract archive files from a file or directory. Supports zip, tar, tar.gz, tar.bz2, tar.xz, tgz, rar, 7z, gz, bz2, xz. Works on Windows, Linux, m...
递归解压文件或目录中的压缩包,支持 zip、tar、tar.gz、tar.bz2、tar.xz、tgz、rar、7z、gz、bz2、xz。适用于 Windows、Linux、macOS 等平台。
qiliangzhao20241028 qiliangzhao20241028 来源
开发者工具 clawhub v1.1.0 2 版本 99882.6 Key: 无需
★ 1
Stars
📥 831
下载
💾 15
安装
2
版本
#latest

概述

Archive Extractor

Extracts archives recursively using scripts/extract.py.

Zero local-software dependency — works on any machine with Python 3.8+.

.rar and .7z formats use pure-Python libraries (rarfile, py7zr) that are

auto-installed on first use via pip. No 7-Zip, WinRAR, or unrar binary needed.

How to run

python scripts/extract.py <PATH> [OPTIONS]

Always use the absolute path to the script when calling from a different working directory:

# Windows
python "C:\Users\<user>\.workbuddy\skills\archive-extractor\scripts\extract.py" "<PATH>"

# Linux / macOS
python ~/.workbuddy/skills/archive-extractor/scripts/extract.py "<PATH>"

Options

FlagDescription
-------------------
-f / --forceRe-extract even if a .extracted_success marker already exists
-d DIR / --dest DIRWrite all output under a custom root directory

Supported formats

FormatBackend
-----------------
.zipPython stdlib zipfile
.tar .tar.gz .tar.bz2 .tar.xz .tgz .tbz2Python stdlib tarfile
.gz .bz2 .xz (single-file)Python stdlib gzip / bz2 / lzma
.rarrarfile (pure-Python, auto-installed)
.7zpy7zr (pure-Python, auto-installed)

Key behaviours

  • Idempotent: skips archives that already have a .extracted_success marker; use -f to override.
  • Recursive: after extracting an archive, immediately scans the output for nested archives (up to 20 levels deep).
  • Auto-deps: rarfile and py7zr are installed automatically via pip on first use — no manual setup needed.
  • Fault-tolerant: corrupted or unsupported archives are logged as [FAIL] and skipped; remaining archives continue.

Examples

# Extract everything in a directory (including sub-archives)
python extract.py "D:\jira\TICKET-123"

# Force clean re-extraction of a single file
python extract.py report.zip -f

# Extract to a separate output folder
python extract.py "D:\jira\TICKET-123" -d "D:\extracted"

# Glob pattern — extract all zips in current directory
python extract.py "*.zip"

版本历史

共 2 个版本

  • v1.1.0 当前
    2026-05-01 05:24 安全 安全
  • v1.0.1
    2026-03-31 05:49 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 30,718
it-ops-security

Tmux

steipete
通过发送按键和抓取窗格输出,远程控制交互式 CLI 的 tmux 会话。
★ 45 📥 29,305
it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,809