Github Release Fetcher is a Python script that retrieves a list of files/assets for a given GitHub repository release and optionally downloads them.
If a specific release is not provided, the script defaults to the latest release.
It supports filtering files using --include
and --exclude
, resuming interrupted downloads, and verifies downloaded file sizes by comparing with the release manifest as a simple sanity check.
- Fetch Release Assets: Retrieve a list of files/assets for a GitHub repository release.
- Download Files: Optionally download the files to a specified directory.
- Filter Files: Use
--include
to download only specific files or--exclude
to skip certain files. - Resume Downloads: Supports resuming interrupted downloads.
- File Size Verification: Compares downloaded file sizes with the release manifest to help ensure integrity.
- Human-Readable Output: Displays file sizes in a human-readable format (e.g., KB, MB, GB).
-
Prerequisites:
- Python 3.x
urllib
andargparse
(included in Python's standard library)
-
Download the Script:
- Clone this repository or download the
grf.py
script.
- Clone this repository or download the
-
Make the Script Executable (Optional):
chmod +x grf.py
python3 grf.py https://github.com/owner/repo
python3 grf.py https://github.com/owner/repo --download
python3 grf.py https://github.com/owner/repo --release nightly
, or https://github.com/owner/repo/releases/tag/nightly
python3 grf.py https://github.com/owner/repo --download --output /path/to/directory
python3 grf.py https://github.com/owner/repo --download --include file1.zip file2.zip
python3 grf.py https://github.com/owner/repo --download --exclude file1.zip file2.zip
python3 grf.py --version
This project is licensed under the MIT License. See the LICENSE
file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
If you encounter any issues or have questions, feel free to open an issue on the GitHub repository.
This project is still experimental, so reliability cannot be guaranteed, especially in production environments. Proceed at your own risk! It works great for me... but YMMV - proceed at own risk.
Did this make you happy? I'd love to do more development like this! Please donate to show your support :)
BTC: 1Q4QkBn2Rx4hxFBgHEwRJXYHJjtfusnYfy
XMR: 4AfeGxGR4JqDxwVGWPTZHtX5QnQ3dTzwzMWLBFvysa6FTpTbz8Juqs25XuysVfowQoSYGdMESqnvrEQ969nR9Q7mEgpA5Zm