mso_metadata
About
Prerequisites
- Ruby 3.x
Install
Add the following line to your application's Gemfile:
gem 'mso_metadata'
And then execute:
bundle install
Or install it yourself as:
gem install mso_metadata
Usage
Reading
require 'mso_metadata'
# Create a Docx::Document object for our existing docx file
= MsoMetadata.read('example.docx')
# metadata consists two hashes: metadata[:core] and metadata[:custom]
# custom metadata could be set with arbitrary key values. Thats why we have to split it, to prevent key value collisions.
puts [:core]
puts [:custom]
Development
This was just a fast solution to wrap the code needed to retrieve the metadata from office files.
todo
- write some tests