mNo edit summary |
mNo edit summary |
||
Line 18: | Line 18: | ||
:tag( 'tr' ) | :tag( 'tr' ) | ||
:tag ('td' ) | :tag ('td' ) | ||
:wikitext( k .. '=' .. v ); | :wikitext( k .. '->' .. v[1] .. '=' .. v[2]); | ||
end | end | ||
for k,v in pairs( outputsDecode ) do | for k,v in pairs( outputsDecode ) do | ||
Line 24: | Line 24: | ||
:tag( 'tr' ) | :tag( 'tr' ) | ||
:tag ('td' ) | :tag ('td' ) | ||
:wikitext( k .. '=' .. v ); | :wikitext( k .. '->' .. v[1] .. '=' .. v[2]); | ||
end | end | ||
return tostring( protofluxContainer ); | return tostring( protofluxContainer ); | ||
Line 31: | Line 31: | ||
function CreateIORow(Container, InputName, InputType, OutputName, OutputType) | function CreateIORow(Container, InputName, InputType, OutputName, OutputType) | ||
end | end | ||
return p | return p |
Revision as of 02:59, 13 January 2024
Documentation for this module may be created at Module:Test/doc
local p = {}
function p.ProtoFlux( frame )
local inputsDecode = mw.text.jsonDecode( frame.args.Inputs );
local outputsDecode = mw.text.jsonDecode( frame.args.Outputs );
local numInputs = #inputsDecode;
local numOuputs = #outputsDecode;
local protofluxContainer = mw.html.create( 'table' )
protofluxContainer
:tag( 'tr' )
:tag( 'th' )
:wikitext(frame.args.Name);
for k,v in pairs( inputsDecode ) do
protofluxContainer
:tag( 'tr' )
:tag ('td' )
:wikitext( k .. '->' .. v[1] .. '=' .. v[2]);
end
for k,v in pairs( outputsDecode ) do
protofluxContainer
:tag( 'tr' )
:tag ('td' )
:wikitext( k .. '->' .. v[1] .. '=' .. v[2]);
end
return tostring( protofluxContainer );
end
function CreateIORow(Container, InputName, InputType, OutputName, OutputType)
end
return p