class DocRipper::Formats::DocxRipper

Public Instance Methods

rip() click to toggle source
# File lib/doc_ripper/formats/docx_ripper.rb, line 5
def rip
  @text ||= begin
    text = %x(unzip -p #{to_shell(file_path)} | grep '<w:t' | sed 's/<[^<]*>//g' | grep -v '^[[:space:]]*$')

    text.empty? ? nil : text
  end
end