Import Notes from Mail.app Into Evernote


/ Published in: Ruby
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/usr/bin/ruby
  2.  
  3. # Import notes from Mail.app into Evernote
  4. # Setup:
  5. # 1. Create a mailbox in Mail.app called "Imported Notes"
  6. # 2. Drag all your notes into it
  7. # 3. run this
  8.  
  9. require 'rubygems'
  10. require 'appscript'
  11. include Appscript
  12.  
  13. en = app("Evernote")
  14. mail = app("Mail")
  15.  
  16. notes_folder = mail.mailboxes["Imported Notes"]
  17. messages = notes_folder.messages.get
  18.  
  19. messages.each do |m|
  20. en.create_note(:title = m.subject.get,
  21. :notebook = "Imported Notes",
  22. :with_text = m.content.get,
  23. :tags = "imported_note",
  24. :created = m.date_sent.get)
  25. )
  26. end
  27.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.