https://github.com/blackvoidx/gitdirdownload
This tool allows you to download a specific file or directory and its contents from a GitHub repository.
https://github.com/blackvoidx/gitdirdownload
Last synced: 4 months ago
JSON representation
This tool allows you to download a specific file or directory and its contents from a GitHub repository.
- Host: GitHub
- URL: https://github.com/blackvoidx/gitdirdownload
- Owner: blackvoidx
- License: mit
- Created: 2024-07-19T11:56:31.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-16T13:36:16.000Z (over 1 year ago)
- Last Synced: 2025-02-16T17:50:39.056Z (over 1 year ago)
- Language: Python
- Size: 32.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Content Downloader
[](https://www.python.org/downloads/)
[](https://github.com/blackvoidx/github-follow-insights/issues)
[](https://github.com/blackvoidx/github-follow-insights/stargazers)
[](https://github.com/blackvoidx/github-follow-insights/blob/master/LICENSE)
This tool allows you to download a specific file or directory and its contents from a GitHub repository.

## Features
- Downloads files concurrently for faster performance.
- Maintains the original directory structure.
- Logs each downloaded file in the terminal.
## Notes
- Ensure you have a stable internet connection.
- The download speed depends on your internet connection and the number of threads used.
- Be aware of GitHub's API rate limits. This Script is efficient for repositories up to 100,000 files in the requested directory and its subdirectories.
- Keep your access token secure and never share it publicly.
## Requirements
- Python 3.6 or higher
- Required Python packages: requests
- Github Access Token [Read](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
## Installation
1. Clone this repository:
`git clone https://github.com/blackvoidx/GitDirDownload.git`
2. Run the install script:
```
chmod +x install.sh
./install.sh
```
This script will:
- Check for Docker and Python availability
- Create a 'downloads' folder if it doesn't exist
- Set correct permissions for the 'downloads' folder
- Ask you to choose between Docker and local Python setup (if both are available)
- Set up the environment based on your choice or availability
## Usage
After installation, run the application using the method you chose during setup:
### With Docker:
`docker run -it --rm -v "$(pwd)/downloads:/app/downloads" gitdirdownload`
### With local Python:
`python3 github-download.py`
Follow the prompts to download GitHub content. Downloaded files will be saved in the 'downloads' folder.
You will be prompted to enter the following information:
- Repository Url: The Url of the repository.
- GitHub access token: Your personal access token for authentication.
- Number of download threads: How many concurrent downloads to perform (default is 20).