├── README.md ├── RePKG-GUI.zip └── extract_picture.py /README.md: -------------------------------------------------------------------------------- 1 | # -RePKG-GUI-Python-Wallpaper-Engine- 2 | 3 | ## 功能: 4 | 提取Wallpaper Engine壁纸 5 | ## 使用方法 6 | 1. 使用RePKG-GUI.exe解包Wallpaper Engine壁纸; 7 | 2. 将Python脚本放到解包好的目录下,即RePKG-GUI的输出目录 8 | 3. 运行脚本,输入壁纸图片保存目录 9 | ## 注意 10 | * RePKG-GUI.exe程序的输出目录下不能有其他的文件夹 11 | * 壁纸图片保存目录不能在RePKG-GUI的输出目录下 12 | 13 | 14 | -------------------------------------------------------------------------------- /RePKG-GUI.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XANXUS2/-RePKG-GUI-Python-Wallpaper-Engine-/13c59d787162e258706c7ab0aded374ae6bcd1a8/RePKG-GUI.zip -------------------------------------------------------------------------------- /extract_picture.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | import imghdr 4 | 5 | save_picture_path = input('输入图片保存路径:') 6 | for name in os.listdir(): # 筛选当前目录下的所有文件夹 7 | if os.path.isdir(name): 8 | picture_path = os.path.join(name, 'materials') # 壁纸图片所在目录相对路径 9 | for file_name in os.listdir(picture_path): # materials目录下的文件和文件夹名称 10 | file_path = os.path.join(picture_path, file_name) # materials目录下的文件和文件夹相对路径 11 | if os.path.isfile(file_path): #找出materials目录下的所有文件 12 | if imghdr.what(file_path): # 找出其中的图片文件 13 | shutil.copy(file_path, save_picture_path) # 将图片移动到指定文件夹 14 | --------------------------------------------------------------------------------