Sha256: 3af106349977c34b5658a7e6fe1d64ed8b6a47b7f9ad9c862c2d36a3cfec6cab

Contents?: true

Size: 341 Bytes

Versions: 26

Compression:

Stored size: 341 Bytes

Contents

#!/usr/bin/env ruby

require 'tmpdir'
require 'psd'
require 'json'

Dir.mktmpdir do |temporal_directory|
  data = STDIN.read
  psd_document_path = "#{temporal_directory}/document.psd"
  File.open(psd_document_path, 'w+') do |file|
    file.write(data)
  end
  PSD.open(psd_document_path) do |psd|
    puts psd.tree.to_hash.to_json
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ix-cli-0.0.6 bin/ix-psd-to-json
ix-cli-0.0.5 bin/ix-psd-to-json
ix-cli-0.0.4 bin/ix-psd-to-json
ix-cli-0.0.3 bin/ix-psd-to-json
ix-cli-0.0.2 bin/ix-psd-to-json
ix-cli-0.0.1 bin/ix-psd-to-json