StardewModLauncher/app/webview_api/WebviewApi.py

14 lines
331 B
Python

import os
class WebviewApi():
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