Volatile:AuthorSummary

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
m
 
(18 intermediate revisions by one user not shown)
Line 1: Line 1:
 
{{#def:name|{{#replace:{{{1|Author}}}|_| }}}}
 
{{#def:name|{{#replace:{{{1|Author}}}|_| }}}}
{{#def:reflist|{{#SearchTitle:{{{1|Author}}}|Reference}}}}
+
{{#def:namespace|{{{2|Reference}}}}}
 +
{{#def:reflist|{{#SearchTitle:{{{1|Author}}}|{{{2|Reference}}} }}}}
 
{{#def:refnum|{{#count:{{#var:reflist}}}}}}
 
{{#def:refnum|{{#count:{{#var:reflist}}}}}}
 
{{#def:affiliations|{{#SearchLine:{{#var:name}}|Reference|Country%}}|&&}}
 
{{#def:affiliations|{{#SearchLine:{{#var:name}}|Reference|Country%}}|&&}}
  
{{Flavonoid/Header}}
+
{{#ifeq:{{{2|Reference}}}|Reference|{{Flavonoid/Header}}|{{CrudeDrug/Header}}}}
  
 
=={{#var:name}} ... author of {{#var:refnum}} paper{{#ifexpr:{{#var:refnum}}<2||s}}==
 
=={{#var:name}} ... author of {{#var:refnum}} paper{{#ifexpr:{{#var:refnum}}<2||s}}==
Line 21: Line 22:
 
   local first = 10000
 
   local first = 10000
 
   local last = 0
 
   local last = 0
   for au, ja, yr in stdin:gmatch("([%a:_]+),([%a_\.]+),(%d+),(%d+)")
+
   for au, ja, yr in stdin:gmatch("[\n]?([^,0-9]+),([^,]+),(%d+),(%d+)")
 
         do table.insert(Ja, ja);
 
         do table.insert(Ja, ja);
 
         yr = tonumber(yr)
 
         yr = tonumber(yr)
Line 65: Line 66:
 
<div style="column-count:3; -moz-column-count:3;">
 
<div style="column-count:3; -moz-column-count:3;">
 
{{#lua:
 
{{#lua:
   local author = stdin:gmatch("%S+");
+
   local author = "{{{1|Author}}}"
 
   local Au = {}; -- authors
 
   local Au = {}; -- authors
 
   local count =0;
 
   local count =0;
 
   local total =0;
 
   local total =0;
 
   local paper =0.0;
 
   local paper =0.0;
   for aus, ja, yr in stdin:gmatch("([%a:_]+),([%a_\.]+),(%d+),(%d+)") do
+
   for aus, ja, yr in stdin:gmatch("[\n]?([^,0-9]+),([^,]+),(%d+),(%d+)") do
 
     paper = paper + 1;
 
     paper = paper + 1;
     for au in string.gmatch(aus,"[%a_]+") do
+
     for au in string.gmatch(aus,"[^:]+") do
 
       if (author ~= au) then
 
       if (author ~= au) then
 
         if (Au[au] == null)
 
         if (Au[au] == null)
Line 85: Line 86:
 
   .. string.format("%.1f",total / paper) .. " / report)\n";
 
   .. string.format("%.1f",total / paper) .. " / report)\n";
 
   for k, v in pairs(Au) do
 
   for k, v in pairs(Au) do
     output = output .. "# [[Volatile:AuthorSummary?my_1=" .. k .. " " .. k .. " (" .. v .. ")]]\n";
+
     output = output .. "# [[Volatile:AuthorSummary?my_1=" .. k .. "&my_2={{{2|Reference}}}" .. " " .. k .. " (" .. v .. ")]]\n";
 
   end
 
   end
 
   print(output);
 
   print(output);
|{{{1|Author}}} {{#var:reflist}}
+
|{{#var:reflist}}
 
}}
 
}}
 
</div>
 
</div>

Latest revision as of 13:29, 30 August 2010




Crude-drug Top
Gallery
General Index Names Prescriptions Books Journals Terminology Chinese Medicines

[edit] ... author of 0 paper

Affiliation

  • [[Reference:Country/|]]


Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox