Gem for parsing, manipulating, and serializing Astronomy Visualization Metadata (AVM) in the XMP format.
Go to file
John Bintz 1d38d0e012 update readme 2011-03-23 14:16:25 -04:00
autotest start work on spec 2011-03-07 12:39:47 -05:00
bin starting to clean things up to read real xmp files 2011-03-18 12:28:53 -04:00
lib code cleanup thanks to reek 2011-03-23 14:10:02 -04:00
spec code cleanup thanks to reek 2011-03-23 14:10:02 -04:00
.autotest more work on image reads 2011-03-15 10:55:09 -04:00
.gitignore finish serializing creators 2011-03-10 17:45:21 -05:00
.rspec more work on image reads 2011-03-15 10:55:09 -04:00
Gemfile start work on spec 2011-03-07 12:39:47 -05:00
README.md update readme 2011-03-23 14:16:25 -04:00
Rakefile bundler gem 2011-03-03 17:36:12 -05:00
reek.watchr code cleanup thanks to reek 2011-03-23 14:10:02 -04:00
ruby-avm-library.gemspec update gemspec 2011-03-18 15:59:23 -04:00

README.md

The Ruby AVM Library

The Astronomy Visualization Metadata (AVM) standard is an extension of the Adobe XMP format. This extension adds information to an astronomical image that describes the scientific data and methods of collection that went in to producing the image. This Ruby library assists in reading the metadata from XMP documents and writing out AVM data as a new XMP file.

Installing the library

From Bundler

In your Gemfile:

gem 'ruby-avm-library'

To use the current development version:

gem 'ruby-avm-library', :git => ''

From RubyGems

gem install ruby-avm-library

Basic usage

Reading an XMP file

require 'avm/image'

image = AVM::Image.from_xml(File.read('my-file.xmp'))

puts image.title #=> "The title of the image"

Writing XML data

image.to_xml #=> <xmp data in xml format />

Creating an Image from scratch

image = AVM::Image.new
image.title = "The title of the image"

observation = image.create_observation(:instrument => 'HST', :color_assignment => 'Green')
contact = image.creator.create_contact(:name => 'John Bintz')

Command line tool

avm2avm currently performs one function: take an XMP file from stdin and pretty print the image as a Hash:

avm2avm < my-file.xmp

More resources