get("#175") -- tableToString
get("#349") -- table functions
startID = "#2000044"
function printReferenceTree(id, indent, seen)
if seen[id] then
print(indent..id.." (see above)")
else
title = getSnippetTitle(id)
print(indent..id.. " - "..title)
seen[id] = true
local refs = getTitleReferences(id)
--print("Refs: "..tableToString(refs))
for r in all(refs) do
printReferenceTree(r, indent.." ", seen)
end
end
end
print("\nReference tree for "..startID..":\n")
printReferenceTree(startID, "", {})
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: | 1443 / 306 |
| Referenced in: | [show references] |