paper-dynasty-card-creation/scripts/legacy/rename-cards.py
Cal Corum 0a17745389 Run black and ruff across entire codebase
Standardize formatting with black and apply ruff auto-fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:24:33 -05:00

17 lines
411 B
Python

import asyncio
import os
import sys
async def main(argv):
card_dir = input("What is the full Windows path to the card directory? ")
for x in os.listdir(card_dir):
old_name = f"{card_dir}/{x}"
new_name = f'{card_dir}/{x.split("[")[0].lower().replace("_","-").replace(" ","-")}.png'
os.rename(old_name, new_name)
if __name__ == "__main__":
asyncio.run(main(sys.argv[1:]))