Plugin to help mapping pre-migration threads after migration

Did your script create import_ids? If so, even if your didn’t create the permalinks, you can fairly quickly process those to create them.