Sha256: 2d1f4fe50f1797261f152dbfe55a1fa6b1b3d781841165ae20afc5cecec4c497

Contents?: true

Size: 818 Bytes

Versions: 12

Compression:

Stored size: 818 Bytes

Contents

module Bricks
  module Pdf
    module Engine
      module Prince
        def command(opts)
          cmd = ['prince']
          {
            :http_user     => '--http-user=',
            :http_password => '--http-password=',
            :baseurl       => '--baseurl='
          }.each do |key, cmd_key|
            cmd << "#{cmd_key}#{opts[key]}"
          end

          # FIXME: find a way to redirect errors on screen instead of main log.
          cmd << "--log=#{Zena.log_path}"

          if file = opts[:input]
            cmd << file
          else
            cmd << "-"
          end

          if file = opts[:output]
            cmd << "-o #{file}"
          else
            cmd << "-o -"
          end

          cmd.join(' ')
        end
      end # Prince
    end # Engine
  end # Pdf
end # Bricks



Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
zena-1.2.5 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.2.4 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.2.3 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.2.2 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.2.1 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.2.0 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.1.3 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.1.2 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.1.1 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.1.0 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.0.0 bricks/pdf/lib/bricks/pdf/engine/prince.rb
zena-1.0.0.rc3 bricks/pdf/lib/bricks/pdf/engine/prince.rb