This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In the TypeTool, the StyleRun defines all of the different styles | |
// that are applied to a text layer. Each style is defined in the RunArray, | |
// and the character indices for each style is defined in the RunLengthArray, | |
// i.e. the first style exists for 7 characters, the 2nd for 7 characters, | |
// and the third for 10 characters. | |
> typeTool.engineData.EngineDict.StyleRun | |
{ DefaultRunData: { StyleSheet: { StyleSheetData: {} } }, | |
RunArray: | |
[ { StyleSheet: [Object] }, | |
{ StyleSheet: [Object] }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# make sure you have gem 'rubocop-git' in your Gemfile | |
require 'readline' | |
def input(prompt="", newline=false) | |
prompt += "\n" if newline | |
Readline.readline(prompt, true).squeeze(" ").strip | |
end |