Skip to content

Instantly share code, notes, and snippets.

@rodrigomanhaes
Created March 23, 2012 21:23
Show Gist options
  • Save rodrigomanhaes/2175219 to your computer and use it in GitHub Desktop.
Save rodrigomanhaes/2175219 to your computer and use it in GitHub Desktop.
How to use nsicloudooo gem
require 'nsicloudooo'
require 'base64'
oo = NSICloudooo::Client.new 'http://user:password@host:port'
filename = '/home/rodrigo/manual.odt'
f = File.open(filename)
doc = Base64.encode64(f.read)
response = oo.granulate(file: doc, filename: 'manual.odt')
key = response['key']
oo.done(key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment