Skip to content

Commit 640ebae

Browse files
committed
✨ 添加新特性:添加 csv 原始样式
1 parent 632d888 commit 640ebae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

small_bug_lab/log_table.py

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ def gen_faker_data():
2929
return datas
3030

3131

32+
def gen_csv_fmt(results):
33+
for item in results:
34+
print(",".join(map(lambda x: str(x), item)))
35+
3236
def raw_log(results, headers):
3337
for per_item in results:
3438
log_item = ""
@@ -55,6 +59,7 @@ def tabulate_log(results, headers):
5559

5660
if __name__ == '__main__':
5761
results = gen_faker_data()
62+
gen_csv_fmt(results)
5863
headers = ["root_path", "url", "priority", "is_once", "switch", "created", "updated"]
5964
raw_log(results, headers)
6065
columnar_log(results, headers)

0 commit comments

Comments
 (0)