Volatile:ListField
From Metabolomics.JP
(Difference between revisions)
Line 1: | Line 1: | ||
− | <!----List fields of name "<nowiki>{{{1}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>" | + | <!----List fields of name "<nowiki>{{{1}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>"---->{{#lua: |
function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end | function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end | ||
list = {} | list = {} | ||
Line 16: | Line 16: | ||
end | end | ||
table.sort(id) | table.sort(id) | ||
− | local | + | local coff = tonumber("{{{3}}}") |
− | if ( | + | if (coff == nil) then coff =0 else print("Printing lists more than size=" .. coff) end |
for _,v in ipairs(id) do | for _,v in ipairs(id) do | ||
− | --- if (table.getn(list[v]) > | + | --- if (table.getn(list[v]) > coff) then--- |
print("* {{{1}}} '''" .. v .. "'''") | print("* {{{1}}} '''" .. v .. "'''") | ||
table.sort(list[v]) | table.sort(list[v]) |