Skip to content

Instantly share code, notes, and snippets.

@pdxmph
Created November 29, 2011 17:04
Show Gist options
  • Save pdxmph/1405542 to your computer and use it in GitHub Desktop.
Save pdxmph/1405542 to your computer and use it in GitHub Desktop.
Convert Mac Mail Notes to Evernote
#!/usr/bin/env ruby
require 'rubygems'
require 'appscript'
include Appscript
en = app("Evernote")
mail = app("Mail")
notes_folder = mail.mailboxes["Imported Notes"]
messages = notes_folder.messages.get
messages.each do |m|
en.create_note(:title => m.subject.get,
:notebook => "Imported Notes",
:with_text => m.content.get,
:tags => "imported_note",
:created => m.date_sent.get
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment