Return to Snippet

Revision: 28906
at July 16, 2010 02:36 by pdxmph


Initial Code
#!/usr/bin/ruby

# Import notes from Mail.app into Evernote
# Setup: 
# 1. Create a mailbox in Mail.app called "Imported Notes"
# 2. Drag all your notes into it
# 3. run this

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

Initial URL

                                

Initial Description

                                

Initial Title
Import Notes from Mail.app Into Evernote

Initial Tags
mac, ruby

Initial Language
Ruby