Commit 6ddc0391 by sikang

test

parent e0717323
...@@ -8,7 +8,6 @@ import json ...@@ -8,7 +8,6 @@ import json
class LayoutGarble: class LayoutGarble:
__used_names = [] __used_names = []
__layout_model = [] __layout_model = []
__config = {}
__colors = [] __colors = []
def __gen_rand_str(self): def __gen_rand_str(self):
...@@ -83,7 +82,6 @@ class LayoutGarble: ...@@ -83,7 +82,6 @@ class LayoutGarble:
def layout_garble(self, config): def layout_garble(self, config):
self.__config = config
with open("tools/garble/model/layout_model.xml", "r", encoding="utf-8") as fin: with open("tools/garble/model/layout_model.xml", "r", encoding="utf-8") as fin:
self.__layout_model = fin.read().split("@code\n") self.__layout_model = fin.read().split("@code\n")
...@@ -94,7 +92,7 @@ class LayoutGarble: ...@@ -94,7 +92,7 @@ class LayoutGarble:
for main_dir in config['lib_main']: for main_dir in config['lib_main']:
for root, dirs, files in os.walk("%s/%s" % (config["root"], main_dir)): for root, dirs, files in os.walk("%s/%s" % (config["root"], main_dir)):
if root.endswith("res/layout"): if root.endswith("res/layout"):
self.__create_layout(os.path.join( path = os.path.join(root, "%s.xml" % self.__gen_rand_str())
root, "%s.xml" % self.__gen_rand_str())) self.__create_layout(path)
print("done") print("done")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment