script

2 minute read

As part of my migration from my old blogging software to new, I needed a way to snag all of the images. However, the old system stored the images as extension-less numbers, making it tedious to match article slug to image quickly. I pulled down a database extract with photo ID and slug, but needed a way to pull down the images and rename them from /{id} to /{slug}.{proper_extension} accordingly.