Improve structure in main.py, create requirements.txt and update README.

This commit is contained in:
Vxrtrauter
2025-10-12 04:03:45 +02:00
parent 5c58d5c6ac
commit f67190296f
3 changed files with 78 additions and 28 deletions
+28 -5
View File
@@ -1,10 +1,33 @@
# Serverpack-Downloader
CLI Downloader to download server packs from curseforge
CLI Downloader to download server packs from CurseForge
# IMPORTANT
add your own api key to the .env file
Add your own CurseForge API-Key to an .env file
```bash
CURSEFORGE_API_KEY=YOUR_API_KEY
```
You can get your own through https://console.curseforge.com/
# Dependencies
dotenv python library \
inquirer python library \
requests python library
```bash
python-dotenv
inquirer
requests
```
Install with `pip install -r requirements.txt`
# Notes
If you get the following error, the Modpack you're trying to download most likely doesn't have a serverpack.
```bash
Traceback (most recent call last):
File "Serverpack-Downloader\main.py", line 90, in <module>
download_modpack(selected_modpack_name, selected_modpack_id)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Serverpack-Downloader\main.py", line 64, in download_modpack
server_file_id = file['serverPackFileId']
```