Home → WebExportPostflightScript

#!/usr/bin/env ruby

output_dir = ENV['VPWebExportOutputDirectory']

file_path = File.join output_dir, 'index.html'

sz = File.size file_path

contents = ''

File.open file_path, 'r' do |f|

contents = f.read sz

contents.gsub! '<!-- insert apple title here -->', '<meta name="AppleTitle" content="Clipstart Help" />'

contents.gsub! '<!-- insert apple icon here -->', '<meta name="AppleIcon" content="Clipstart Help/app_icon_16.png" />'

end

File.open file_path, 'w+' do |f|

f.print contents

end

#cmd = "/usr/bin/open -a /Developer/Applications/Utilities/Help\ Indexer.app \"${output_dir}\""

#`osascript -e "tell application \"Terminal\" to do script \"${cmd}\""`