Libraryless. Click here for Pure Java version (1573L/10K/35K).
1 | !752 |
2 | |
3 | p { |
4 | File file = getProgramFile("#1002970", "inToOut"); |
5 | new L out; |
6 | for (S line : scanLog(file)) { |
7 | L l = cast unstructure(line); |
8 | if (eq(get(l, 0), "add")) |
9 | l.set(1, simplifySentence2(getString(l, 1))); |
10 | out.add(l); |
11 | } |
12 | print(structureLines(out)); |
13 | replaceStructureLog(file, out); |
14 | } |
15 | |
16 | static void replaceStructureLog(File file, L list) { |
17 | File tempFile = new File(file.getPath() + ".bak" + now()); |
18 | if (!file.renameTo(tempFile)) |
19 | fail("oops " + tempFile.getAbsolutePath()); |
20 | saveTextFile(file, structureLinesQuoted(list)); |
21 | } |
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: | 588 / 646 |
Referenced in: | [show references] |