Module:AfC topic

local getArgs = require('Module:Arguments').getArgs

local p = {}

function p.main(frame) local args = getArgs(frame) return p._main(args) end

function p._main(args) local ns = mw.title.getCurrentTitle.namespace if ns ~= 118 and ns ~= 2 then return '' end local jsondata = mw.title.new('Wikipedia:WikiProject Articles for creation/AfC topic map.json'):getContent local data = mw.text.jsonDecode(jsondata) local topic = args[1] local match = data[topic] if match ~= nil then return '' else return '' end end

return p