Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

35
LINES

< > BotCompany Repo | #1001351 // Kill, zip, upload & MOVE a bot

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1153L/10K/30K).

1  
!747
2  
3  
m {
4  
  static S botID = "#1001325"; // Heart (loud)
5  
  static S dataID;
6  
7  
  // We alternate between two machines as a test.
8  
  static S machine1 = "teubizvjbppd";
9  
  static S machine2 = "dhtvkmknsjym";
10  
  
11  
  static int compressionLevel = 9; // highest!
12  
13  
  p {
14  
    if (args.length != 0) botID = args[0];
15  
    S destMachine = getComputerID().equals(machine2) ? machine1 : machine2;
16  
    
17  
    botID = formatSnippetID(botID);
18  
    
19  
    print("Killing bot to move it...");
20  
    killProgramID(botID);
21  
    print("OK, proceeding with zipping.");
22  
    
23  
    File zipPath = new File(getProgramDir(), botID + ".zip");
24  
    zipBot_compressionLevel = compressionLevel;
25  
    zipBot(botID, zipPath);
26  
    
27  
    S title = "Data zip of " + botID + " on " + computerID() + " at " + now();
28  
    S gummipw = getProgramID();
29  
    dataID = uploadDataSuperHigh(gummipw, title, zipPath);
30  
    
31  
    sendToRemoteBot("Identity Manager", format3("* is now in state * with data * to machine *", botID, "moving", dataID, destMachine));
32  
    
33  
    print("\nDone. Data ID: " + dataID);
34  
  }
35  
}

Author comment

Began life as a copy of #1001341

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, dhtvkmknsjym, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001351
Snippet name: Kill, zip, upload & MOVE a bot
Eternal ID of this version: #1001351/1
Text MD5: 09e3a309153f5cb30467581452baadf8
Transpilation MD5: 636e0ad963f33e03b21a2877798845d8
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-11 20:52:21
Source code size: 1078 bytes / 35 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 629 / 919
Referenced in: [show references]