This commit is contained in:
yumoqing 2025-10-23 17:53:54 +08:00
parent aad40a3336
commit c0e1036f6d
2 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
[metadata]
name=xls2ddl
version = 1.0.2
version = 1.0.3
description = a xlsx file to database ddl converter
author = "yu moqing"
author_email = "yumoqing@gmail.com"

View File

@ -109,31 +109,31 @@ return []
def gen_tree_ui(d, pat):
e = MyTemplateEngine([])
s = e.renders(ui_tmpl, d)
with open(os.path.join(pat, f'index.ui'), 'w') as f:
with codecs.open(os.path.join(pat, f'index.ui'), 'w', "utf-8") as f:
f.write(filter_backslash(s))
def gen_delete_nodedata(d, pat):
e = MyTemplateEngine([])
s = e.renders(data_delete_tmpl, d)
with open(os.path.join(pat, f'delete_{d.tblname}.dspy'), 'w') as f:
with codecs.open(os.path.join(pat, f'delete_{d.tblname}.dspy'), 'w', "utf-8") as f:
f.write(filter_backslash(s))
def gen_update_nodedata(d, pat):
e = MyTemplateEngine([])
s = e.renders(data_update_tmpl, d)
with open(os.path.join(pat, f'update_{d.tblname}.dspy'), 'w') as f:
with codecs.open(os.path.join(pat, f'update_{d.tblname}.dspy'), 'w', "utf-8") as f:
f.write(filter_backslash(s))
def gen_new_nodedata(d, pat):
e = MyTemplateEngine([])
s = e.renders(data_new_tmpl, d)
with open(os.path.join(pat, f'new_{d.tblname}.dspy'), 'w') as f:
with codecs.open(os.path.join(pat, f'new_{d.tblname}.dspy'), 'w', "utf-8") as f:
f.write(filter_backslash(s))
def gen_get_nodedata(d, pat):
e = MyTemplateEngine([])
s = e.renders(get_nodes_tmpl, d)
with open(os.path.join(pat, f'get_{d.tblname}.dspy'), 'w') as f:
with codecs.open(os.path.join(pat, f'get_{d.tblname}.dspy'), 'w', "utf-8") as f:
f.write(filter_backslash(s))
def build_tree_ui(tree_data, dbdesc):