added starbound modupdater
parent
97fcc59d4a
commit
97f2069f33
|
@ -4,6 +4,9 @@ Short scripts for everything
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
- Universally
|
||||||
|
- Updater
|
||||||
|
- [starbound_modupdater (python)](./universally/updater/starbound_modupdater/README.md)
|
||||||
- Windows
|
- Windows
|
||||||
- Network
|
- Network
|
||||||
- [ping_logger](./windows/network/ping_logger/index.md)
|
- [ping_logger (cmd)](./windows/network/ping_logger/index.md)
|
|
@ -0,0 +1,18 @@
|
||||||
|
# starbound_modupdater
|
||||||
|
|
||||||
|
|
||||||
|
In the `config.yaml` you only have to change the `account` value and the `mods`. The `mods` only need the mod ids from steam.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
account: STEAMACC
|
||||||
|
game: 211820
|
||||||
|
modsfolder: ./mods/
|
||||||
|
mods:
|
||||||
|
- MOD IDs
|
||||||
|
```
|
||||||
|
|
||||||
|
The script could be adapted to fit other games.
|
||||||
|
|
||||||
|
Files:
|
||||||
|
- [config.yaml](./config.yaml)
|
||||||
|
- [starbound_modupdater.py](./starbound_modupdater.py)
|
|
@ -0,0 +1,6 @@
|
||||||
|
account: STEAMACC
|
||||||
|
game: 211820
|
||||||
|
modsfolder: ./mods/
|
||||||
|
mods:
|
||||||
|
- 729480149
|
||||||
|
- MOD IDs
|
|
@ -0,0 +1,35 @@
|
||||||
|
#/bin/python3.6
|
||||||
|
import json
|
||||||
|
from yaml import load, dump
|
||||||
|
try:
|
||||||
|
from yaml import CLoader as Loader, CDumper as Dumper
|
||||||
|
except ImportError:
|
||||||
|
from yaml import Loader, Dumper
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
f = open("./config.yaml", "r")
|
||||||
|
|
||||||
|
config = load(f, Loader=Loader)
|
||||||
|
|
||||||
|
commandBuilder = ""
|
||||||
|
|
||||||
|
dic = {
|
||||||
|
'assetDirectories':[
|
||||||
|
|
||||||
|
],
|
||||||
|
"storageDirectory" : "../storage/"
|
||||||
|
}
|
||||||
|
|
||||||
|
for mod in config["mods"]:
|
||||||
|
commandBuilder += " +workshop_download_item "+str(config["game"])+" "+str(mod)+" "
|
||||||
|
dic["assetDirectories"].append("../mods/"+str(mod)+"/");
|
||||||
|
|
||||||
|
print(commandBuilder)
|
||||||
|
|
||||||
|
|
||||||
|
with open('data.json', 'w', encoding='utf-8') as f:
|
||||||
|
json.dump(dic, f, ensure_ascii=False, indent=4)
|
Loading…
Reference in New Issue