bugfix
This commit is contained in:
parent
01dcaea0ab
commit
b5ba4af518
5
pyproject.toml
Normal file
5
pyproject.toml
Normal file
@ -0,0 +1,5 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=61", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
|
||||
20
setup.cfg
Normal file
20
setup.cfg
Normal file
@ -0,0 +1,20 @@
|
||||
[metadata]
|
||||
name=xls2ddl
|
||||
version = 1.0.1
|
||||
description = a xlsx file to database ddl converter
|
||||
author = "yu moqing"
|
||||
author_email = "yumoqing@gmail.com"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
|
||||
[options]
|
||||
packages = find:
|
||||
requires_python = ">=3.8"
|
||||
install_requires =
|
||||
apppublic
|
||||
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
xls2ddl = xls2ddl.xls2ddl:main
|
||||
xls2ui = xls2ddl.xls2ui:main
|
||||
|
||||
0
xls2ddl/__init__.py
Normal file
0
xls2ddl/__init__.py
Normal file
@ -3,12 +3,22 @@ import sys
|
||||
import codecs
|
||||
import json
|
||||
from appPublic.dictObject import DictObject
|
||||
from xlsxData import xlsxFactory
|
||||
from appPublic.folderUtils import listFile, _mkdir
|
||||
from appPublic.myTE import MyTemplateEngine
|
||||
from tmpls import data_browser_tmpl, get_data_tmpl, data_new_tmpl, data_update_tmpl, data_delete_tmpl
|
||||
from xls2crud import build_dbdesc, field_list, subtable2toolbar, filter_backslash
|
||||
from tmpls import data_new_tmpl, data_update_tmpl, data_delete_tmpl
|
||||
from xls2ddl.xls2crud import (
|
||||
build_dbdesc,
|
||||
field_list,
|
||||
subtable2toolbar,
|
||||
filter_backslash
|
||||
)
|
||||
from xls2ddl.xlsxData import xlsxFactory
|
||||
from xls2ddl.tmpls import (
|
||||
data_browser_tmpl,
|
||||
get_data_tmpl,
|
||||
data_new_tmpl,
|
||||
data_update_tmpl,
|
||||
data_delete_tmpl
|
||||
)
|
||||
|
||||
ui_tmpl = """
|
||||
{
|
||||
@ -5,11 +5,18 @@ import json
|
||||
import argparse
|
||||
|
||||
from appPublic.dictObject import DictObject
|
||||
from xlsxData import xlsxFactory
|
||||
from appPublic.folderUtils import listFile, _mkdir
|
||||
from appPublic.myTE import MyTemplateEngine
|
||||
from tmpls import data_browser_tmpl, get_data_tmpl, data_new_tmpl, data_update_tmpl, data_delete_tmpl, check_changed_tmpls
|
||||
from appPublic.argsConvert import ArgsConvert
|
||||
from xlsxData import xlsxFactory
|
||||
from xls2ddl.tmpls import (
|
||||
data_browser_tmpl,
|
||||
get_data_tmpl,
|
||||
data_new_tmpl,
|
||||
data_update_tmpl,
|
||||
data_delete_tmpl,
|
||||
check_changed_tmpls
|
||||
)
|
||||
|
||||
"""
|
||||
usage:
|
||||
@ -1,4 +1,5 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
import sys
|
||||
import io
|
||||
import sys
|
||||
from traceback import print_exc
|
||||
@ -76,8 +77,7 @@ def model2ddl(folder,dbtype):
|
||||
print_exc()
|
||||
return ddl_str
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
def main():
|
||||
##解决windows 终端中输出中文出现
|
||||
# UnicodeEncodeError: 'gbk' codec can't encode character '\xa0' in position 20249
|
||||
# 错误
|
||||
@ -92,3 +92,6 @@ if __name__ == '__main__':
|
||||
s = model2ddl(sys.argv[2], sys.argv[1])
|
||||
print(s)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@ -7,9 +7,9 @@ import sys
|
||||
import argparse
|
||||
from appPublic.argsConvert import ArgsConvert
|
||||
from appPublic.dictObject import DictObject
|
||||
from xls2crud import build_dbdesc, build_crud_ui
|
||||
from singletree import build_tree_ui
|
||||
if __name__ == '__main__':
|
||||
from xls2ddl.xls2crud import build_dbdesc, build_crud_ui
|
||||
from xls2ddl.singletree import build_tree_ui
|
||||
def main():
|
||||
"""
|
||||
crud_json has following format
|
||||
{
|
||||
@ -49,3 +49,5 @@ if __name__ == '__main__':
|
||||
build_tree_ui(crud_data, db)
|
||||
continue
|
||||
build_crud_ui(crud_data, db)
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Loading…
x
Reference in New Issue
Block a user