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

33
LINES

< > BotCompany Repo | #1027375 // Fluid Text File Spike [shortened]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (4788L/25K).

1  
!7
2  
3  
cmodule FluidTextFileSpike > DynPrintLog {
4  
  switchable int maxRefLength = 8;
5  
6  
  transient S demoContent = autoUnindent_mls([=[
7  
    refs="at *", name="index" [[
8  
      entry 1 at abc
9  
      entry 2 at def
10  
    ]]
11  
    i=abc [[hello]]
12  
    i=def [[world]]
13  
  ]=]);
14  
15  
  start-thread {
16  
    print(demoContent);
17  
    S out = cleanIt(demoContent, false);
18  
    print_withNLBefore(out);
19  
    assertEquals("Idempotency", out, cleanIt(out, false));
20  
    print("OK");
21  
  }
22  
23  
  S cleanIt(S content, bool verbose) {
24  
    new CleanFluidTextFile cleaner;
25  
    cleaner.verbose = verbose;
26  
    cleaner.maxRefLength = maxRefLength;
27  
    cleaner.reader = stringReader(content);
28  
    new StringWriter writer;
29  
    cleaner.writer = writer;
30  
    cleaner.run();
31  
    ret str(writer);
32  
  }
33  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027375
Snippet name: Fluid Text File Spike [shortened]
Eternal ID of this version: #1027375/8
Text MD5: 4a9636973cecafc040ed978e52943167
Transpilation MD5: 01e11d8b28d75a5e9df9387635229738
Author: stefan
Category:
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-15 16:54:16
Source code size: 749 bytes / 33 lines
Pitched / IR pitched: No / No
Views / Downloads: 140 / 471
Version history: 7 change(s)
Referenced in: [show references]