Skip to content

Instantly share code, notes, and snippets.

@kairathmann
Created August 16, 2018 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kairathmann/197ac720004f711158eaf2ce48776129 to your computer and use it in GitHub Desktop.
Save kairathmann/197ac720004f711158eaf2ce48776129 to your computer and use it in GitHub Desktop.
This script imports Simplenote notes into Evernote while preserving file creation and modification dates and using the first line of the text as the note title. Download your Simplenote notes as .zip, extract them, run the script, and select the folder with your extracted notes.
set listOfNames to {}
set simplenoteFolder to choose folder "Select the folder with your extracted Simplenote txt files"
tell application "Finder"
set filelist to (every file of the folder simplenoteFolder) as alias list
repeat with currentFile in filelist
set firstLine to (first paragraph of (read currentFile as «class utf8»))
set creationDate to (the creation date of currentFile)
set modificationDate to (the modification date of currentFile)
set folderName to (the name of simplenoteFolder)
tell application "Evernote"
set theItem to create note title firstLine created creationDate notebook folderName from file currentFile
set (modification date of theItem) to modificationDate
end tell
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment