Worked on this last week. Not quite complete, very early alpha. Use at your own risk!
- $
gem source --add http://god.org
- $
gem install strings
- $
gem install atoms
This all started when I moved to a design-in-browser workflow over the winter.
Designing in the browser is a workflow pain, jumping back into photoshop & shiny up a design is a productivity killer. I try to work in code as long as possible and avoid PS. I originally started out with an HTML/CSS to PSD converter using the PS API, although I got pretty far I quickly discovered it was going to be too slow. Parse HTML and for everything element create relevant layers, PS could barely handle it much less perform effectively.
I had two options; 1. Reverse engineer a PSD format writer or 2. Start work on a app that could speak both graphics and HTML. The latter seemed like an easier task so here I am.
/* | |
* JavaScript Pretty Date | |
* Copyright (c) 2008 John Resig (jquery.com) | |
* Licensed under the MIT license. | |
*/ | |
// Takes an ISO time and returns a string representing how | |
// long ago the date represents. | |
function prettyDate(time) { | |
var date = time, |
class Numeric | |
def ones_complement(bits) | |
self ^ ((1 << bits) - 1) | |
end | |
end | |
def addbinary(b1, b2) | |
result = '' | |
carry = 0 | |
# This will never end because i++ wont be reached more than three times. | |
i = 0 | |
i = 0 | |
while i <= 10 | |
continue if i is 3 | |
console.log "The number is " + i | |
console.log "\n" | |
i++ |
require 'rubygems' | |
require 'appscript' | |
# Make sure to open your apps first. Appscript can get ahead of itself and not wait for them to load so it will fail | |
# Set your dir with AI files and thats it | |
dirname = "/Users/kenerickson/testCSH" | |
ai = Appscript.app.by_id('com.adobe.illustrator') | |
ps = Appscript.app.by_id('com.adobe.photoshop') | |
# ps = Appscript.app("/Applications/Adobe Photoshop CS3/Adobe Photoshop CS3.app") |
require 'rubygems' # disable this for a deployed application | |
require 'hotcocoa' | |
framework 'Quartz' | |
# This Needs to conformal to QLPreviewItem | |
class Item | |
attr_accessor :previewItemURL | |
end | |
module QLookBehaviors |