Skip to content

Instantly share code, notes, and snippets.

@activescott
Created July 1, 2016 01:02
Show Gist options
  • Save activescott/bffe5e1850a52768b2c2d34fe40b568b to your computer and use it in GitHub Desktop.
Save activescott/bffe5e1850a52768b2c2d34fe40b568b to your computer and use it in GitHub Desktop.
Export All Evernote Notebooks
exportEvernote()
on exportEvernote()
set outputDir to (do shell script "echo ~/Downloads/")
set theDate to current date
set timeStamp to (do shell script "date +'%y-%m-%d-%T'")
tell application "Evernote"
repeat with eachNotebook in every notebook of application "Evernote"
set notebookName to name of eachNotebook
set targetFile to outputDir & "evernote-backup_" & timeStamp & "_" & notebookName & ".enex"
set theNotes to every note in eachNotebook
log "Exporting " & notebookName & " to " & targetFile
--NOTE: You must use Evernote downloaded from evernote's website. The App Store version won't work with the export command.
export theNotes to targetFile
end repeat
end tell
display dialog "All notebooks exported to " & outputDir
end exportEvernote
@activescott
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment