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

28
LINES

< > BotCompany Repo | #1010500 // downloadedDiagramStructures

JavaX fragment (include)

1  
static L<S> downloadedDiagramStructures() {
2  
  ret downloadedDiagramStructures(listFilesOfProgram_notDirs(#1010484));
3  
}
4  
5  
static L<S> downloadedDiagramStructures(L<File> files) {
6  
  new L<S> diagrams;
7  
  for (File f : files) {
8  
    if (!isPossibleMD5(f.getName()) || !f.isFile()) continue;
9  
    print(f);
10  
    if (fileStartsWith(f, toUtf8("CirclesAndLines"))) {
11  
      print("Diagram!");
12  
      diagrams.add(loadTextFile(f));
13  
    } else if (isGZ(f)) {
14  
      //print("GZipped!");
15  
      S text = loadGZippedTextFile(f);
16  
      if (isQuoted(firstJavaToken(text)))
17  
        diagrams.addAll(scanQuotedLogLines(text));
18  
      else {
19  
        Concepts c = new Concepts().loadGrab(text, true);
20  
        L<S> structures = getFieldOfAllConceptClasses(c, 'calStructure);
21  
        print("Got " + n(structures, "diagram"));
22  
        diagrams.addAll(structures);
23  
      }
24  
    } else
25  
      print("Huh?");
26  
  }
27  
  ret diagrams;
28  
}

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: #1010500
Snippet name: downloadedDiagramStructures
Eternal ID of this version: #1010500/7
Text MD5: e518df712a58862ad8578f3424306d10
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-27 18:57:15
Source code size: 921 bytes / 28 lines
Pitched / IR pitched: No / No
Views / Downloads: 549 / 585
Version history: 6 change(s)
Referenced in: [show references]