词条 | Module:NYC bus link |
释义 | require('Module:No globals'); local getArgs = require('Module:Arguments').getArgs local p = {} function p.getLink(frame) local args = getArgs(frame); local result = {}; local city;
args.city = args.city:lower();
if 'nyc' == args.city then city = 'New York City bus'; elseif 'li' == args.city then city = 'Long Island bus'; elseif 'nj' == args.city then city = 'New Jersey bus'; else return table.concat ({'unexpected city: ', args.city, ''}) end
for _, name in ipairs (args) do table.insert (result, table.concat ({'', name, ''})) end
if ('yes' == args.prose) or ('y' == args.prose) then return mw.text.listToText (result); else return table.concat (result, ', '); end end return p; |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。