Using an AppleScript, I have managed to export my Apple Notes to HTML, from which I can make other conversions. However, this removes all the inline links. Is there a way of bulk exporting them while retaining formatting?
RTF seems the obvious way to go here, because that seems to be the format Apple Notes uses under the hood. I have confirmed link formatting is preserved by copy pasting a note into TextEdit, so it’s clearly possible. But I haven’t been able to figure out how to export to RTF using AppleScript. Another way might be by using Shortcuts to go through each note, copy and paste it into TextEdit, and save all the files in a folder somewhere. But I don’t know how to do this.
Does anyone know how to do this, or know another way inline links might be maintained?
This is a duplicate of an Ask Different question. I’ll paste the comments here for easier reading:
1 What is the script doing to export the notes?
2 It’s a slightly modified version of Bear’s export AppleScript bear.app/faq/migrate-from-apple-notes
2 It works perfectly apart from removing link formatting (as well as newlines not working, but I can fix that in another script afterwards).
1 That script gets the body
of the note (kinda crappy HTML content, with just about everything in a division), but it doesn’t look like any of the note properties include links.
2 How do you know the note properties don’t include links, is there Apple documentation on this? (I struggled to find any.) Yes, the problem is that inline links aren’t exported, do you know of any way to do this beyond manually copying each individual note into TextEdit?
1 There is no terminology in the scripting dictionary for links, and the body
(HTML) doesn’t include them, so if it isn’t a bug then they are just not provided. While hunting around I came across a few topics that go back a few years, so it looks like the issue has been around for a while.
2 Is there any way, that you know of, of automating copy paste from one app to another (in this case, Notes to TextEdit or Pages) on Mac?