mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 12:57:50 +08:00
移除txt导出格式
This commit is contained in:
@@ -185,7 +185,7 @@ def check_format(format, count):
|
||||
:param count: 数量
|
||||
:return: 导出格式
|
||||
"""
|
||||
formats = ['txt', 'rst', 'csv', 'tsv', 'json', 'yaml', 'html',
|
||||
formats = ['rst', 'csv', 'tsv', 'json', 'yaml', 'html',
|
||||
'jira', 'xls', 'xlsx', 'dbf', 'latex', 'ods']
|
||||
if format == 'xls' and count > 65000:
|
||||
logger.log('ALERT', 'xls文件限制为最多65000行')
|
||||
|
||||
@@ -42,10 +42,7 @@ def export(table, db=None, valid=False, path=None, format='csv', show=False):
|
||||
path = utils.check_path(path, table, format)
|
||||
if show:
|
||||
print(rows.dataset)
|
||||
if format == 'txt':
|
||||
data = str(rows.dataset)
|
||||
else:
|
||||
data = rows.export(format)
|
||||
data = rows.export(format)
|
||||
database.close()
|
||||
utils.save_data(path, data)
|
||||
logger.log('INFOR', f'{table}主域的子域结果 {path}')
|
||||
|
||||
@@ -63,7 +63,7 @@ class OneForAll(object):
|
||||
Note:
|
||||
# 参数valid可选值True,False分别表示导出有效,全部子域结果
|
||||
参数port可选值有'default', 'small', 'large', 详见config.py配置
|
||||
参数format可选格式有'txt', 'rst', 'csv', 'tsv', 'json', 'yaml', 'html',
|
||||
参数format可选格式有'rst', 'csv', 'tsv', 'json', 'yaml', 'html',
|
||||
'jira', 'xls', 'xlsx', 'dbf', 'latex', 'ods'
|
||||
参数path默认None使用OneForAll结果目录自动生成路径
|
||||
|
||||
|
||||
Reference in New Issue
Block a user