1 | srecord G22ScriptUtil(G22Utils g22utils) { |
2 | File scriptToDBDir(G22LeftArrowScript script) { |
3 | ret script == null ?: script._concepts.conceptsDir(); |
4 | } |
5 | |
6 | S renderScript(S header, S mode, S text) { |
7 | ret header + "[" + mode +"]\n" |
8 | + "----\n" |
9 | + rtrim(text) + "\n" |
10 | + "----"; |
11 | } |
12 | |
13 | S makeHugeText(L<G22LeftArrowScript> scripts) { |
14 | new LS out; |
15 | |
16 | fOr (script : scripts) { |
17 | S header = formatColonProperties( |
18 | "Script Name" := str(script), |
19 | "Script ID" := script.id, |
20 | "DB" := f2s(scriptToDBDir(script))); |
21 | |
22 | S editedText = script.editedText(); |
23 | if (editedText != null) |
24 | out.add(renderScript(header, "Editing", editedText)); |
25 | |
26 | if (script.text != null) |
27 | out.add(renderScript(header, "Saved", script.text)); |
28 | |
29 | S codeForAutoRun = script.codeForAutoRun(); |
30 | if (codeForAutoRun != null) |
31 | out.add(renderScript(header, "Clear for auto-run", codeForAutoRun)); |
32 | } |
33 | |
34 | ret paragraphs(out); |
35 | } |
36 | } |
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: | 122 / 147 |
Version history: | 1 change(s) |
Referenced in: | [show references] |