Skip to content

About

Clones the source code of a list of GitHub repositories

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

alparet-github-code-downloader

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.

Setup

  • pip install -r requirements.txt, and git available on the PATH (or set GIT_EXECUTABLE_PATH).
  • Copy .env.example to .env. The token is only needed for private repos (INCLUDE_PRIVATE_REPOS=true).

Usage

python ghcodedownloader.py <github_url_or_file_with_github_urls>

Settings (.env)

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

About

Clones the source code of a list of GitHub repositories

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages