Module:CustomScript

--Vespian Database Wiki Custom Language Conversion --http://vespiandatabase.wikia.com/ --Initial wikitext implementation by User:Flaicher --Lua conversion by User:ChickenBar --Modified for Conworlds Wiki by User:Vivaporius

local p = {}

local CharData = mw.loadData( 'Module:CustomScript/data' )

function p._vespian( humanwords, size ) local output_string = {} local humanwords = string.lower(humanwords) local span = mw.html.create( 'span' ) if (size == nil or size == '') then size='14' end for i=1, string.len(humanwords) do       local replacement = CharData["VespianChar"][humanwords:sub(i,i)] if replacement ~= nil then table.insert(output_string,'') else table.insert(output_string,' ') end end span   :css( 'font-size', size..'px' ) :wikitext( table.concat(output_string) ) return tostring(span) end

function p.vespian( frame ) local string_input = frame.args[1] local num_input = frame.args[2] return p._vespian(string_input, num_input) end return p