Giter Site home page Giter Site logo

ranger-archives's Introduction

ranger-archives

This is a plugin for ranger file manager that makes it much easier to compress and extract archives. It depends on archivers/compression programs such as tar, zip, 7z, etc. It also supports and prioritizes parallelized versions of compression programs (like pbzip2, pigz, pixz, etc).

asciicast

Installation

Clone this repo into ranger plugins folder. In Linux, it is typically located here: ~/.config/ranger/plugins.

cd ~/.config/ranger/plugins
git clone https://github.com/maximtrp/ranger-archives.git

Usage

The following commands are available:

  • :extract [DIRECTORY]: extracting files to a current or specified directory (optional).
  • :extract_raw [FLAGS]: extracting files with specific flags (optional).
  • :extract_to_dirs [FLAGS]: extracting each archive to a separate directory. E.g.: 1.zip to dir 1, 2.zip to dir 2, etc.
  • :compress [FLAGS] [FILENAME.EXT]: compressing selected/marked files/directories to an archive. If an archive filename is not specified, it will be named after a parent dir.

Examples

Extraction

Basic

Select an archive and type:

:extract some_dir

Or even just:

:extract

Using flags

This is an example of extracting a zip archive to a directory dirname and escaping all non-ASCII Unicode chars:

:extract_raw -U -d dirname

Compression

Basic

Select a file or a folder (or multiple files and folder) in ranger and enter:

:compress files.zip

Using flags

zip archiver provides a flag for better compression ratio -9 (just like gzip and many others). We can just add it before an archive filename:

:compress -9 file.zip

The other flags can be used likewise.

Shortcuts

You can also add these lines to ~/.config/ranger/rc.conf to use these keyboard shortcuts (ec, ex):

map ex extract
map ec compress

ranger-archives's People

Contributors

maximtrp avatar midren avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.