Migrating data to a mediawiki format

I’d like to be able to move certain projects into a mediawiki. I’m willing to lose formatting in notes, but I’d like for nested action groups to be preserved, and for notes to be exported as either a single block of text (even if there are carriage returns in the note), or possibly having notes be one (or more, if there are carriage returns) nested level, e.g.:

== Action ==
=== Note of action ===

Curious if anyone has tackled this sort of thing. Seems like it would involve quite a bit of transformations.