Jump to content

Module:Signpost/archives index

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by R1F4T (talk | contribs) at 12:17, 29 May 2025 (Created page with 'local p = {} local start = 2005 local finish = 2105 local output = {} local count = 0 local function catexists(title) return mw.title.new(title, 'Category').exists end function p.main(frame) for year = start, finish do local link = bn(string.format("Wikipedia:Wikipedia Signpost/Archives/%d", year)) local display = year if catexists(link) then local entry = string.format("%s", link, display) count = count + 1 if count % 10 t...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
local p = {}
local start = 2005
local finish = 2105
local output = {}
local count = 0

local function catexists(title)
	return mw.title.new(title, 'Category').exists
end

function p.main(frame)
	
	for year = start, finish do
		local link = bn(string.format("Wikipedia:Wikipedia Signpost/Archives/%d", year))
		local display = year

		if catexists(link) then
			local entry = string.format("[[%s|%s]]", link, display)
			count = count + 1
        if count % 10 then
				entry = entry .. "<br/>"
		end
			table.insert(output, entry)
		end
	end

	return table.concat(output, "\n")
end

return p