Created
July 23, 2015 15:47
-
-
Save anonymous/10c77cfcc059fd9833a7 to your computer and use it in GitHub Desktop.
haiku script
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
import org.nrg.xnat.turbine.utils.ArcSpecManager | |
def cache = ArcSpecManager.GetInstance().getCachePathForProject(externalId) | |
new File(cache, 'haiku.txt').withWriter('utf-8') { writer -> | |
writer.writeLine 'Into the ancient pond' | |
writer.writeLine 'A frog jumps' | |
writer.writeLine 'Waters sound!' | |
writer.writeLine "User: $user.login" | |
writer.writeLine "srcWorkflowId: $srcWorkflowId" | |
writer.writeLine "groovyWorkflowId: $groovyWorkflowId" | |
writer.writeLine "dataId: $dataId" | |
writer.writeLine "externalId: $externalId" | |
writer.writeLine "dataType: $dataType" | |
writer.writeLine "groovyWorkflow: $groovyWorkflow.wrkWorkflowdataId" | |
} |
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
var ArcSpecManager = Java.type("org.nrg.xnat.turbine.utils.ArcSpecManager"); | |
var File = Java.type("java.io.File"); | |
var FileWriter = Java.type("java.io.FileWriter"); | |
var PrintWriter = Java.type("java.io.PrintWriter"); | |
var cache = ArcSpecManager.GetInstance().getCachePathForProject(externalId); | |
var file = new File(cache, "haiku.txt"); | |
var writer = new PrintWriter(new FileWriter(file)); | |
writer.println("Into the ancient pond"); | |
writer.println("A frog jumps"); | |
writer.println("Waters sound!"); | |
writer.println("User: " + user.login); | |
writer.println("srcWorkflowId: " + srcWorkflowId); | |
writer.println("groovyWorkflowId: " + groovyWorkflowId); | |
writer.println("dataId: " + dataId); | |
writer.println("externalId: " + externalId); | |
writer.println("dataType: " + dataType); | |
writer.println("groovyWorkflow: " + groovyWorkflow.wrkWorkflowdataId); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment