{"id":17109964,"url":"https://github.com/oe/download-git-userscript","last_synced_at":"2025-04-13T02:32:09.479Z","repository":{"id":39757600,"uuid":"296087502","full_name":"oe/download-git-userscript","owner":"oe","description":"download github repo or directory via one-click","archived":false,"fork":false,"pushed_at":"2024-09-27T15:20:34.000Z","size":526,"stargazers_count":28,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T11:14:46.755Z","etag":null,"topics":["download-github","userscript"],"latest_commit_sha":null,"homepage":"https://shrtm.nu/GXUo","language":"TypeScript","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/oe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["oe"],"ko_fi":"esaiya"}},"created_at":"2020-09-16T16:24:20.000Z","updated_at":"2025-03-13T03:55:20.000Z","dependencies_parsed_at":"2024-11-07T18:04:04.176Z","dependency_job_id":"e24e4cf6-9e9f-460e-bc15-4c7b2c1330b9","html_url":"https://github.com/oe/download-git-userscript","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oe%2Fdownload-git-userscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oe%2Fdownload-git-userscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oe%2Fdownload-git-userscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oe%2Fdownload-git-userscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oe","download_url":"https://codeload.github.com/oe/download-git-userscript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657793,"owners_count":21140842,"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":["download-github","userscript"],"created_at":"2024-10-14T16:24:58.888Z","updated_at":"2025-04-13T02:32:09.017Z","avatar_url":"https://github.com/oe.png","language":"TypeScript","readme":"# Download Github Sub-folder User script\n\n[中文说明](#中文说明)\n\n\u003e You can create your own userscript power by webpack/es6/typescript/etc by starting from this [template](https://github.com/oe/webpack-userscript-template)\n\nIf you have any issues with this script, please create an issue on [Github](https://github.com/oe/download-git-userscript/issues)\n\n## Features\n* **download github source code online**: allow you to download whole repo,  a sub-folder of a repo  or a single file online without `git clone` locally\n* **seamless integration**: seamless integrated with Github(click file icon in file list to download), and works great with [octotree](https://github.com/ovity/octotree).\n\n![Download Github screenshot](./screenshot.png)\n\n## Usage\n\n### Install a user script manager\nTo use user scripts you need to first install a user script manager. Which user script manager you can use depends on which browser you use.\n\n  * Chrome: [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) or [Violentmonkey](https://chrome.google.com/webstore/detail/violent-monkey/jinjaccalgkegednnccohejagnlnfdag)\n  * Firefox: [Greasemonkey](https://addons.mozilla.org/firefox/addon/greasemonkey/), [Tampermonkey](https://addons.mozilla.org/firefox/addon/tampermonkey/), or [Violentmonkey](https://addons.mozilla.org/firefox/addon/violentmonkey/)\n  * Safari: [Tampermonkey](http://tampermonkey.net/?browser=safari) or [Userscripts](https://apps.apple.com/app/userscripts/id1463298887)\n  * Microsoft Edge: [Tampermonkey](https://www.microsoft.com/store/p/tampermonkey/9nblggh5162s)\n  * Opera: [Tampermonkey](https://addons.opera.com/extensions/details/tampermonkey-beta/) or [Violentmonkey](https://violentmonkey.github.io/get-it/)\n  * Maxthon: [Violentmonkey](http://extension.maxthon.com/detail/index.php?view_id=1680)\n  * Dolphin: [Tampermonkey](https://play.google.com/store/apps/details?id=net.tampermonkey.dolphin)\n  * UC: [Tampermonkey](https://www.tampermonkey.net/?browser=ucweb\u0026ext=dhdg)\n\n### Install this user script\n\n* [install script via greasyfork](https://greasyfork.org/scripts/411834-download-github-repo-sub-folder/code/Download%20github%20repo%20sub-folder.user.js), [greasyfork home page](https://greasyfork.org/scripts/411834-download-github-repo-sub-folder)\n* [install script via openuserjs](https://openuserjs.org/install/oe/Download_github_repo_online.user.js), [openuserjs home page](https://openuserjs.org/scripts/oe/Download_github_repo_online)\n\n\n### Configure DownGit web app(not required)\nDue to github api requests rate limit, if you use [DownGit](https://downgit.evecalm.com/) frequently, you may failed to download files with it. Then you can click ***Github Auth*** button in the center of [DownGit](https://downgit.evecalm.com/) to auth your account with this app.\n\n\n### Credits\nThis script use [Downgit](https://downgit.evecalm.com/)([sourcecode](https://github.com/oe/DownGit/)) to download github sub-folder. DownGit is forked from [MinhasKamal](https://github.com/MinhasKamal/DownGit), I just added Github Auth feature. Thanks to [MinhasKamal](https://github.com/MinhasKamal/)\n\n\n# 中文说明\n\n无需克隆GitHub仓库, 一键在线下载 Github仓库子文件夹; 同时还能在源码详情页一键复制源码.\n\n\u003e 你也可以使用模版 [template](https://github.com/oe/webpack-userscript-template)使用 webpack/es6/typescript/等技术=来创建你自己的 userscript.\n\n如果你使用中遇到任何问题, 欢迎在[Github](https://github.com/oe/download-git-userscript/issues) 上提交 issue\n## 功能特性\n* **在线下载Github仓库源码**: 你可以在线下载整个仓库、仓库的某个文件夹、单个文件的代码, 无需在机器上使用`git clone`命令下载完整仓库\n* **无缝集成**: 与 GitHub 无缝集成(点击文件列表左侧图标即可直接下载), 看起来就像是原生功能, 与 Github 增强扩展 [octotree](https://github.com/ovity/octotree) 也能无缝配合\n\n\n![Download Github screenshot](./screenshot.png)\n\n在线下载Github仓库的文件夹功能使用开源项目 [DownGit](https://downgit.evecalm.com/)([源码](https://github.com/oe/DownGit/)) 实现. 该项目fork自[MinhasKamal](https://github.com/MinhasKamal/DownGit), 本人增加了GitHub auth授权功能, auth 授权后, downgit则拥有更多的Github API调用频次, 即可以用于下载更多github文件.\n\n\n## 使用说明\n\n### 安装脚本管理器\n\nChrome 用户推荐安装浏览器扩展: [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) \n\n其他选择可参考: [安装一个用户脚本管理器](https://greasyfork.org/zh-CN#home-step-1)\n\n### 安装脚本\n\n[点此来安装脚本](https://greasyfork.org/scripts/411834-download-github-repo-sub-folder/code/Download%20github%20repo%20sub-folder.user.js)\n* [从 greasyfork 安装脚本](https://greasyfork.org/scripts/411834-download-github-repo-sub-folder/code/Download%20github%20repo%20sub-folder.user.js), [greasyfork 主页](https://greasyfork.org/scripts/411834-download-github-repo-sub-folder)\n* [从 openuserjs 安装脚本](https://openuserjs.org/install/oe/Download_github_repo_online.user.js), [openuserjs 主页](https://openuserjs.org/scripts/oe/Download_github_repo_online)\n\n### DownGit 网站配置(非必须)\n因为Github对第三方应用调用API频率有限制, 如果你经常使用[DownGit](https://downgit.evecalm.com/)下载文件, 则可能出现下载失败的情况. \n\n此时就建议你点击网站中间的 ***Github Auth*** 按钮进行 Auth 授权, 这样 DownGit 可以拥有更多api调用次数, 能下载更多的文件. \n\n## develop steps\n\n### change settings of chrome\n\n1. navigate to `chrome://flags/#allow-insecure-localhost`, enable insecure localhost\n2. navigate to `chrome://extensions/?id=dhdgffkkebhmkfjojejmpbldmpobfkfo`(Chrome manage extensions page of `Tampermonkey`) and enable `Allow access to file URLs` (you need to manual reload page when dev userscript, see [#475](https://github.com/Tampermonkey/tampermonkey/issues/475#issuecomment-348594785) for more detail)\n\n### dev\n\n1. `yarn`\n2. `yarn dev`\n3. open \u003chttps://127.0.0.1:8080/download-git-userscript.proxy.user.js\u003e in browser(click  `Advanced` -\u003e `proceed` if it shows a security warning ) to install the proxy script\n4. dev code, reload github.com webpage after userscript changed\n\n\n\n## references\n1. [Tampermonkey docs](https://www.tampermonkey.net/documentation.php)\n","funding_links":["https://github.com/sponsors/oe","https://ko-fi.com/esaiya"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foe%2Fdownload-git-userscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foe%2Fdownload-git-userscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foe%2Fdownload-git-userscript/lists"}