package de.tinybrain.nt.nt01; import net.luaos.tb.remote.ServerConnection; import net.luaos.tb.tb12.Sandbox; import org.luaj.vm2.LuaValue; import java.io.IOException; public class ExecuteReplacement { public static void main(String[] args) throws IOException { String replacementID = "#2000029"; String contentID = "#2000028"; String replacerID = "#2000031"; ServerConnection serverConnection = ServerConnection.aServerConnection(); Sandbox sandbox = new Sandbox(serverConnection); sandbox.setOuter("replacement", serverConnection.loadSnippet(replacementID)); sandbox.setOuter("content", serverConnection.loadSnippet(contentID)); LuaValue result = sandbox.runSnippet(replacerID); String textResult = result.tojstring(); System.out.println("Result: " + textResult); String title = "A result for replacement " + replacementID + " on " + contentID + " using replacer " + replacerID; System.out.println("Snippet created: " +serverConnection.ntUpload(textResult, ExecuteReplacement.class.getName(), title)); } }
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment