This script takes an OPML file exported from OmniOutliner and turns it into a markdown file with the specified depth of headings. Use the share sheet in OmniOutliner to copy the OPML file to Drafts, then run the action.
Lines with a depth greater than the maximum heading depth are converted to markdown lists with the appropriate level of indentation.
Currently does not support notes. Pull requests welcome.