Clones (or, if already cloned, git pulls) the source code of a list of GitHub repositories into
DATA_FOLDER_PATH\<owner>_<repo>\sourcecode. Part of the ALPARET dataset (see alparet).
It makes no GitHub API calls, so it is not subject to the API rate limits and can run at the same time as
alparet-github-repo-downloader against the same repo list. A repo is treated as
already cloned when its sourcecode folder contains .git, so restarts are cheap. The process exits on its own when done.
pip install -r requirements.txt, andgitavailable on the PATH (or setGIT_EXECUTABLE_PATH).- Copy
.env.exampleto.env. The token is only needed for private repos (INCLUDE_PRIVATE_REPOS=true).
python ghcodedownloader.py <github_url_or_file_with_github_urls>
| Variable | Meaning |
|---|---|
GITHUB_AUTH_TOKEN |
GitHub token (private repos only) |
GIT_EXECUTABLE_PATH |
path of the git executable |
INCLUDE_PRIVATE_REPOS |
also clone/pull private repos |
VERBOSE |
0 none, 1 simple messages, 2 progress bars |
DATA_FOLDER_PATH |
destination folder |