On May 3, 2010, at 4:36 PM, Kenny Scott wrote:
I really love the functionality, with apple command + R that allows me to run a Perl Script or Shell Script, or what have you, and display the results in HTML. This would be really helpful, in place of being forced to run each document in terminal to view the output. My command is simply "zml myzmlfile.txt" and I want to leverage the bundle editor to get this going.
Create a command along these lines:
. "$TM_SUPPORT_PATH/lib/webpreview.sh" html_header "Some title for the window"
zml "$TM_FILEPATH"
html_footer
You'll probably want nothing for input and output. Be sure to set the scope selector so it only applies to ZML.
Take a look at the "Preview" command in the Markdown bundle. That's a fairly simple example of a command that uses the "web preview" window.