matt-dray / ghdump Goto Github PK
View Code? Open in Web Editor NEW:octocat::arrow_down: R package: download/clone all of a user's GitHub repositories for archiving purposes
Home Page: https://www.rostrum.blog/2020/06/14/ghdump/
License: Other
:octocat::arrow_down: R package: download/clone all of a user's GitHub repositories for archiving purposes
Home Page: https://www.rostrum.blog/2020/06/14/ghdump/
License: Other
Unzip all folders? y/n: n
Error in q_download_all %in% deny : object 'q_download_all' not found
The protocol
argument check gets evaluated even when copy_type == "download"
. It shouldn't. The !protocol %in% c("https", "ssh")
in the if
should only evaluate if copy_type == "clone"
passes. So probably change &
to &&
(preferred) or used nested if
s.
> ghdump::ghd_copy("co-analysis", "~/Desktop/co-analysis_copies", copy_type = "download")
Error in if (copy_type == "clone" & !protocol %in% c("https", "ssh")) { :
argument is of length zero
Currently uses purrr::safely()
in ghd_download_zips()
in case a repo can't be download for whatever reason.
The failures are printed at the end of the output from ghd_download()
, which is a poor user experience.
Can we get a see warnings()
equivalent for reviewing the failures? Or at least cat()
the failures.
In addition: Warning message:
In download.file(url = .x, destfile = paste0(dest_dir, "/", .y, :
cannot open URL 'https://codeload.github.com/matt-dray/2019-10-11-test-workshop/zip/master': HTTP status was '404 Not Found'
Just checks for character strings in ghd_download()
right now. Need better coverage of conditions. Intermediate non-exported functions also need handling in case something weird is returned.
How to do this given how gh::gh()
works? And because many of the effects are on files?
e.g. 'main'.
It doesn't.
Suggested fix:
system(
paste0(
"git clone https://github.com/", gh_user, "/", repo, ".git ", dest_dir, "/", repo
)
)
Defaults to HTTPS iirc. Allow for SSH with a simple argument like protocol = c("https, "ssh")
and ifelse some dependent paste statements.
ghd_download()
is only concerned with all repos.
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.