Standardize formatting with black and apply ruff auto-fixes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
411 B
Python
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:]))
|