Sha256: 9b2629ac38c8d9ce6ad43a99f4408e0ec41fa1d3f0c3e733350423714c286a9f
Contents?: true
Size: 453 Bytes
Versions: 3
Compression:
Stored size: 453 Bytes
Contents
# Open Document to text conversion require 'zip/zip' PlainText.extract { from :odt as 'application/vnd.oasis.opendocument.text' aka "Open Document Format for text" with {|source| Zip::ZipFile.open(source){|zipfile| zipfile.read("content.xml").split(/</).grep(/^text:(p|span)/).collect{|l| l.sub(/^[^>]+>/,'') }.join("\n") } } which_should_for_example_extract 'written with OpenOffice.org', :from => 'basic.odt' }
Version data entries
3 entries across 3 versions & 1 rubygems