Modul:Benutzer:Gadacz/ra
Zur Navigation springen
Zur Suche springen
Die Dokumentation für dieses Modul kann unter Modul:Benutzer:Gadacz/ra/Doku erstellt werden
local p = {} -- transfer array
function nowiex(txt,frame)
local ord
txt = mw.text.unstrip(txt) -- problems with <ref>!!
for ord in string.gmatch(txt, "%{.%{[^|^}]+%|[^}]*}}") do
txt = string.gsub(txt, ord, string.gsub(ord, "%|", "@"))
end -- for ord
txt = string.gsub(txt, "||", "\n|") -- Doppelpipes in Tabellen umsetzen
txt = string.gsub(txt, "<", "<")
txt = string.gsub(txt, ">", ">")
return frame:preprocess(txt)
end --function nowiex
function rank(txt)
if not txt then txt="§" end
local n = 1
local r = "{#{}"
for word in string.gmatch(txt, "{#{}") do
txt = string.gsub(txt, word, n, 1)
n = n + 1
end --- for word in
return txt
end -- function rank
function p.f(frame)
local numval, maximum, kontrast, hell , minimum = 0, 10, 25, 100, 0
local stringval, orient, anhang, sort, erg , class, css, style = '', '', '', '', '', '','', ''
local ft
frame = frame:getParent() -- first call up the transferred parameters
for key, val in pairs(frame.args) do -- assign individual parameters
if key == "1" or key == 'V' or key == 'W' then text = nowiex(val,frame) -- frame:preprocess(mw.text.unstripNoWiki(val))-- ; txt='</nowiki>' .. text-- processes all contained templates into values
--if key == "1" or key == 'V' or key == 'W' then text = templatevalues(val) -- processes all contained templates into values
elseif key == "2" or key == 'F' then format = val --[[ General formatting
of the numbers (# of digits, decimal places, signs, characters,
such as $ € km³ % ... --]]
end -- if key
end -- for key
text = rank(text)
return text
end -- function p.f(frame)
return p