Download Jar. Libraryless. Click here for Pure Java version (9284L/63K).
!7 concept FileMeta { int fileID; S md5; long checked; } svoid init { dbIndexing(FileMeta, 'fileID); } p { init(); typicalDownload(); } svoid fullDownload { download(diagramServer_IDsAndMD5s()); } svoid typicalDownload { SS map = diagramServer_typicalSet(); download(map); saveTextFile(getProgramFile("typical.structure"), struct(map)); } svoid downloadLatestFileNamed(S name) { L l = (L) safeUnstructure(loadPage("http://ai1.lol/1010474/raw/latest-file-named/" + urlencode(name))); if (l == null) ret with print("Can't file named " + name + " on diagram server"); S md5; download(litmap(str(first(l)), md5 = second(l))); // ID + MD5 saveTextFile(getProgramFile(urlencode(name) + ".file"), md5); } // map: ID -> MD5 svoid download(SS map) { loading "Downloading diagrams..." { pnl(map); for (S id : keys(map)) { S md5 = map.get(id); FileMeta m = uniq(FileMeta, fileID := parseInt(id)); cset(m, +md5, checked := now()); File f = getFile(m); if (!f.exists()) { S url = diagramServer_idToURL(id); saveBinaryFile(f, loadBinaryPage(url)); print("Saved " + f); } } print("Done."); }} static File getFile(FileMeta m) { ret getProgramFile(m.md5); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, imzmzdywqqli, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment