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.27 bin/ix-psd-to-json
ix-cli-0.0.26 bin/ix-psd-to-json
ix-cli-0.0.25 bin/ix-psd-to-json
ix-cli-0.0.24 bin/ix-psd-to-json
ix-cli-0.0.23 bin/ix-psd-to-json
ix-cli-0.0.22 bin/ix-psd-to-json
ix-cli-0.0.21 bin/ix-psd-to-json
ix-cli-0.0.20 bin/ix-psd-to-json
ix-cli-0.0.19 bin/ix-psd-to-json
ix-cli-0.0.18 bin/ix-psd-to-json
ix-cli-0.0.17 bin/ix-psd-to-json
ix-cli-0.0.16 bin/ix-psd-to-json
ix-cli-0.0.15 bin/ix-psd-to-json
ix-cli-0.0.14 bin/ix-psd-to-json
ix-cli-0.0.13 bin/ix-psd-to-json
ix-cli-0.0.12 bin/ix-psd-to-json
ix-cli-0.0.11 bin/ix-psd-to-json
ix-cli-0.0.10 bin/ix-psd-to-json
ix-cli-0.0.9 bin/ix-psd-to-json
ix-cli-0.0.7 bin/ix-psd-to-json