Skip to content

Instantly share code, notes, and snippets.

@jondot
Created June 18, 2012 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jondot/2950797 to your computer and use it in GitHub Desktop.
Save jondot/2950797 to your computer and use it in GitHub Desktop.
extract docs w/jruby
JARS = '/whatever/path/to/jars'
Dir["#{JARS}/*jar"].each {|j| require j}
require "java"
import org.apache.poi.extractor.ExtractorFactory
ex = ExtractorFactory.createExtractor(java.io.FileInputStream.new('pwnage.doc'))
puts ex.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment