{"id":13696548,"url":"https://github.com/maximtrp/ranger-archives","last_synced_at":"2026-01-19T21:37:08.042Z","repository":{"id":38349511,"uuid":"245655313","full_name":"maximtrp/ranger-archives","owner":"maximtrp","description":"Ranger Plugin for Creating and Extracting Archives","archived":false,"fork":false,"pushed_at":"2025-09-15T19:54:39.000Z","size":59,"stargazers_count":102,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-15T21:30:41.966Z","etag":null,"topics":["extracting-archives","python","ranger","ranger-archives","ranger-fm","ranger-plugin","shortcuts"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maximtrp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-07T15:16:21.000Z","updated_at":"2025-09-15T19:54:43.000Z","dependencies_parsed_at":"2024-11-13T00:30:43.727Z","dependency_job_id":"a51182a0-3f25-4f20-9e6f-7a04852e5010","html_url":"https://github.com/maximtrp/ranger-archives","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maximtrp/ranger-archives","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximtrp%2Franger-archives","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximtrp%2Franger-archives/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximtrp%2Franger-archives/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximtrp%2Franger-archives/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximtrp","download_url":"https://codeload.github.com/maximtrp/ranger-archives/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximtrp%2Franger-archives/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28585595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extracting-archives","python","ranger","ranger-archives","ranger-fm","ranger-plugin","shortcuts"],"created_at":"2024-08-02T18:00:42.395Z","updated_at":"2026-01-19T21:37:08.033Z","avatar_url":"https://github.com/maximtrp.png","language":"Python","funding_links":["https://www.buymeacoffee.com/maximtrp"],"categories":["Plugins"],"sub_categories":[],"readme":"# ranger-archives\n\nA cross-platform plugin for [ranger](https://ranger.github.io) file manager that provides seamless archive compression and extraction. The plugin automatically detects and uses available archiver programs such as `tar`, `zip`, `7z`, and prioritizes parallelized versions like `pbzip2`, `pigz`, `pixz` for better performance.\n\n## Key Features\n\n- **Cross-platform compatibility** with intelligent tool detection and validation\n- **Extensive format support**: 20+ formats including tar.gz, tar.bz2, tar.xz, tar.lz4, tar.zst, zip, 7z, rar, lzh, zpaq\n- **Smart tool selection**: Prioritizes parallel compression tools (pigz, pbzip2, pixz) for better performance\n- **Automatic fallback**: Uses alternative tools when preferred ones are unavailable\n- **Safe operations**: Validates tool compatibility and handles encoding issues gracefully\n- **Multiple extraction modes**: Extract to current directory, custom directory, or individual subdirectories\n- **Custom flag support**: Pass specific flags to underlying compression/decompression tools\n- **Auto-completion**: Tab completion for common archive formats in ranger\n- **Standalone CLI**: Command-line interface for testing and automation outside ranger\n- **Comprehensive testing**: Real-world test suite with file integrity verification\n\n[![asciicast](https://asciinema.org/a/ii764wsN8rWZfMCwVlnJAWcPM.svg)](https://asciinema.org/a/ii764wsN8rWZfMCwVlnJAWcPM)\n\n## Donate\n\nIf you find this plugin useful, please consider donating any amount of money. This will help me spend more time on supporting open-source software.\n\n\u003ca href=\"https://www.buymeacoffee.com/maximtrp\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\n## Installation\n\nClone this repo into ranger plugins folder. In Linux, it is typically located here: `~/.config/ranger/plugins`.\n\n```bash\ncd ~/.config/ranger/plugins\ngit clone https://github.com/maximtrp/ranger-archives.git\n```\n\n## Usage\n\n### Ranger Commands\n\n* `:extract [DIRECTORY]` - Extract archives to current or specified directory\n* `:extract_raw [FLAGS]` - Extract archives using custom flags (e.g., `-U` for Unicode handling)\n* `:extract_to_dirs [FLAGS]` - Extract each archive to its own subdirectory based on filename\n* `:compress [FLAGS] [FILENAME.EXT]` - Compress selected files/directories to archive with auto-naming\n\nThe compress command supports tab completion for common formats (.zip, .tar.gz, .tar.bz2, .tar.xz, .7z) and automatically names archives after the current directory if no filename is provided.\n\n### Command Line Interface\n\nThe plugin includes a standalone CLI tool for testing and automation:\n\n```bash\n# Compress files\npython3 archive_cli.py compress test.zip file1.txt file2.txt\npython3 archive_cli.py compress test.tar.gz folder/ --flags=\"-v\"\n\n# Extract archives\npython3 archive_cli.py decompress test.zip\npython3 archive_cli.py decompress test.tar.gz --output=extract/\n```\n\n## Examples\n\n### Extraction\n\n#### Basic\n\nSelect an archive and type:\n\n```\n:extract some_dir\n```\n\nOr even just:\n\n```\n:extract\n```\n\n#### Using flags\n\nThis is an example of extracting a zip archive to a directory `dirname` and escaping all non-ASCII Unicode chars:\n\n```\n:extract_raw -U -d dirname\n```\n\n### Compression\n\n#### Basic\n\nSelect a file or a folder (or multiple files and folder) in *ranger* and enter:\n\n```\n:compress files.zip\n```\n\nor (use quotation marks with filenames containing spaces)\n\n```\n:compress \"my important files.zip\"\n```\n\n#### Using flags \n\n`zip` archiver provides a flag for better compression ratio `-9` (just like `gzip` and many others).\nWe can just add it before an archive filename:\n\n```\n:compress -9 file.zip\n```\n\nThe other flags can be used likewise.\n\n## Shortcuts\n\nAdd these lines to `~/.config/ranger/rc.conf` for keyboard shortcuts:\n\n```\nmap ex extract\nmap ec compress\n```\n\n## Testing\n\nRun the comprehensive test suite to verify format support:\n\n```bash\npython3 tests/test_real_world.py\n```\n\nThis creates test data with various file types and validates compression/decompression for all available formats on your system. The test suite:\n\n- Creates diverse test files (text, binary, Unicode, nested directories)\n- Tests compression and decompression cycles\n- Verifies file integrity using SHA256 checksums\n- Measures performance and compression ratios\n- Generates detailed reports with format compatibility\n\n## Supported Formats\n\nThe plugin automatically detects and supports these formats based on available tools:\n\n### Archive Formats\n- **ZIP**: .zip (via zip/unzip or 7z)\n- **7-Zip**: .7z (via 7z/7za)\n- **RAR**: .rar (via rar/unrar or 7z)\n- **TAR**: .tar (via tar or 7z)\n- **ZPAQ**: .zpaq (via zpaq)\n\n### Compressed Archives (tar-based)\n- **Gzip**: .tar.gz, .tgz (via tar + gzip/pigz)\n- **Bzip2**: .tar.bz2, .tbz2 (via tar + bzip2/pbzip2/lbzip2)\n- **XZ**: .tar.xz, .txz (via tar + xz/pixz)\n- **LZMA**: .tar.lzma (via tar + xz/pixz)\n- **LZ4**: .tar.lz4 (via tar + lz4)\n- **LRZIP**: .tar.lrz (via tar + lrzip)\n- **LZIP**: .tar.lz (via tar + lzip/plzip)\n- **LZOP**: .tar.lzop, .tzo (via tar + lzop)\n- **Zstandard**: .tar.zst (via tar + zstd)\n\n### Smart Single-file Compression\n- **.gz**: via gzip/pigz (single file → .gz, multiple files → .tar.gz)\n- **.bz2**: via bzip2/pbzip2/lbzip2 (single file → .bz2, multiple files → .tar.bz2)\n- **.xz**: via xz/pixz (single file → .xz, multiple files → .tar.xz)\n- **.lzma**: via xz/pixz (single file → .lzma, multiple files → .tar.lzma)\n- **.lz**: via lzip/plzip (single file → .lz, multiple files → .tar.lz)\n- **.lzop**: via lzop (single file → .lzop, multiple files → .tar.lzop)\n\n### Extraction-only Formats\n- **DEB**: .deb (via ar - extraction only)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximtrp%2Franger-archives","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximtrp%2Franger-archives","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximtrp%2Franger-archives/lists"}