- Python 3.x
- Git
- Required Python libraries:
requests
,tqdm
- Install them using
pip install requests tqdm
- Install them using
Before running the script, ensure your desired folder structure is set up. Here's an example structure:
mathematica
ArchiveFolder/
├── RepositoryName1/
│ ├── Wiki/
│ ├── Release-Tag1/
│ ├── Prerelease-Tag1/
│ ├── README.md
│ └── description.txt
└── RepositoryName2/
├── Wiki/
├── Release-Tag2/
├── Prerelease-Tag2/
├── README.md
└── description.txt
-
Clone or download this script to your local machine.
-
Open the script in a text editor.
-
Set the
base_folder
path in themain()
function to your desired archive location.python
base_folder = "C:\\Path\\To\\Your\\ArchiveFolder\\"
-
If you need to use a GitHub token for private repositories or higher rate limits, set the
github_token
variable.python
github_token = "your_github_token_here"
-
To run the script, open a terminal or command prompt.
-
Navigate to the script's directory.
-
Run the script using Python:
bash
python script_name.py
-
If
use_text_file
is set toTrue
in the script:- Create a
urls.txt
file in the same directory as the script. - Add GitHub repository URLs you want to archive, each on a new line.
- Create a
-
If
use_text_file
is set toFalse
:- You will be prompted to enter the GitHub repository URL directly in the terminal.
The script will clone the repositories, download wikis (if available), fetch release/prerelease assets, and organize them into the specified archive folder.