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

17
LINES

< > TinyBrain | #1008872 - loadWoodyBot

JavaX fragment (include)

static WoodyBot loadWoodyBot(S botID) {
  new WoodyBot bot;
  File zip = loadLibrary(botID);
  print("Have zip: " + f2s(zip) + ", size: " + fileSize(zip));
  
  // Find out main folder name ("Woody-2017-...")
  S prefix = commonPrefixMulti(listFilesInZip(zip));
  int i = prefix.indexOf('/');
  S mainFolderName = i >= 0 ? substring(prefix, 0, i) : "";
  
  bot.files = zipFileSnippetToLazyTextMap_subfolder(botID, mainFolderName);
  bot.globals = ctxLoadGlobals(botID);
  bot.regexpMacros = ctxLoadRegexpMacros(botID);
  
  woodyLoadRules(bot);
  ret bot;
}

download  show line numbers  debug dex   

Travelled to 2 computer(s): cfunsshuasjs, tvejysmllsmz

No comments. add comment

Snippet ID: #1008872
Snippet name: loadWoodyBot
Eternal ID of this version: #1008872/7
Text MD5: c7b14b2560fe99d4c392a8a05b09aee4
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-06 17:14:43
Source code size: 574 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 42 / 70
Version history: 6 change(s)
Referenced in: [show]