Volatile:ListField
{{#lua:
function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end list = {} id = {} for page,data in stdin:gmatch("&&([%S]+)&&{{{1}}}= *([^\n]+)") do if ((data ~= "-") and (data ~= " ")) then data = trim(data) tmp = list[data] if (tmp == nil) then list[data] = { page } table.insert(id, data) else table.insert(tmp, page) end end end table.sort(id) for _,v in ipairs(id) do print("* {{{1}}} " .. v .. "") table.sort(list[v]) local f = true for i = 1,table.getn(list[v]) do if list[v][i] ~= list[v][i + 1] then print("[[{{{2}}}:" .. list[v][i] .."|".. list[v][i] .."]]") end end end
|
}}