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

30
LINES

< > BotCompany Repo | #1010812 // downloadedDiagramStructures2 - with global IDs

JavaX fragment (include)

static L<Pair<S>> downloadedDiagramStructures2() {
  ret downloadedDiagramStructures2(listFilesOfProgram_notDirs(#1010484));
}

static L<Pair<S>> downloadedDiagramStructures2(L<File> files) {
  new L<Pair<S>> diagrams;
  for (File f : files) {
    if (!isPossibleMD5(f.getName()) || !f.isFile()) continue;
    print(f);
    if (fileStartsWith(f, toUtf8("CirclesAndLines"))) {
      print("Diagram!");
      diagrams.add(pair(loadTextFile(f), ""));
    } else if (isGZ(f)) {
      //print("GZipped!");
      Concepts c = new Concepts().loadGrab(loadGZippedTextFile(f), true);
      int n = 0;
      for (Concept d : concepts.allConcepts()) {
        S s = getString(d, 'calStructure);
        S id = getString(d, 'globalID);
        if (s != null) {
          diagrams.add(pair(s, id));
          ++n;
        }
      }
      print("Got " + n(n, "diagram"));
    } else
      print("Huh?");
  }
  ret diagrams;
}

Author comment

Began life as a copy of #1010500

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: #1010812
Snippet name: downloadedDiagramStructures2 - with global IDs
Eternal ID of this version: #1010812/2
Text MD5: d9f0d907dd538b60d3536b8b3e8f2c47
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:01
Source code size: 940 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 381 / 412
Version history: 1 change(s)
Referenced in: [show references]