Skip to content

Instantly share code, notes, and snippets.

@jbfink
Created June 23, 2010 14:18
Show Gist options
  • Save jbfink/449976 to your computer and use it in GitHub Desktop.
Save jbfink/449976 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby -rubygems
require 'restclient'
require 'json'
#note that the original trench.rb file has hundreds of TIFFs for the input; I've truncated this one.
RestClient.post('http://localhost:9173/jobs',
{:job => {
'action' => 'graphics_magick',
'inputs' => [
'file:///media/trench-maps/002WW1MAP.tif',
'file:///media/trench-maps/003WW1MAP.tif',
'file:///media/trench-maps/004WW1MAP.tif',
'file:///media/trench-maps/005WW1MAP.tif',
'file:///media/trench-maps/006WW1MAP.tif',
'file:///media/trench-maps/450WW1MAP.tif'
],
'options' => {
'steps' => [{
'name' => 'annotated',
'command' => 'mogrify',
'options' => '-format',
'extension' => 'jp2'
}]
}
}.to_json}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment