momo707577045 / github-directory-downloader Goto Github PK
View Code? Open in Web Editor NEWgithub 特定文件夹下载工具,解决 github 只能下载整个项目的问题
github 特定文件夹下载工具,解决 github 只能下载整个项目的问题
测试目标:在stpackages项目下单独下载csdid2文件夹及内部的所有文件(和子文件夹)
使用路径:https://github.com/friosavila/stpackages/tree/main/csdid2
下载结果:一个名为“stpackages_main_.zip”的压缩包,里面包括了除csdid2之外的其他文件夹,也就是说并没有只下载特定文件夹。看起来整个项目的文件都在里面。
我尝试用cf给github建立加速,但是加速用的worker是比较通用的js,有个问题是Releases的版本号能看到,但是Assets一直转圈圈,内容没办法加载,能否再该页面增加一个选项,可以选择版本,然后加载出可下载的内容?这时候可以了右键选迅雷加速下载?
另外一个建议是,我测试过做git命令行加速的url前缀加入到你代码中的https://raw前面,是可以加速的,速度很可观,但是由于限制,我建议是下载大文件的时候用,比如Releases
Mo大你开发的这个在线下载工具是不支持下载位于仓库根目录下的单个文件或位于多层子文件夹下的单个文件么??
比如今天我想用这个工具来下载以下两个shell脚本:
https://github.com/SetoSkins/Old_SetoThermal/blob/main/install.sh
https://github.com/SetoSkins/Old_SetoThermal/blob/main/mods/01_8100/files/service.sh
最开始输入想要下载的文件地址后,点击解析,没过几秒,直接弹出“链接不正确,请查看链接是否有效”的报错窗口,将相应问题已录制成动图,将其上传到图床上了,但issue里外图床外链没有自动播放,可能体积过大,只好将外链贴上,如下:
https://ibb.co/8PnW736
随后我考虑可能因为Github在国内网络特殊原因,挂上v2ray,连上节点后,重新下载,这次却显示下载文件发生错误,换了好几个节点测试下载情况,还是显示下载文件发生错误,如上所述,动图体积可能过大,导致无法自动播放,将相应问题的图床外链贴上,如下:
https://ibb.co/DGcvSWh
上述的两种报错情况,都是在排除浏览器兼容性问题的前提下测试,所以不知这个在线下载工具是不支持下载类似“仓库名/blob/main/file”这种链接的单文件么??看之前站友反馈的问题,都是基于类似“仓库名/tree/各分支/file”这种格式的下载链接来反馈😖
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.