Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sandbox/Nardog/3
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
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, '{| class="wikitable sortable"\n') 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, '<code>') table.insert(ret, table.concat(v.symbols, '</code>, <code>')) table.insert(ret, '</code>') 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('[[:File:%s|%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('<code>%s</code>', mw.text.nowiki(v.XSAMPA))) end table.insert(ret, '\n') end table.insert(ret, '|}') return table.concat(ret) end function p.main(frame) local args = getArgs(frame, {removeBlanks = false}) return frame:preprocess{ text = p._main(args) } end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Sandbox/Nardog/3/doc
(
edit
)