Template:Index/name
From Metabolomics.JP
(Difference between revisions)
(26 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>名前のインデクス {{{1}}} | + | <noinclude>名前のインデクス {{{1}}} 値(文字列) {{{2}}} ページタイトル (FL/LB/..)</noinclude> |
− | + | {{Warning/Persist}} | |
− | < | + | <small>Note: words of less than 4 letters are excluded from the index.</small> |
{| width=100% | {| width=100% | ||
|- | |- | ||
− | |align=left| {{ | + | |align=left| {{#persist:{{{2}}}index/name {{PrevLetter|{{{1}}}}}|go to Index {{PrevLetter|{{{1}}}}}|Index/name|2|{{PrevLetter|{{{1}}}}};{{{2}}}}} |
− | + | |align=center| [[Index:{{{2}}}|<big>Back to Index</big>]] | |
− | + | |align=right| {{#persist:{{{2}}}index/name {{PrevLetter|{{{1}}}}}|go to Index {{NextLetter|{{{1}}}}}|Index/name|2|{{NextLetter|{{{1}}}}};{{{2}}}}} | |
− | + | |} | |
− | + | <hr> | |
− | + | {{#lua: | |
− | + | local key = stdin:match("%w+"); | |
− | + | local H = {}; | |
− | + | local I = {}; | |
− | |{{ | + | for id, name in stdin:gmatch("&&(%w+).Common Name=&&(%S+)") do |
− | + | name = string.lower(name); | |
− | + | for term in string.gmatch(name,"(%a+)") do | |
− | + | if ((string.len(term) > 3) and | |
− | + | (string.sub(term,0,1) == key)) then | |
− | + | if (H[term] == nil) then | |
− | + | H[term] = id; table.insert(I, term); | |
− | + | else | |
− | + | H[term] = H[term] .. ";" .. id; | |
− | |Index/name|{{{ | + | end |
− | |align=center| [[Index:{{{ | + | end |
− | |align=right| {{Index | + | |
− | local | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
end | end | ||
end | end | ||
− | + | table.sort(I); | |
− | + | local ret = ""; | |
− | + | for i=1,table.getn(I) do | |
− | + | local k = I[i]; | |
− | + | ret = ret .. "* '''" .. k; | |
− | + | for id in string.gmatch(H[k],"%w+") do | |
− | + | ret = ret .. "''' [[" .. id .."]] "; | |
end | end | ||
+ | ret = ret .. "\n"; | ||
end | end | ||
− | + | print(ret); | |
− | + | | | |
− | + | {{{1}}} {{#SearchLine:Common Name=||{{{2}}}%}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | print( | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
}} | }} | ||
− | + | [[#top]] | |
− | + |
Latest revision as of 02:59, 25 March 2009
名前のインデクス {{{1}}} 値(文字列) {{{2}}} ページタイトル (FL/LB/..)
Do not edit! This page is automatically generated using Persist function (Last updated: 20090325025941).
Note: words of less than 4 letters are excluded from the index.
[[Index:{{{2}}}|Back to Index]] |