Giter VIP home page Giter VIP logo

github-directory-downloader's Introduction

工具在线地址,推荐使用 chrome 浏览器。

使用方式

  • 打开想要下载的 github 文件夹,如 facebook 的 react-dom 文件夹,则打开该页面。
  • 复制页面链接,粘贴到本工具输入框。
  • 点击下载。

背景

  • github 不支持部分文件下载,只能下载整个项目。
  • github 国内网速较慢,只能下载整个项目需要等待很长时间。譬如 facebook 的 react 项目,有时候我们只想下载 react-dom 来学习。但却要下载包含 react-js 等 35 各其他功能的整个项目。导致无谓的时间浪费。
  • 网络上有相关解决方案,譬如修改 svn,修改 git 路径等,但均有一定使用成本和软件依赖。本项目意在将使用成本降到最低。

特点

  • 无依赖,无需安装软件,不需要依赖 svn,甚至连 git 都不需要。有浏览器即可使用。
  • 操作简单,复制 github 页面链接,点击下载即可。
  • 支持特定分支和特定 tag 的文件下载,精确到单文件下载。

功能说明

  • 【解析下载】输入 github 链接,点击下载文件。
  • 【重新下载错误文件】当部分文件下载失败时,点击该按钮,重新下载错误文件。
  • 【强制下载现有文件】将已经下载好的文件强制整合下载。可以提前观看已经下载的文件。该操作不影响当前下载进程。
  • 【文件条】对应每一个文件的下载情况。「灰色」:待下载,「绿色」:下载成功,「红色」:下载失败。点击红色文件栏可重新下载对应错误文件。

特别说明

  • 项目使用到 github 提供的开放性 API,故仅支持 github 文件下载。不支持 gitlab,gitee 等平台。
  • 目标仓库需为公开仓库,否则无权限下载。

原理

  • 文件下载使用的是 github 开放 API,如「罗列所有分支」「罗列所有tag」「下载文件」等
  • 文件压缩,使用的是 jszip 库
  • 项目只是简单的功能组合,都比较简单。
  • 代码没有做优化,理解思路,看看就好。

github-directory-downloader's People

Contributors

momo707577045 avatar super-crayfish 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.