Module:Wikipedia ads/data

MyWikiBiz, Author Your Legacy — Tuesday December 24, 2024
< Module:Wikipedia ads
Revision as of 08:00, 16 July 2021 by Zoran (talk | contribs) (Pywikibot 6.4.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Documentation for this module may be created at Module:Wikipedia ads/data/doc

-- This module transforms [[Module:Wikipedia ads/list]] into a format to be
-- used by mw.loadData.

local LIST_MODULE = 'Module:Wikipedia ads/list'

local list = require(LIST_MODULE)
local ids = {}
for i, t in ipairs(list) do
	assert(t.id, string.format(
		"no 'id' field in table %d in [[%s]]",
		i, LIST_MODULE
	))
	ids[t.id] = t
end
return {list = list, ids = ids, noAds = #list}