local p = local getArgs = require('Module:Arguments').getArgs
function p._main(args) local data = require('Module:IPA symbol/data') local ret = local obj table.insert(ret, '
Name\n') table.insert(ret, '! Symbols\n') table.insert(ret, ' | Wiki page\n') table.insert(ret, '! Redirect target\n') table.insert(ret, ' | Sound file\n') table.insert(ret, '! Type\n') table.insert(ret, ' | X-SAMPA\n') for k, v in pairs(data.correspondences) do table.insert(ret, ' | -\n | ') table.insert(ret, k) table.insert(ret, '\n | ') if v.symbols then table.insert(ret, '')
table.insert(ret, table.concat(v.symbols, ' , '))
table.insert(ret, ' ') end table.insert(ret, '\n | ') if v.wikipage and v.wikipage ~= then table.insert(ret, string.format('%s', v.wikipage)) end table.insert(ret, '\n | ') local obj = mw.title.new(v.wikipage) if obj and obj.isRedirect then obj = obj:getContent obj = string.match(obj, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*(%[%[[^%]]-%]%])" ) table.insert(ret, obj) end table.insert(ret, '\n | ') if v.soundfile and v.soundfile ~= then table.insert(ret, string.format('%s', v.soundfile, v.soundfile)) end table.insert(ret, '\n | ') if v.type and v.tpe ~= then table.insert(ret, v.type) end table.insert(ret, '\n | ') if v.XSAMPA and v.XSAMPA ~= then table.insert(ret, string.format('%s ', mw.text.nowiki(v.XSAMPA))) end table.insert(ret, '\n') end table.insert(ret, ' |
---|
function p.main(frame) local args = getArgs(frame,) return frame:preprocessend
return p