Template:Index/name
From Metabolomics.JP
(Difference between revisions)
| Line 1: | Line 1: | ||
| − | <noinclude>名前のインデクス {{{1}}} | + | <noinclude>名前のインデクス {{{1}}} 値(文字列) {{{2}}} ページタイトル (FL/LB/..)</noinclude> |
Last updated: {{REVISIONTIMESTAMP}} | Last updated: {{REVISIONTIMESTAMP}} | ||
| − | |||
{| width=100% | {| width=100% | ||
|- | |- | ||
| − | |align=left| {{ | + | |align=left| {{#persist:FLindex (name)|Name|Index/name|2|{{{1}}};FL}} |
| − | + | |align=center| [[Index:{{{2}}}]] | |
| − | + | |align=right| {{#persist:FLindex (name)|Name|Index/name|2|{{{1}}};FL}} | |
| − | + | |} | |
| − | + | ||
| − | + | {{#lua: | |
| − | + | local common = {"methoxy", "hydroxy", "acid", "acetyl", "amino", "alpha", "acetyloxy", }; | |
| − | + | local key = stdin:match("%w+"); | |
| − | + | local H = {}; | |
| − | + | 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; | |
| − | + | else | |
| − | + | H[term] = H[term] .. ";" .. id; | |
| − | |Index/name| | + | end |
| − | |align=center| [[Index:{{{ | + | end |
| − | |align=right| {{ | + | |
| − | local | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
end | end | ||
end | end | ||
| − | + | table.sort(H); | |
| − | + | local ret = ""; | |
| − | + | for k,v in pairs(H) do | |
| − | + | ret = ret .. "*" .. k; | |
| − | + | for i in string:gmatch("%w+") do | |
| − | + | ret = ret .. "[[" .. i .."]] "; | |
| − | + | ||
end | end | ||
| + | ret = ret .. "\n"; | ||
end | end | ||
| − | + | print(ret); | |
| − | + | | | |
| − | + | {{{1|a}}} {{#SearchLine:Common Name=||{{{2}}}%}} | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | print( | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
}} | }} | ||
| − | |||
| − | |||
Revision as of 19:23, 1 October 2008
名前のインデクス {{{1}}} 値(文字列) {{{2}}} ページタイトル (FL/LB/..) Last updated: 20081001192351
| [[Index:{{{2}}}]] |