https://de.seminaverbi.bibleget.io/w/index.php?title=Modul:ChartColors&feed=atom&action=history
Modul:ChartColors - Versionsgeschichte
2024-03-29T13:43:18Z
Versionsgeschichte dieser Seite in Die Samen von das Wort
MediaWiki 1.41.0
https://de.seminaverbi.bibleget.io/w/index.php?title=Modul:ChartColors&diff=103&oldid=prev
Johnrdorazio: 1 Version importiert
2020-08-29T22:15:21Z
<p>1 Version importiert</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="de">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 29. August 2020, 22:15 Uhr</td>
</tr><tr><td colspan="4" class="diff-notice" lang="de"><div class="mw-diff-empty">(kein Unterschied)</div>
</td></tr>
<!-- diff cache key seminaverbi_de:diff:1.41:old-102:rev-103 -->
</table>
Johnrdorazio
https://de.seminaverbi.bibleget.io/w/index.php?title=Modul:ChartColors&diff=102&oldid=prev
de>ProcrastinatingReader: not used? Wikipedia_talk%3ALua#Help_find_and_remove_a_testing_module
2020-07-23T12:01:39Z
<p>not used? <a href="/w/index.php?title=Wikipedia_talk:Lua&action=edit&redlink=1" class="new" title="Wikipedia talk:Lua (Seite nicht vorhanden)">Wikipedia_talk:Lua#Help_find_and_remove_a_testing_module</a></p>
<p><b>Neue Seite</b></p><div>local p = {}<br />
<br />
local ARG = require "Module:Arguments"<br />
local CFCM = require "Module:ComplForColorModules"<br />
local TNTT = require "Module:TNTTools"<br />
--local SD = require "Module:SimpleDebug"<br />
<br />
local I18n = 'ChartColors'<br />
<br />
local function I18nStr (S, ...)<br />
return TNTT.GetMsgP (I18n, S, {...})<br />
end<br />
<br />
--local RS_ColorNameInvalid = 'El nom del color (%s) no és vàlid (ha de ser Categ20 o Plotter)'<br />
--local RS_ColorNumInvalid = 'El nombre de colors hauria d’estar entre 1 i %d (ara és %d)'<br />
--local RS_StartNumInvalid = 'El número del primer color hauria d’estar entre 1 i %d (ara és %d)'<br />
<br />
local category20 = {<br />
'#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', '#98df8a', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', <br />
'#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5',<br />
}<br />
local plotter = {--from Module:Plotter/DefaultColors<br />
'red', 'blue', 'green', 'yellow', 'fuchsia', 'aqua', 'brown', 'orange', 'purple', 'sienna',<br />
'#F0A3FF', '#191919', '#005C31', 'honeydew', '#808080', 'khaki', 'lime', 'navy', 'pink', '#426600',<br />
'#5EF1F2', 'turquoise', '#E0FF66', 'violet', '#FFFF80', '#FF5005',<br />
}<br />
<br />
function p.GetColors (ColorName, IsInv, StartN, N, CallError)<br />
local SelColors = {}<br />
local ColorNameL = string.lower(ColorName)<br />
local Palet0 = {}<br />
if ColorNameL == 'categ20' then<br />
Palet0 = category20<br />
elseif ColorNameL == 'plotter' then<br />
Palet0 = plotter <br />
elseif CallError then <br />
error (I18nStr ('ColorNameInvalid',ColorName))<br />
end <br />
MaxN = table.getn(Palet0)<br />
if (N < 0) or (N > MaxN) then<br />
error (I18nStr ('ColorNumInvalid',tostring(MaxN),tostring(N)))<br />
else<br />
Palet = {}<br />
if IsInv then<br />
for i=MaxN, 1, -1 do<br />
table.insert(Palet, Palet0[i])<br />
end <br />
else<br />
Palet = Palet0<br />
end<br />
if StartN > MaxN then<br />
error (I18nStr ('StartNumInvalid',tostring(MaxN),tostring(StartN)))<br />
end <br />
local Step = 1<br />
local NEnd = N<br />
if (ColorNameL == 'categ20') and (N<=10) then <br />
Step = 2<br />
if StartN == 1 then<br />
NEnd = N*2<br />
end <br />
end <br />
if StartN == 1 then<br />
for i=1, NEnd, Step do<br />
table.insert(SelColors, Palet[i])<br />
end<br />
else<br />
Count = 0<br />
for i=StartN, MaxN, Step do<br />
table.insert(SelColors, Palet[i])<br />
Count = Count + 1<br />
if Count == NEnd then<br />
break<br />
end <br />
end<br />
if Count < NEnd then<br />
for i=1, MaxN, Step do<br />
table.insert(SelColors, Palet[i])<br />
Count = Count + 1<br />
if Count == NEnd then<br />
break<br />
end <br />
end<br />
end <br />
end <br />
return SelColors<br />
end <br />
end --GetColors<br />
<br />
function p.ColorNameInvStartFromS (S)<br />
local StartN = 1<br />
local ParamsA = {}<br />
local ColorName, IsInv<br />
ColorName, IsInv, ParamsA = CFCM.ColorNameInvFromS0 (S)<br />
local PN = table.getn(ParamsA)<br />
if PN > 1 then<br />
if ParamsA[2]=='i' then<br />
IsInv = true<br />
else<br />
StartN = tonumber (ParamsA[2])<br />
end<br />
if PN == 3 then<br />
StartN = tonumber (ParamsA[3])<br />
end <br />
end <br />
return ColorName, IsInv, StartN <br />
end --ColorNameInvStartFromS<br />
<br />
function ColorNameInv (args)<br />
local S = args[1] or ''<br />
local ColorName, IsInv, ParamsA = CFCM.ColorNameInvFromS0 (S)<br />
local StartN = 1<br />
ColorName, IsInv, StartN = p.ColorNameInvStartFromS (S)<br />
return ColorName, IsInv, StartN <br />
end --ColorNameInv <br />
<br />
function p.ShowColors(frame)<br />
local args = ARG.getArgs(frame,{<br />
removeBlanks = false<br />
});<br />
local ColorName, IsInv, StartN = ColorNameInv (args)<br />
local N = tonumber(args[2])<br />
local WriteColor = args[3] or ""<br />
local ColorFound = {}<br />
ColorFound = p.GetColors (ColorName, IsInv, StartN, N, true)<br />
local boxes = {}<br />
for i=1, table.getn(ColorFound) do<br />
table.insert(boxes, CFCM.Box(ColorFound[i],WriteColor))<br />
end <br />
return table.concat(boxes, " ")<br />
end --ShowColors<br />
<br />
function p.Legends(frame)<br />
local args = ARG.getArgs(frame,{<br />
removeBlanks = false<br />
})<br />
local Nargs = require("Module:TableTools").length(args)<br />
local ColorName, IsInv, StartN = ColorNameInv (args)<br />
local N = tonumber(args[2])<br />
local ColWidth = args[3]<br />
local ColorFound = {}<br />
local Labels = {}<br />
local NLabels = 0<br />
local IsTemplate = true<br />
ColorFound = p.GetColors (ColorName, IsInv, StartN, N, true)<br />
Labels, NLabels, OutlineColor = CFCM.GetLabels (args, N, 4)<br />
return CFCM.LegendText (ColorFound, Labels, NLabels, ColWidth, IsTemplate, OutlineColor)<br />
end <br />
<br />
return p</div>
de>ProcrastinatingReader