squishy-cli

Crates.iosquishy-cli
lib.rssquishy-cli
version0.3.0
created_at2024-11-08 02:44:21.019307+00
updated_at2024-12-01 11:41:40.313888+00
descriptionA simple CLI tool to work with SquashFS files
homepage
repositoryhttps://github.com/pkgforge/squishy-rs
max_upload_size
id1440752
size37,607
Rabindra Dhakal (QaidVoid)

documentation

README

🗜️ Squishy

License: MIT

A convenient wrapper around the backhand library for reading and extracting files from SquashFS filesystems.

Features

  • Extract AppImage resources:
    • Icon files (PNG/SVG)
    • Desktop entries
    • AppStream metadata
  • Flexible output options

Installation

From crates.io

cargo install squishy-cli

From source

git clone https://github.com/pkgforge/squishy-rs
cd squishy-rs
cargo install --path squishy-cli

Usage

The CLI tool provides convenient commands for working with AppImage files.

Basic Commands

# Extract icon from an AppImage
squishy appimage path/to/app.AppImage --icon

# Extract desktop file
squishy appimage path/to/app.AppImage --desktop

# Extract AppStream metadata
squishy appimage path/to/app.AppImage --appstream

# Extract and save files to a specific directory
squishy appimage path/to/app.AppImage --icon --write /output/path

# Extract multiple resources at once
squishy appimage path/to/app.AppImage --icon --desktop --appstream --write

# Filter path by query
squishy appimage path/to/app.AppImage --filter "squishy" --icon --desktop --appstream --write

# Provide custom offset (it'd be calculated automatically if not provided)
# Appimage offset can be read using `path/to/app.AppImage --appimage-offset`
squishy appimage path/to/app.AppImage --offset 128128 --icon --desktop --appstream --write

# The default output file has same name as the provided file.
# Use --original-name to save as the same file name found inside SquashFS
squishy appimage path/to/app.AppImage --icon --write --original-name

# Extract contents of squashfs to a specific directory
squishy unsquashfs path/to/app.AppImage -w /output/path

Command Options

  • --offset: Custom offset (i.e. the size of ELF)
  • --filter: Filter the files using provided query
  • --icon: Extract application icon
  • --desktop: Extract desktop entry file
  • --appstream: Extract AppStream metadata
  • --write: Write files to disk (optional path argument)

License

This project is licensed under the [MIT] License - see the LICENSE file for details.

Commit count: 24

cargo fmt