移除txt导出格式

This commit is contained in:
Jing Ling
2020-03-03 22:27:20 +08:00
parent 8ba5b4d747
commit 5529737988
5 changed files with 7 additions and 10 deletions
+1 -1
View File
@@ -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行')
+1 -4
View File
@@ -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}')
+1 -1
View File
@@ -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结果目录自动生成路径