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

21
LINES

< > BotCompany Repo | #1002971 // Re-Simplify #1002970

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

Libraryless. Click here for Pure Java version (1573L/10K/35K).

!752

p {
  File file = getProgramFile("#1002970", "inToOut");
  new L out;
  for (S line : scanLog(file)) {
    L l = cast unstructure(line);
    if (eq(get(l, 0), "add"))
      l.set(1, simplifySentence2(getString(l, 1)));
    out.add(l);
  }
  print(structureLines(out));
  replaceStructureLog(file, out);
}

static void replaceStructureLog(File file, L list) {
  File tempFile = new File(file.getPath() + ".bak" + now());
  if (!file.renameTo(tempFile))
    fail("oops " + tempFile.getAbsolutePath());
  saveTextFile(file, structureLinesQuoted(list));
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002971
Snippet name: Re-Simplify #1002970
Eternal ID of this version: #1002971/1
Text MD5: cdbf724188be1d58a94c785615cb90d3
Transpilation MD5: 58b3d7ca57abbc82c8398559737ff86d
Author: stefan
Category: nl bots
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-04-14 18:29:16
Source code size: 577 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 589 / 646
Referenced in: #3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)