I have tested this Notes export script (https://github.com/alexwlchan/notes-export/blob/master/notes-export.scpt). It seems to work, but the issue is that I want to specify a specific Notes folder to export, rather than every single one.
The issue is the main loop clause:
repeat with theNote in notes
"notes" is a Notes field that is a collection of all notes. However, I only want notes in a specific Notes directory. I have no problem specifying the Notes folder by name and having the script confirm that the folder actually exists. Unfortunately, I don't see this documented anywhere.
How do I, in AppleScript, get the list of notes in a specific Note folder? I also need to get the notes's path, since in some cases the Notes directories I am exporting in turn have sub-directories.