Commit 0bb4af62 by xiaoqi

脚本

parent f9f3e83f
Showing with 5 additions and 1 deletions
......@@ -32,7 +32,7 @@ def find_files_by_prefixes(directory, prefixes):
if os.path.isfile(filepath): # 确保是文件
# 检查文件名是否以任意一个前缀开头
for prefix in prefix_list:
if filename.startswith(prefix):
if filename.startswith(f"{prefix}-"):
matching_files.append(filepath)
break # 找到匹配后跳出内层循环
......@@ -90,3 +90,7 @@ print(f"入参:p_bitrate={p_bitrate}")
print(f"入参:p_enable_sharpening={p_enable_sharpening}")
print(f"入参:p_enable_denoising={p_enable_denoising}")
print(f"入参:p_enable_color_enhancement={p_enable_color_enhancement}")
for gift_path in find_files_by_prefixes("webp_dir"):
print(f"礼物路径{gift_path}")
for gift_path in find_files_by_prefixes("motoring"):
print(f"座驾路径{gift_path}")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment