The Export > Outline option exports the whole document's note titles to a plain text document. The title string used is $DisplayName (or $Name if no Display Expression is set). Attributes controlling export are honoured ($HTMLDontExport, $HTMLExportChildren) allowing non-content notes and containers like prototypes to be excluded from export.
The resulting text file has the (display) title of each exporting note indented one tab stop per outline depth level, actually $OutlineDepth-1 tab stops. Thus root level notes are not indented, their children are indented one tab, etc.