Created
November 30, 2014 01:56
-
-
Save michaeleisel/6d0f2cb942f22c24b130 to your computer and use it in GitHub Desktop.
This file contains 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
require 'nokogiri' | |
if ARGV.size < 1 | |
puts "please enter the file to use" | |
exit 1 | |
end | |
storyboard = Nokogiri::XML(IO.read(ARGV[0]), &:noblanks).root | |
labels = storyboard.xpath("//label") | |
labels.each do |label| | |
width = label.at_xpath("//rect")[:width].to_f | |
label[:preferredMaxLayoutWidth] = width.to_s | |
end | |
puts storyboard.to_s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment