This commit is contained in:
岛风 2024-06-27 02:11:44 +08:00
parent e9193d2b05
commit ba7821dddc

View File

@ -6,7 +6,7 @@ import time
import yaml
def natural_sort_key(s):
"""为了自然排序的辅助函数将字符串中的数字部分转换成整数"""
"""为了自然排序的辅助函数,将字符串中的数字部分转换成整数"""
return [int(text) if text.isdigit() else text.lower() for text in re.split('([0-9]+)', s)]
def generate_urls(file_paths, base_url, sub_directory, min_size):
@ -55,7 +55,7 @@ def parse_arguments():
return parser.parse_args()
def list_files_recursive(start_path='.', exclude_files=None):
"""递归列出目录及其子目录中的所有文件排除指定的文件"""
"""递归列出目录及其子目录中的所有文件,排除指定的文件"""
if exclude_files is None:
exclude_files = set()
file_paths = []