This commit is contained in:
dongchangxi committed 2025-07-02 16:58:40 +08:00
1 parent 6117a5f49d
commit 49a3ae397a
7 files changed
+28 -54

No files matched your search

+5 -2
View File
@@ -1,6 +1,9 @@
[account]
appId="1nt7j0w17ecd9duruc48m7050012r5a8"
appSecret="1nt7j0w17ecd9duruc48m70600m2a32r"
#appId="1nt7j0w17ecd9duruc48m7050012r5a8"
#appSecret="1nt7j0w17ecd9duruc48m70600m2a32r"
#shopId="1"
appId="xdezmm02857d9vp1s5j8f3i300r1ige1"
appSecret="xdezmm02857d9vp1s5j8gtd400ml1lwe"
shopId="1"
[oss]
+18 -16
View File
@@ -189,20 +189,22 @@ def main(imagePath = ""):
os.remove(imagePath)
return data,True
def test():
utils.getToken()
if __name__ == "__main__":
#获取请求参数
args = sys.argv[1:]
if len(args) == 0:
#需要二次确认是否要处理images目录下的所有图片
confirmV = input("是否要处理images目录下的所有图片? (y/n)")
if confirmV == "y":
imageFolder()
else:
print("请输入图片路径")
sys.exit(1)
else:
for imagePath in args:
main(imagePath)
print(f"{args}")
test()
# if __name__ == "__main__":
# #获取请求参数
# args = sys.argv[1:]
# if len(args) == 0:
# #需要二次确认是否要处理images目录下的所有图片
# confirmV = input("是否要处理images目录下的所有图片? (y/n)")
# if confirmV == "y":
# imageFolder()
# else:
# print("请输入图片路径")
# sys.exit(1)
# else:
# for imagePath in args:
# main(imagePath)
# print(f"{args}")
-1
View File
@@ -1 +0,0 @@
xdezmm0291gd9x7z89yj3um2709r55mu|1747365162
+3 -1
View File
@@ -5,7 +5,8 @@ def cfg(keyName):
try:
with open('config.toml', 'r') as f:
config = toml.load(f)
print(config)
if "." in keyName:
keyName = keyName.split(".")
return config[keyName[0]][keyName[1]]
@@ -42,6 +43,7 @@ def getToken():
return token.split("|")[0]
#获取token
print(cfg("api.domain"))
url = cfg("api.domain")+cfg("api.getToken")
params = {
"appId":cfg("account.appId"),