script for migrating from old post format to new one