Skip to content

Instantly share code, notes, and snippets.

View johntaufa's full-sized avatar

John Taufa johntaufa

  • All Creative Apps
  • 02:23 (UTC +10:00)
View GitHub Profile
@andrewbigger
andrewbigger / node_parent_check.rb
Last active August 29, 2015 14:04
CXML Node Parent Checker
#!/usr/bin/env ruby
def check doc, options
doc.css(options[:query]).each do |node|
unless node.parent.name == options[:parent]
puts "#{options[:for]} element not wrapped in #{options[:parent]} at line #{node.line}" unless node.parent.name == options[:or]
end
@andrewbigger
andrewbigger / nested_node_detect.rb
Created July 25, 2014 02:05
Detect Nested CXML P or C Nodes
#!/usr/bin/env ruby
require 'rubygems'
require 'optparse'
require 'nokogiri'
options = { :log => $stdout,
:verbose => false
}
@ff6347
ff6347 / run_js.sh
Created August 11, 2012 07:43
run javascript in InDesign from command line mac
osascript -e 'tell application "Adobe InDesign CS5" to do script alias "Users:fabiantheblind:Desktop:test:test.jsx" language javascript '''