Sha256: db8e545454ae7a6ccc78b83030a0b94c83b7398da10d2d47ac6f047c08f4da42

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

#!/usr/bin/env ruby -rubygems

require 'restclient'
require 'json'

# This example demonstrates a fairly complicated PDF-processing action, designed
# to extract the PDF's text, and produce GIF versions of each page. The action
# (actions/process_pdfs.rb) shows an example of using all three steps,
# split, process, and merge.

RestClient.post('http://localhost:9173/jobs',
  {:job => {
  
    'action' => 'process_pdfs',
    
    'inputs' => [
      'http://tigger.uic.edu/~victor/personal/futurism.pdf',
      'http://www.jonasmekas.com/Catalog_excerpt/The%20Avant-Garde%20From%20Futurism%20to%20Fluxus.pdf',
      'http://www.dzignism.com/articles/Futurist.Manifesto.pdf',
      'http://benfry.com/phd/dissertation-050312b-acrobat.pdf'
    ],
    
    'options' => {
      
      'batch_size' => 7,
      
      'images' => [{
        'name'      => '700',
        'options'   => '-resize 700x -density 220 -depth 4 -unsharp 0.5x0.5+0.5+0.03',
        'extension' => 'gif'
      },{
        'name'      => '1000',
        'options'   => '-resize 1000x -density 220 -depth 4 -unsharp 0.5x0.5+0.5+0.03',
        'extension' => 'gif'
      }]
      
    }
    
  }.to_json}
)

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
documentcloud-cloud-crowd-0.0.6 examples/process_pdfs_example.rb
documentcloud-cloud-crowd-0.1.0 examples/process_pdfs_example.rb
cloud-crowd-0.1.0 examples/process_pdfs_example.rb