Class | Ole::Storage::MetaData |
In: |
lib/ole/storage/meta_data.rb
|
Parent: | Object |
The MetaData class is designed to be high level interface to all the underlying meta data stored within different sections, themselves within different property set streams.
With this class, you can simply get properties using their names, without needing to know about the underlying guids, property ids etc.
Example:
Ole::Storage.open('test.doc') { |ole| p ole.meta_data.doc_author }
TODO:
FILE_MAP | = | { Types::PropertySet::FMTID_SummaryInformation => "\005SummaryInformation", Types::PropertySet::FMTID_DocSummaryInfo => "\005DocumentSummaryInformation" |
FORMAT_MAP | = | { 'MSWordDoc' => :doc |
CLSID_EXCEL97 | = | Types::Clsid.parse "{00020820-0000-0000-c000-000000000046}" |
CLSID_EXCEL95 | = | Types::Clsid.parse "{00020810-0000-0000-c000-000000000046}" |
CLSID_WORD97 | = | Types::Clsid.parse "{00020906-0000-0000-c000-000000000046}" |
CLSID_WORD95 | = | Types::Clsid.parse "{00020900-0000-0000-c000-000000000046}" |
CLSID_MAP | = | { CLSID_EXCEL97 => :xls, CLSID_EXCEL95 => :xls, CLSID_WORD97 => :doc, CLSID_WORD95 => :doc |
MIME_TYPES | = | { :xls => 'application/vnd.ms-excel', :doc => 'application/msword', :ppt => 'application/vnd.ms-powerpoint', # not registered at IANA, but seems most common usage :msg => 'application/vnd.ms-outlook', # this is my default fallback option. also not registered at IANA. # file(1)'s default is application/msword, which is useless... nil => 'application/x-ole-storage' |