Difference between revisions of "Module:Good article topics"
MyWikiBiz, Author Your Legacy — Saturday October 25, 2025
Jump to navigationJump to search (Pywikibot 6.4.0) |
(No difference)
|
Latest revision as of 21:53, 15 July 2021
This module implements Template:GA/Topic; please see the template page for documentation.
The topic name data is stored at Module:Good article topics/data.
-- This module implements {{GA/Topic}}.
local p = {}
function p.main(frame)
local topic = frame:getParent().args[1]
if not topic then
return ''
end
topic = topic:match('^%s*(.-)%s*$') -- Trim whitespace
local ret
if topic ~= '' then
ret = p._main(topic)
end
ret = ret or ''
return ret
end
function p._main(topic)
topic = topic:lower()
local data = mw.loadData('Module:Good article topics/data')
return data[topic]
end
return p