Libraryless. Click here for Pure Java version (11026L/62K).
// returns (transpilationResult, compilationResult) static PairS uploadTranspilation(S progID, S transpilation, LS libs) { S server = tb_mainServer(); S transpilationResult = postPageWithCredentials(server + "/tb/upload-transpilation.php", id := psI(progID), +transpilation, libs := lines(map parseSnippetID(libs)), computer := computerID()); Matcher m = regexp("URL=/(dexcompile\\.php.*?)'", transpilationResult); if (!m.find()) fail("Server said: " + transpilationResult); S url = addParamToURL(server + "/" + m.group(1), useJarBot := 1); S compilationResult = postPageWithCredentials(url); print(compilationResult); bool ok = compilationResult.contains("<title>" + "SUCCESS"); // XXX sendToSnippetUpdatesBot((ok ? "/transpileOK" : "transpileFail") + "/" + psI(progID)); if (!ok) fail("Server said: " + compilationResult); print("Transpiled & uploaded " + fsI(progID) + "!"); ret pair(transpilationResult, compilationResult); }
Began life as a copy of #1011923
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1032814 |
| Snippet name: | uploadTranspilation |
| Eternal ID of this version: | #1032814/11 |
| Text MD5: | 134059fcae482cd0a0d2ac1ee9841dd0 |
| Transpilation MD5: | 709bc8463e28800660a058614232504a |
| Author: | stefan |
| Category: | javax / transpiling |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-06-11 00:38:58 |
| Source code size: | 1040 bytes / 30 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 536 / 735 |
| Version history: | 10 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1034476 - uploadTranspilation_keepLibs |