Class: Plaintext::OpendocumentHandler

Inherits:
ZippedXmlHandler show all
Defined in:
lib/plaintext/file_handler/zipped_xml_handler/opendocument_handler.rb

Overview

Extractor for Open / Libre Office formats

Constant Summary collapse

CONTENT_TYPES =
[
    'application/vnd.oasis.opendocument.presentation',
    'application/vnd.oasis.opendocument.presentation-template',
    'application/vnd.oasis.opendocument.text',
    'application/vnd.oasis.opendocument.text-template',
    'application/vnd.oasis.opendocument.spreadsheet',
    'application/vnd.oasis.opendocument.spreadsheet-template'
]

Instance Method Summary collapse

Methods inherited from ZippedXmlHandler

#text

Methods inherited from FileHandler

#accept?, #set

Constructor Details

#initializeOpendocumentHandler

Returns a new instance of OpendocumentHandler.



14
15
16
17
18
19
20
# File 'lib/plaintext/file_handler/zipped_xml_handler/opendocument_handler.rb', line 14

def initialize
  super
  @file_name = 'content.xml'
  @content_types = CONTENT_TYPES
  @element = 'p'
  @namespace_uri = 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'
end