class Doc2Text::Docx::Document
Public Class Methods
parse_and_save(input, output_filename)
click to toggle source
# File lib/doc2text/docx/docx.rb, line 5 def self.parse_and_save(input, output_filename) docx = new input begin docx.unpack styles_xml_root = docx.parse_styles output = File.open output_filename, 'w' markdown = Markdown::DocxParser.new output, styles_xml_root begin docx.parse markdown ensure markdown.close end ensure docx.clean end end
Public Instance Methods
contains_extracted_files?()
click to toggle source
# File lib/doc2text/docx/docx.rb, line 22 def contains_extracted_files? File.exist? File.join(extract_path, '[Content_Types].xml') end
extract_extension()
click to toggle source
# File lib/doc2text/docx/docx.rb, line 26 def extract_extension 'unpacked_docx' end