My buddy Mikhail wanted to download all of his GitHub repositories for safekeeping. I wrote this script for him to do that.
Copy the archivist.py
file to your computer.
Create a virtual environment and activate it.
python3 -m venv .venv
.venv/bin/activate
Install the dependencies. It's just one.
pip install httpx
Create an OAuth access token for GitHub.
Change directory to where you want to put your archives. Call the script from there, passing in the access token.
python3 archivist.py <GITHUB-ACCESS-TOKEN>