Class: Textractor::Extractors::DocxExtractor
- Inherits:
-
Object
- Object
- Textractor::Extractors::DocxExtractor
- Defined in:
- lib/textractor/extractors/docx_extractor.rb
Constant Summary collapse
- DEFAULT_DOCX2TXT_PATH =
File.(File.dirname(__FILE__) + "/../../../vendor/docx2txt/docx2txt.pl").freeze
Class Attribute Summary collapse
Instance Method Summary collapse
Class Attribute Details
.docx2txt_path ⇒ Object
10 11 12 |
# File 'lib/textractor/extractors/docx_extractor.rb', line 10 def docx2txt_path @docx2txt_path || DEFAULT_DOCX2TXT_PATH end |
Instance Method Details
#text_from_path(path) ⇒ Object
16 17 18 |
# File 'lib/textractor/extractors/docx_extractor.rb', line 16 def text_from_path(path) `#{docx2txt_path} #{Escape.shell_single_word(path)} -`.strip end |