guntar

command module
v0.0.0-...-01adbf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 1 Imported by: 0

README

Guntar

docker-CI codecov

Alt Text

Guntar is a CLI tool for tar archive. It allows you to read, browse, and extract files directly in memory.

Features

  • Browse tar archives in memory
  • Extract files from tar archives
  • List files within a tar archive

Installation

Work in Progress (I will add a docker image, packages, etc...)

Install binary

For now you can clone the repository and run

make install-binary
Build docker image
make build
Build gifs

After building guntar docker image, We can build gifs with the following commands

# Build all gifs
make build-gifs
# Build one gif (here list.gif)
make build-gif-list

it will only build updated tapes.

Usage

Basic Command Structure
guntar [command]
Available Commands
explore

Alt Text

Explore your tar archive in memory directly in your CLI. You can browse, look into files, and extract selected files/folders. This interactive cli is based on bubbletea project

Usage:

guntar explore <archive file> [flags]

Flags:

  • -h, --help: Help for explore
  • -o, --output string: Output directory to extract archive

Example:

guntar explore archive.tar -o output_directory
  • Navigate through directories and files with arrows
  • Select files or directory to extract with 'a'
    • no checkmark -> file or directory not selected
    • $\color{Green}{\textsf{✓}}$ -> file selected / all child in directory selected
    • $\color{Orange}{\textsf{✓}}$ -> some files are selected in the directory
  • Extract files with 'e'

Known Issues:

  • big files can break the textbox view -> will set a max size preview
extract

Alt Text

Extract files from a tar archive.

Usage:

guntar extract <archive file> [flags]

Flags:

  • -e, --ext []string: List of files to extract
  • -h, --help: Help for extract

Example:

guntar extract archive.tar -e file1.txt -e file2.txt
help

Display help information about any command.

Usage:

guntar help [command]
list

Alt Text

List all files in the current archive.

Usage:

guntar list <archive file> [flags]

Flags:

  • -h, --help: Help for list

Example:

guntar list archive.tar
Global Flags
  • -h, --help: Display help information for Guntar.

Examples

List All Files in a Tar Archive
guntar list archive.tar
Extract Files from a Tar Archive
guntar extract archive.tar -e file1.txt -e file2.txt
Explore a Tar Archive in Memory
guntar explore archive.tar -o output_directory

Getting Help

For more information about a specific command, use:

guntar [command] --help

Contributing

TODO

License

this project use MIT license

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL