|
|
|
|
|
|
|
import argparse |
|
import os |
|
import urllib.request |
|
import json |
|
import importlib |
|
|
|
|
|
WFD_DIR = os.path.dirname(importlib.util.find_spec("wfd").origin) |
|
|
|
def set_theme(theme): |
|
settings_file = os.path.join(WFD_DIR, "webui", "doki_settings.json") |
|
try: |
|
with open(settings_file, encoding = "utf-8") as fp: |
|
doki = json.load(fp) |
|
|
|
doki["theme"] = theme |
|
|
|
with open(settings_file, "w", encoding = "utf-8") as fp: |
|
json.dump(doki, fp) |
|
except Exception as e: |
|
print(e) |
|
|
|
if __name__ == "__main__": |
|
print("WFD_DIR =", WFD_DIR) |
|
|
|
from wfd.webui import start_demo |
|
class Arguments: |
|
colab = False |
|
link_to_colab = True |
|
args = Arguments() |
|
|
|
set_theme("KonoSuba: Darkness Light") |
|
|
|
start_demo(args) |
|
|