Created
October 20, 2015 08:10
-
-
Save serayuzgur/dd42c4b2cc67abab5b31 to your computer and use it in GitHub Desktop.
Exports from Evernote imports to Apple Notes iCloud Account.
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 _Notebooks to every notebook | |
repeat with _NoteBook in _Notebooks | |
set _NoteBookName to name of _NoteBook | |
set _Notes to every note of _NoteBook | |
repeat with _Note in _Notes | |
set _NoteTitle to (title of _Note) | |
set _NoteText to (HTML content of _Note) | |
set _NoteCDate to the creation date of _Note | |
set _NoteMDate to the modification date of _Note | |
tell application "Notes" | |
tell account "iCloud" | |
if not (exists folder _NoteBookName) then | |
make new folder with properties {name:_NoteBookName} | |
end if | |
end tell | |
set theNoteID to make new note in folder _NoteBookName with properties {name:_NoteTitle, body:_NoteText, creation date:_NoteCDate, modification date:_NoteMDate} | |
end tell | |
end repeat | |
end repeat | |
end tell |
It is a little bit late :) but glad to hear it worked (mostly).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is fantastic and it works for me (mostly). I had to wrap the
set theNoteID
statement in an if statement. Like this:Otherwise, the import fails when it finds a deleted note. But, once I did that, I was able to import my notes all the way back from 2007.