{"id":13344125,"url":"https://github.com/Ljzd-PRO/CH-Extractor","last_synced_at":"2025-03-12T06:31:14.944Z","repository":{"id":109683758,"uuid":"490019161","full_name":"Ljzd-PRO/CH-Extractor","owner":"Ljzd-PRO","description":"在Linux以及macOS上解压中文密码的压缩包","archived":false,"fork":false,"pushed_at":"2022-07-12T16:15:37.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T05:13:18.422Z","etag":null,"topics":["7z","7zip","archive","bash","gbk","shell","zip"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Ljzd-PRO.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":"2022-05-08T18:05:34.000Z","updated_at":"2022-06-08T17:26:42.000Z","dependencies_parsed_at":"2023-04-08T07:37:26.003Z","dependency_job_id":null,"html_url":"https://github.com/Ljzd-PRO/CH-Extractor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ljzd-PRO%2FCH-Extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ljzd-PRO%2FCH-Extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ljzd-PRO%2FCH-Extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ljzd-PRO%2FCH-Extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ljzd-PRO","download_url":"https://codeload.github.com/Ljzd-PRO/CH-Extractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171645,"owners_count":20247878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["7z","7zip","archive","bash","gbk","shell","zip"],"created_at":"2024-07-29T19:32:27.731Z","updated_at":"2025-03-12T06:31:14.934Z","avatar_url":"https://github.com/Ljzd-PRO.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CH Extractor\n\n## 简介\n由于 Windows 的中文编码是GBK，因此在 Linux 以及 macOS 等这类使用 UTF-8 编码的平台上，解压 Windows 压缩的中文密码压缩包非常不便，而该Shell脚本可以解决这个问题。\n\n脚本默认使用 7z 软件包的命令作为解压命令，但你也可以自定义要使用的解压工具。\n\n除了 GBK 编码以外，你还可以自定义原密码编码格式。\n\n## 使用\n* 下载脚本到 `/usr/local/bin` 以便在任何位置执行。你可以选用下面两个命令之一来下载\n```shell\ncurl https://raw.githubusercontent.com/Ljzd-PRO/CH-Extractor/main/chextract -o chextract \u0026\u0026 mv chextract /usr/local/bin/\n```\n\n```shell\nwget https://raw.githubusercontent.com/Ljzd-PRO/CH-Extractor/main/chextract \u0026\u0026 mv chextract /usr/local/bin/\n```\n\n* 使用脚本\n```\n脚本使用方法:\n    chextract \u003c密码\u003e \u003c压缩文件目录\u003e [选项]\n\n选项:\n    -c \"\u003c命令\u003e\":  自定义解压命令 格式如下:\n        %1   代指密码\n        %2   代指压缩文件目录\n        例如:\n            -c \"7z x -p%1 %2\" (默认)\n            -c \"unzip -P %1 %2\"\n            \n    -e \u003c编码\u003e:  密码的编码格式\n        例如:\n            -e gbk (为默认值 适用于Windows下的中文密码)\n```\n\n## 使用样例\n* 按照默认配置解压密码为 `新年快乐` 的 `./documents.7z` 压缩包\n```shell\nchextract 新年快乐 ./documents.7z\n```\n\n* 使用 7zz 解压密码为 `新年快乐` 的 `./documents.rar` 压缩包 (macOS上名字叫7zz)\n```shell\nchextract 新年快乐 ./documents.rar -c \"7zz x -p%1 %2\"\n```\n\n* 解压密码为 `新年快乐` 的 `./documents.rar` 压缩包，其密码是 Unicode 编码下的中文\n```shell\nchextract 新年快乐 ./documents.rar -e unicode\n```\n\n* 获取使用帮助\n```shell\nchextract\n```\n\n## 额外说明\n* 有的解压工具是支持非 UTF-8 中文密码解压的，不需要使用该脚本，使用了反而会解压失败。  \n例如 Linux 的 unrar ，或 macOS 下的App [Keka](https://www.keka.io/en/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLjzd-PRO%2FCH-Extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLjzd-PRO%2FCH-Extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLjzd-PRO%2FCH-Extractor/lists"}