Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,10 @@ import argparse
|
|
5 |
import os
|
6 |
import urllib.request
|
7 |
import json
|
8 |
-
import
|
9 |
|
10 |
-
#
|
11 |
-
|
12 |
-
WFD_DIR = os.path.join(SITE_PACKAGES_DIR, "wfd")
|
13 |
|
14 |
def fix_theme(theme):
|
15 |
try:
|
@@ -57,24 +56,26 @@ def fix_package_file(path):
|
|
57 |
print("{} is fixed!".format(path))
|
58 |
|
59 |
if __name__ == "__main__":
|
60 |
-
print("
|
61 |
-
|
62 |
-
fix_package_file("
|
63 |
-
fix_package_file("webui/templates/
|
64 |
-
fix_package_file("webui/
|
65 |
-
|
66 |
-
fix_local_file("tile_data/platform.
|
67 |
-
fix_local_file("tile_data/
|
68 |
-
fix_local_file("tile_data/
|
69 |
-
fix_local_file("tile_data/
|
70 |
-
fix_local_file("
|
71 |
-
fix_local_file("default/base.chk")
|
72 |
|
73 |
-
fix_theme("KonoSuba: Darkness Light")
|
74 |
|
75 |
-
from wfd.webui import start_demo
|
76 |
class Arguments:
|
77 |
colab = False
|
78 |
link_to_colab = True
|
79 |
args = Arguments()
|
|
|
|
|
|
|
80 |
start_demo(args)
|
|
|
5 |
import os
|
6 |
import urllib.request
|
7 |
import json
|
8 |
+
import importlib
|
9 |
|
10 |
+
# do it properly
|
11 |
+
WFD_DIR = os.path.dirname(importlib.util.find_spec("wfd").origin)
|
|
|
12 |
|
13 |
def fix_theme(theme):
|
14 |
try:
|
|
|
56 |
print("{} is fixed!".format(path))
|
57 |
|
58 |
if __name__ == "__main__":
|
59 |
+
print("WFD_DIR =", WFD_DIR)
|
60 |
+
# fix_package_file("mpqapi/libstorm.so")
|
61 |
+
# fix_package_file("webui/templates/tempura.css")
|
62 |
+
# fix_package_file("webui/templates/background.css")
|
63 |
+
# fix_package_file("webui/doki_settings.json")
|
64 |
+
# fix_local_file("tile_data/platform.cv5.bin")
|
65 |
+
# fix_local_file("tile_data/platform.png")
|
66 |
+
# fix_local_file("tile_data/platform_mapping.npz")
|
67 |
+
# fix_local_file("tile_data/platform_v2.npz")
|
68 |
+
# fix_local_file("tile_data/wfc/platform_32x32.npz")
|
69 |
+
# fix_local_file("default/base.chk")
|
|
|
70 |
|
71 |
+
# fix_theme("KonoSuba: Darkness Light")
|
72 |
|
73 |
+
from wfd.webui import set_theme, start_demo
|
74 |
class Arguments:
|
75 |
colab = False
|
76 |
link_to_colab = True
|
77 |
args = Arguments()
|
78 |
+
|
79 |
+
set_theme("KonoSuba: Darkness Light")
|
80 |
+
|
81 |
start_demo(args)
|