ingest_archive_7z_preview

List files and preview text contents within 7z archives using py7zr.

541|171|Updated May 3, 2018
One-click install
npx skills add https://github.com/cas-bigdatalab/piflow --skill ingest-archive-7z-preview
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ingest_archive_7z_preview
Source: https://github.com/cas-bigdatalab/piflow/tree/main/workspace/skills/ingest_archive_7z_preview
Command: npx skills add https://github.com/cas-bigdatalab/piflow --skill ingest-archive-7z-preview

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires py7zr, and includes scripts (resource) components.

What problem does it solve?

The Skill simplifies the process of scanning and reviewing the contents of 7z archives before deciding on further actions like extraction.

Core Features & Use Cases

  • File Listing: Lists all files within 7z archives, including their sizes and whether they are directories.
  • Text File Preview: Provides a preview of text files' first N bytes, or hex dump if decoding fails.
  • Scalability: Can handle recursive directory scans and a configurable maximum number of files per archive.
  • Use Case: Ideal for reviewing the structure of a 7z archive before deciding whether to extract it for processing.

Quick Start

Use the ingest_archive_7z_preview skill to generate a preview of the archive contents located at /path/to/archive with a maximum of 10 files per archive and a text preview size of 100 bytes.

Frequently Asked Questions about ingest_archive_7z_preview

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I list files inside a 7z archive without extracting it?

You can preview 7z archive contents without extraction by scanning the archive to list all files, directories, and sizes. This Skill uses the py7zr library to read archive metadata and display the internal structure for pre-processing decisions.

Can I preview the text contents of files contained in a 7z archive?

Yes, you can preview text file contents within a 7z archive by reading the first N bytes. If text decoding fails, the Skill automatically provides a hex dump of the file content instead, ensuring safe previewing of various file types.

Do I need py7zr to scan and review 7z archive contents?

Yes, the py7zr library is required to read 7z archives for file listing and text previewing. This dependency enables the Skill to parse the archive structure and access individual file contents without performing a full extraction.

What is the best way to check a 7z archive structure before extraction?

The best way to check a 7z archive structure before extraction is to perform a recursive directory scan with a configurable maximum file limit. This approach lists all files and directories, helping you review the archive contents efficiently.

How does 7z archive scanning handle large archives with many files?

7z archive scanning handles large archives by enforcing a configurable maximum number of files per archive. This limits the preview output, while recursive directory scans ensure you can still review the overall structure of extensive archives.