Forked from pdxmph/import_notes_app_to_evernote.applescript
Last active
August 26, 2021 03:39
-
-
Save sowenjub/5138539 to your computer and use it in GitHub Desktop.
Updated to import the modification date as well since that's how notes are sorted in Note.app
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
tell application "Notes" | |
set theNotes to every note of the folder "Notes" | |
repeat with thisNote in theNotes | |
set myTitle to the name of thisNote | |
set myText to the body of thisNote | |
set myCreateDate to the creation date of thisNote | |
set myUpdateDate to the modification date of thisNote | |
tell application "Evernote" | |
set theTransferredNote to create note with html myText ¬ | |
title myTitle ¬ | |
created myCreateDate ¬ | |
notebook "Imported Notes" | |
set modification date of theTransferredNote to myUpdateDate | |
end tell | |
end repeat | |
end tell |
I am moving from ios to android, this worked perfectly! Thank you!
Hi guys,
Apologies for the noob question, how do I run the script? I'm pretty sure it's not as simple as downloading the zip file, extracting and running the script via Script Editor as that hasn't done the trick. Came across this tool and it sounds perfect for me to transfer over 800 of my notes to Evernote, but am stuck on how to do it :/
Would be very grateful if someone could kindly offer me some help. Thanks!
Worked perfectly! Thank You so Much!!
If you have more than one account this no longer works. I cobbled together an applescript from the above and some apple resources that allows you to choose the account to import from and then it will import into Evernote.
tell application "Notes"
set thisAccountName to my getNameOfTargetAccount("Choose an account:")
tell account thisAccountName
set theNotes to every note of the folder "Notes"
repeat with thisNote in theNotes
set myTitle to the name of thisNote
log myTitle
set myText to the body of thisNote
set myCreateDate to the creation date of thisNote
set myUpdateDate to the modification date of thisNote
tell application "Evernote"
set theTransferredNote to create note with html myText ¬
title myTitle ¬
created myCreateDate ¬
notebook "Imported Notes"
set modification date of theTransferredNote to myUpdateDate
end tell
log "imported note to evernote"
end repeat
end tell
end tell
on getNameOfTargetAccount(thisPrompt)
tell application "Notes"
if the (count of accounts) is greater than 1 then
set theseAccountNames to the name of every account
set thisAccountName to ¬
(choose from list theseAccountNames with prompt thisPrompt)
if thisAccountName is false then error number -128
set thisAccountName to thisAccountName as string
else
set thisAccountName to the name of account 1
end if
return thisAccountName
end tell
end getNameOfTargetAccount
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excuse my inexperience, but I can't seem to get it to work. Both scripts seem to run fine but they don't seem to find anything located in the "Notes" folder.
Any input would be much appreciated.
Cheers