1 | get("#175") -- tableToString
|
2 | get("#349") -- table functions
|
3 | |
4 | startID = "#2000044" |
5 | |
6 | function printReferenceTree(id, indent, seen) |
7 | if seen[id] then |
8 | print(indent..id.." (see above)") |
9 | else |
10 | title = getSnippetTitle(id) |
11 | print(indent..id.. " - "..title) |
12 | seen[id] = true |
13 | |
14 | local refs = getTitleReferences(id) |
15 | --print("Refs: "..tableToString(refs))
|
16 | for r in all(refs) do |
17 | printReferenceTree(r, indent.." ", seen) |
18 | end |
19 | end |
20 | end |
21 | |
22 | print("\nReference tree for "..startID..":\n")
|
23 | |
24 | printReferenceTree(startID, "", {})
|
25 | |
26 | print() |
Began life as a copy of #526
test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1000234 |
| Snippet name: | Print reference tree for #2000044 |
| Eternal ID of this version: | #1000234/1 |
| Text MD5: | bf1bc6377998b898bd3a63f3badd6ec8 |
| Author: | stefan |
| Category: | |
| Type: | Lua code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-03-13 17:42:36 |
| Source code size: | 582 bytes / 26 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 1448 / 307 |
| Referenced in: | [show references] |