Skip to content

Program to download public GitHub repo and store that repo to the local storage.

License

Notifications You must be signed in to change notification settings

patelka2211/GitHub-Repo-Downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub-Repo-Downloader

Input

Run DOWNLOAD_REQUIRED_MODULES.py file to download required modules.

py DOWNLOAD_REQUIRED_MODULES.py

Output

Running GitRep.py

You can see github_linguist folder has been created and github/linguist repository has been downloaded to local storage. And linguist.zip file is there because as specified not to delete inside GitRep.py file.

py GitRep.py
# Example
# Owner/repo
# github/linguist

repo_downloader = GitReD('github', 'linguist')

repo_downloader.download(dest='github_linguist', keep_zip_saved=True)
  • NOTE: You may not be able to find the github_linguist/ folder on this repository. Because I've included that folder into .gitignore file.

Folder structure

root (If specified to make directory.)
| - specified_directory
    | - repo.zip (If specified to keep the zip file saved.)
    | - repository_file1.ext
    | - repository_file2.ext
    | - repository_file3.ext
    •
    •
    •
    | - repository_fileN.ext

root (If not specified to make directory.)
| - repo.zip (If specified to keep the zip file saved.)
| - repository_file1.ext
| - repository_file2.ext
| - repository_file3.ext
•
•
•
| - repository_fileN.ext

Download using shell script

# For example
owner="patelka2211" # The owner name of repo which you want to download.
repo="GitHub-Repo-Downloader" # The repo name.
save_in_folder="True" # If True then repo will be saved in a new folder in cwd, else repo will directly saved in cwd.
save_zip="True" # If True then .zip file of the repo will be saved in cwd, else .zip file of repo will not be saved.

curl "https://raw.githubusercontent.com/patelka2211/GitHub-Repo-Downloader/main/GitReD.py" > "GitReD_temp_installer.py"

py "GitReD_temp_installer.py" $owner $repo $save_in_folder $save_zip &

wait $!

rm "GitReD_temp_installer.py"

About languages

Total used languages Top language
GitHub language count GitHub top language

License

GitHub

© 2022 Kartavya Patel

About

Program to download public GitHub repo and store that repo to the local storage.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published