Permalink
Browse files

Added readme.mkd

  • Loading branch information...
1 parent 50cdf5b commit 8f782d3cb66e15dc0e178d5a0cf04ccbf4616efa @jashmenn committed Aug 7, 2011
Showing with 44 additions and 0 deletions.
  1. +44 −0 README.mkd
View
@@ -0,0 +1,44 @@
+# pst.rb
+
+## Description
+
+JRuby gem for working with Outlook PST files. Syntactic sugar over
+`java-libpst`
+
+## Example
+
+ pstfile = Pff::PSTFile.new("foo.pst")
+
+ # iterate over all (nested) folders
+ folders = pstfile.root.sub_folders.inject({}){|acc,f|
+ acc[f.name] = f
+ acc
+ }
+
+ folder = folders["Inbox"]
+ email = folder.children.first
+
+ pp email.subject # -> "Re: obama's new debt plan"
+ pp email.num_recipients # -> 2
+
+ # handy human ids and hash strings
+ pp email.human_id "nates-mails:/path/to/foo.pst:/Top of Personal Folders/Inbox:Fri Aug 03 01:02:00 PDT 2011:<foo@bar.com>:Re: obama's new debt plan")
+ pp email.hash_string # -> "f161dd2a45952784c440bd5879684ae89b8b0523"
+
+ recipient = email.recipients.first
+ pp recipient.name # -> "Nate Murray"
+ pp recipient.email # -> "nate@natemurray.com
+
+## References
+
+The heavy lifting is done by Richard Johnson's java-libpst. Bless
+him for working out the protocol details so I didn't have to.
+
+* http://code.google.com/p/java-libpst/
+* http://www.rjohnson.id.au/wordpress/2010/01/26/java-libpst-pst2gmail/
+
+# Author
+
+Nate Murray <nate@natemurray.com>
+http://www.xcombinator.com
+

0 comments on commit 8f782d3

Please sign in to comment.