Last active
April 7, 2019 13:06
-
-
Save svandragt/91637e7f11165ab5a0b327ab89c980fd to your computer and use it in GitHub Desktop.
Migrate Apple Notes to EverNote
This file contains 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
use AppleScript version "2.4" -- Yosemite (10.10) or later | |
use scripting additions | |
(* | |
Create a folder in Apple Notes called Exported | |
Create a folder in Evernote called Imported | |
Then for each folder set the variable to the name of the folder | |
Known issues: doesn't copy images, scanned documents and embedded links (it's html). | |
Workaround: select note contents, copy and paste into Evernote. Scanned documents can be exported to PDF and dragged into EverNote. | |
*) | |
set folder_name to "Work" | |
(* | |
Don't change any of the code below | |
*) | |
tell application "Notes" | |
set export_notes to every note in folder folder_name | |
set the noteCount to the count of export_notes | |
display dialog "This script will attempt to export " & noteCount & " note(s)." & ¬ | |
linefeed & linefeed & "This action cannot be undone." buttons ¬ | |
{"Cancel", "Continue"} default button 1 with icon 2 | |
repeat with n in export_notes | |
set the_text to body of n | |
set the_name to name of n | |
set the_date to creation date of n | |
if exists folder "Exported" then | |
move n to folder "Exported" | |
end if | |
tell application "Evernote" | |
set resultNote to ¬ | |
create note with html the_text ¬ | |
notebook ¬ | |
"Imported" title the_name tags ¬ | |
{"from:apple-notes", folder_name} created the_date | |
end tell | |
end repeat | |
display dialog "All notes Exported." buttons {"OK"} default button 1 with icon 1 | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment