OK, you can do this with a single new export template; no difference for v8 vs v9 here. By default a note exported using ‘HTML’ (i.e. formatted/structured text) export uses the note $Name as the export filename. Letter case is retained but spaces, quotes, parentheses, etc. may be removed.
For the $Text, you use
^value($Text)^ which ensures no HTML gets added. For the other attributes you similarly use value. In some cases like lists/sets or date type attributes you may want to reformat the actual value.
Let’s assume we want each note to export a Number (with 2 decimal places shown), a string, unchanged, a date in you locale’s short format ( e.g. for me in UK that’s 13/07/21) using format code ‘l’ (lowercase L), and a list of $Tags values as a comma delimited list. Plus, we’ll put the attribute’s name and a colon+space before the attribute values and leave a blank line between the attributes and the text. That layout, as a template, looks like this;
Tags: ^value($Tags.format(", "))^
So, the code above is now the code we’ll paste into than export template we’ll call “text page export”).
We now have a template, and you can test how it looks by setting the template for one of your notes, showing the text pane preview selector, and selecting ‘Export’. Don’t use ‘Preview’ as we’re exporting plain text and the ‘Export’ pane will give us a cleaner view as it doesn’t try and prettify the styling of the text. Amend you template is needs be.
If unsure of how the default naming works, either use the above note or select one one whose name you think might not work well (set the template if needs be) and use menu File ▸ Export Selected Note and look to see the suggested export filename. Don’t worry about the file extension we’ll fix that in a moment.
The filename, if not calculated on the fly is stored as $HTMLExportFileName. That filename’s extension (including the period, e.g. ‘.html’ or ‘.txt’ is set via $HTMLExportExtension. The export template used for a note is stored in $HTMLExportTemplate.
You could set the template and export extension for the to-be-exported notes via:
- an agent action
- a prototype (or prototype(s) used via the to-be-exported notes.
- As a document default for those attributes. I think this is not idea - use one of the above!