旧SpritePackerの、特定のSpritePackingTagを持つ画像一覧を取得する処理をPythonで書いたのでメモです。
ソースコード
#coding:utf-8 import pathlib import codecs def search_string(root_folder_path, tag_name): folder = pathlib.Path(root_folder_path) file_paths = folder.glob("**/*") tag_name = "spritePackingTag: " + tag_name for file_path in file_paths: if file_path.is_dir(): continue if file_path.name.endswith(".png.meta") or file_path.name.endswith(".jpg.meta"): with codecs.open(file_path, 'r', 'utf-8', 'ignore') as file: if tag_name in file.read(): print(file_path.name.replace(".meta", "")) search_string(r"C:\Path\To\RootFolder", "packing_tag_name")