Volatile:SearchFL
From Metabolomics.JP
				
								
				(Difference between revisions)
				
																
				
				
								
				| Line 201: | Line 201: | ||
{{#if: {{#get:34[]}}{{#get:56[]}}{{#get:5[]}}{{#get:6[]}}{{#get:7[]}}{{#get:8[]}}{{#get:9[]}}|  | {{#if: {{#get:34[]}}{{#get:56[]}}{{#get:5[]}}{{#get:6[]}}{{#get:7[]}}{{#get:8[]}}{{#get:9[]}}|  | ||
| + | <!--  | ||
| + | {{Volatile:Search|FL  | ||
| + |  {{#if: {{#get:34[]}}|[{{#get:34[]}}]|__}}  | ||
| + |  {{#if: {{#get:5[]}}|{{#get:5[]}}|_}}  | ||
| + |  {{#if: {{#get:6[]}}|{{#get:6[]}}|_}}  | ||
| + |  {{#if: {{#get:7[]}}|{{#get:7[]}}|_}}  | ||
| + |  {{#if: {{#get:8[]}}|{{#get:8[]}}|_}}  | ||
| + |  {{#if: {{#get:9[]}}|{{#get:9[]}}|_}}___|50|0}}  | ||
| + | }}-->  | ||
| − | {{Volatile:Search|  | + | {{Volatile:Search|{{#lua:  | 
| + | --%% 34桁目 %%--  | ||
| + | local searchid, id  | ||
| + | searchid = "FL"  | ||
| + | if(string.len("{{#get:34[]}}") == 0) then  | ||
| + |   searchid = searchid .. ".."  | ||
| + | else  | ||
| + |   local id3s, id4s  | ||
| + |   id3s = ""  | ||
| + |   id4s = ""  | ||
| + |   for id in string.gmatch("{{#get:34[]}}", "%S+") do  | ||
| + |     id3s = id3s .. string.sub(id, 1, 1)  | ||
| + |     id4s = id4s .. string.sub(id, 2, 2)  | ||
| + |   end  | ||
| + |   searchid = searchid .. "[" .. id3s .. "][" .. id4s .. "]"  | ||
| + | end  | ||
| + | |||
| + | --%% 56桁目 %%--  | ||
| + | local id5s, id6s  | ||
| + | id5s = ""  | ||
| + | id6s = ""  | ||
| + | if(string.len("{{#get:5[]}}") > 0) then  | ||
| + |   id5s = "[" .. string.gsub("{{#get:5[]}}", " ", "")  | ||
| + | end  | ||
| + | if(string.len("{{#get:6[]}}") > 0) then  | ||
| + |   id6s = "[" .. string.gsub("{{#get:6[]}}", " ", "")  | ||
| + | end  | ||
| + | if(string.len("{{#get:56[]}}") == 0) then  | ||
| + |   if(string.len(id5s) == 0) then  | ||
| + |     id5s = ".";  | ||
| + |   else  | ||
| + |     id5s = id5s .. "]";  | ||
| + |   end  | ||
| + |   if(string.len(id6s) == 0) then  | ||
| + |     id6s = ".";  | ||
| + |   else  | ||
| + |     id6s = id6s .. "]";  | ||
| + |   end  | ||
| + | else  | ||
| + |   if(string.len(id5s) == 0) then  | ||
| + |     id5s = "[";  | ||
| + |   end  | ||
| + |   if(string.len(id6s) == 0) then  | ||
| + |     id6s = "[";  | ||
| + |   end  | ||
| + |   for id in string.gmatch("{{#get:56[]}}", "%S+") do  | ||
| + |     id5s = id5s .. string.sub(id, 1, 1)  | ||
| + |     id6s = id6s .. string.sub(id, 2, 2)  | ||
| + |   end  | ||
| + |   id5s = id5s .. "]";  | ||
| + |   id6s = id6s .. "]";  | ||
| + | end  | ||
| + | searchid = searchid .. id5s .. id6s  | ||
| + | |||
| + | --%% 7桁目 %%--  | ||
| + | if(string.len("{{#get:7[]}}") == 0) then  | ||
| + |   searchid = searchid .. "."  | ||
| + | else  | ||
| + |   searchid = searchid .. "[" .. string.gsub("{{#get:7[]}}", " ", "") .. "]"  | ||
| + | end  | ||
| + | |||
| + | --%% 8桁目 %%--  | ||
| + | if(string.len("{{#get:8[]}}") == 0) then  | ||
| + |   searchid = searchid .. "."  | ||
| + | else  | ||
| + |   searchid = searchid .. "[" .. string.gsub("{{#get:8[]}}", " ", "") .. "]"  | ||
| + | end  | ||
| + | |||
| + | --%% 9桁目 %%--  | ||
| + | if(string.len("{{#get:9[]}}") == 0) then  | ||
| + |   searchid = searchid .. "."  | ||
| + | else  | ||
| + |   searchid = searchid .. "[" .. string.gsub("{{#get:9[]}}", " ", "") .. "]"  | ||
| + | end  | ||
| + | |||
| + | print(searchid .. "...")  | ||
| + | |}}|50|0}}  | ||
}}  | }}  | ||
Revision as of 22:38, 25 January 2009