From a4894d612a36c58f5ce9aadb884773f07c9f0837 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Wed, 17 Mar 2021 21:47:41 +0100 Subject: [PATCH] Inital commit --- .gitignore | 7 +++++++ README.md | 5 +++++ app/main.py | 22 ++++++++++++++++++++++ assets/index.html | 48 +++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 + 5 files changed, 83 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 app/main.py create mode 100644 assets/index.html create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..71e2f83 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.idea/ +.vscode/ + +__pycache__ +*.py[cod] + +venv/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..a60aef1 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Stardew Valley Mod Launcher + +This is the attempt to create a usable mod manager for Stardew Valley, including +downloading and installing mods, automatic updates, and syncing mods between +multiple devices. diff --git a/app/main.py b/app/main.py new file mode 100644 index 0000000..d7e29fa --- /dev/null +++ b/app/main.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 + +import os +import webview + + +class Api(): + def hello(self): + print('Received hello()!') + print('Returning "meow"!') + return "meow" + + def list_mods(self): + sdv_root_dir = "/data/Games/SteamLibrary/steamapps/common/Stardew Valley" + mod_list = os.listdir(sdv_root_dir + "/Mods") + return mod_list + + +if __name__ == '__main__': + api = Api() + webview.create_window('Stardew Mod Launcher v0.0.1', '../assets/index.html', js_api=api, min_size=(600,400)) + webview.start(debug=True) diff --git a/assets/index.html b/assets/index.html new file mode 100644 index 0000000..57fd4cf --- /dev/null +++ b/assets/index.html @@ -0,0 +1,48 @@ + + + + + Stardew Mod Launcher + + + + +

Hallo :)

+ + + + +

Mod list

+ + + + + + + + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..33f0379 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +pywebview