srecord G22ScriptUtil(G22Utils g22utils) { File scriptToDBDir(G22LeftArrowScript script) { ret script == null ?: script._concepts.conceptsDir(); } S renderScript(S header, S mode, S text) { ret header + "[" + mode +"]\n" + "----\n" + rtrim(text) + "\n" + "----"; } S makeHugeText(L<G22LeftArrowScript> scripts) { new LS out; fOr (script : scripts) { S header = formatColonProperties( "Script Name" := str(script), "Script ID" := script.id, "DB" := f2s(scriptToDBDir(script))); S editedText = script.editedText(); if (editedText != null) out.add(renderScript(header, "Editing", editedText)); if (script.text != null) out.add(renderScript(header, "Saved", script.text)); S codeForAutoRun = script.codeForAutoRun(); if (codeForAutoRun != null) out.add(renderScript(header, "Clear for auto-run", codeForAutoRun)); } ret paragraphs(out); } }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1036183 |
Snippet name: | G22ScriptUtil |
Eternal ID of this version: | #1036183/2 |
Text MD5: | 0889efc96b890bc8e7d1d3d276f960ad |
Author: | stefan |
Category: | javax / gazelle 22 |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-10-07 17:53:52 |
Source code size: | 1054 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 120 / 144 |
Version history: | 1 change(s) |
Referenced in: | [show references] |