0.0
The project is in a healthy, maintained state
A simple gem to get metadata out of the docs XML.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.16
~> 2.3
 Project Readme

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'

# read local file
metadata = 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 metadata[:core]
puts metadata[:custom]

Development

This was just a fast solution to wrap the code needed to retrieve the metadata from office files.

todo

  • write some more tests, retrieve more interesting data...
  • catch errors in case of corrupt files or xmls.