Ranger: Explore archives like a normal folder

Created on 23 Jan 2016  路  5Comments  路  Source: ranger/ranger

Krusader has support for exploring many types of archives seamlessly. Maybe this could implemented here as well?

enhancement

Most helpful comment

What about using FUSE or archivemount? From wiki: archivemount is a FUSE-based file system for Unix variants, including Linux. Its purpose is to mount archives (e.g. tar, tar.gz, etc.) to a mount point where it can be read from or written to as with any other file system. This makes accessing the contents of the archive, which may be compressed, transparent to other programs, without decompressing them.

All 5 comments

@hut How do you think something like this could be implemented? This might involve extracting the archive to a temporary folder first and not everyone may want that.

or maybe we could parse the content of archive lists (generated using scope.sh) and then build a tree out of it, but that's way too tricky.

@dufferzafar A sensible approach would be to use tar or atool etc for listing the archive content in an efficient manner and then construct a directory view in ranger based on that list. However, the view of ranger is not abstracted from the file system, so this won't be possible. To hack around this, you could create an actual directory and one (empty) file for every entry in the archive listing.

What about using FUSE or archivemount? From wiki: archivemount is a FUSE-based file system for Unix variants, including Linux. Its purpose is to mount archives (e.g. tar, tar.gz, etc.) to a mount point where it can be read from or written to as with any other file system. This makes accessing the contents of the archive, which may be compressed, transparent to other programs, without decompressing them.

archivemount only supports tar.gz and zip (and a few lesser used like cpio or shar). For rar files you'd need Pyarrfs or rar2fs. For 7z fuse-7z-ng.

I think the best way would be something similar to what mc does: Define commands for listing files, adding, extracting, deleting, etc. and then use the normal archiving tools to produce a virtual view of the archive's contents.

That does sound like the easiest way to support nearly every archive format with a simple config. Could provide default implementations for add/delete/list based on extract/archive. That way the user need only specify tar x and tar z respectively for example but could specify commands for the others to make it (a lot) more efficient.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LordFoom picture LordFoom  路  5Comments

LinArcX picture LinArcX  路  4Comments

Chinggis6 picture Chinggis6  路  4Comments

kevinhwang91 picture kevinhwang91  路  5Comments

hepan-git picture hepan-git  路  3Comments