I just made my own thing here, although now I need to still translate this into a form the Discourse API can handle.
https://github.com/osmo-support-lab/discourse-migration