Created
October 7, 2015 08:24
-
-
Save wwwjfy/f3255801888a5cf01829 to your computer and use it in GitHub Desktop.
Convert Evernote notes to Notes notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Evernote" | |
set foundNotes to find notes | |
repeat with aNote in foundNotes | |
set enTitle to (the title of aNote) | |
set aHTML to HTML content of aNote | |
if exists (source URL of aNote) then | |
set aHTML to "<p>source url: " & source URL of aNote & "</p>" & aHTML | |
end if | |
set folderName to (name of notebook of aNote) | |
tell application "Notes" | |
tell account [0] | |
if not (exists folder folderName) then | |
make new folder with properties {name:folderName} | |
end if | |
if not (exists note enTitle in folder folderName) then | |
make new note at folder folderName with properties {name:enTitle, body:aHTML} | |
end if | |
end tell | |
end tell | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment