Skip to content

Instantly share code, notes, and snippets.

@monkstone
Created January 11, 2011 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monkstone/774332 to your computer and use it in GitHub Desktop.
Save monkstone/774332 to your computer and use it in GitHub Desktop.
PYP5.xml
#! /usr/bin/env bash
export JAVA_HOME="/opt/jdk1.6.0_22"
java -Xms64m -Xmx1024m -jar /home/tux/processing.py/processing-py.jar $@
// This is a recorded macro. First, check over the
// commands to make sure this is what you intended. Then,
// save this buffer, and the macro should appear in the
// Macros menu.
new console.commando.CommandoDialog(view,"commando.PYP5");
<!-- Monkstone, 2011-February-11 -->
<COMMANDO>
<UI>
<CAPTION LABEL="Run">
<FILE_ENTRY LABEL="ruby file" VARNAME="file" EVAL="buffer.getName()"/>
</CAPTION>
<CAPTION LABEL="Path to PYP5">
<ENTRY LABEL="(no spaces)" VARNAME="PYP5" DEFAULT="/home/tux/bin/"/>
</CAPTION>
</UI>
<COMMANDS>
<!-- NB: I found that if I cd to the directory of the sketch, the data file is not recognized
So instead I call the file at the absolute address using the prefix dir, and it works
-->
<COMMAND SHELL="System" CONFIRM="FALSE">
dir = new StringBuilder(MiscUtilities.getParentOfPath(buffer.getPath()));
buf = new StringBuilder(PYP5 + "pyp5 ");
buf.append(" ");
buf.append(dir);
buf.append(file);
buf.toString();
</COMMAND>
</COMMANDS>
</COMMANDO>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment