wdcqc commited on
Commit
cea9c8b
1 Parent(s): d40ed38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -4,6 +4,16 @@
4
  import argparse
5
  import os
6
  import urllib.request
 
 
 
 
 
 
 
 
 
 
7
 
8
  def fix_local_file(path):
9
  # probably should include the tile files in the package. let's get it running first.
@@ -49,6 +59,8 @@ if __name__ == "__main__":
49
  fix_local_file("tile_data/platform_v2.npz")
50
  fix_local_file("tile_data/wfc/platform_32x32.npz")
51
  fix_local_file("default/base.chk")
 
 
52
 
53
  from wfd.webui import start_demo
54
  class Arguments:
 
4
  import argparse
5
  import os
6
  import urllib.request
7
+ import json
8
+
9
+ def fix_theme(theme):
10
+ with open("/home/user/.local/lib/python3.8/site-packages/wfd/webui/doki_settings.json", encoding = "utf-8") as fp:
11
+ doki = json.load(fp)
12
+
13
+ doki["theme"] = theme
14
+
15
+ with open("/home/user/.local/lib/python3.8/site-packages/wfd/webui/doki_settings.json", "w", encoding = "utf-8") as fp:
16
+ json.dump(doki, fp)
17
 
18
  def fix_local_file(path):
19
  # probably should include the tile files in the package. let's get it running first.
 
59
  fix_local_file("tile_data/platform_v2.npz")
60
  fix_local_file("tile_data/wfc/platform_32x32.npz")
61
  fix_local_file("default/base.chk")
62
+
63
+ fix_theme("KonoSuba: Darkness Light")
64
 
65
  from wfd.webui import start_demo
66
  class Arguments: