增加Makefile
This commit is contained in:
4
main.py
4
main.py
@@ -1,4 +1,5 @@
|
||||
import math
|
||||
import os.path
|
||||
import sys
|
||||
import tomli
|
||||
from loguru import logger
|
||||
@@ -27,6 +28,9 @@ def egm():
|
||||
toml_file_path = r"article.toml"
|
||||
else:
|
||||
toml_file_path = sys.argv[1]
|
||||
if not os.path.exists(toml_file_path):
|
||||
logger.info(f'无法找到数据文件{toml_file_path},程序退出。')
|
||||
sys.exit(0)
|
||||
logger.info(f"读取文件{toml_file_path}")
|
||||
with open(toml_file_path, "rb") as toml_fs:
|
||||
toml_dict = tomli.load(toml_fs)
|
||||
|
||||
Reference in New Issue
Block a user