<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASignpost%2Findex</id>
	<title>Module:Signpost/index - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASignpost%2Findex"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Signpost/index&amp;action=history"/>
	<updated>2026-04-15T04:12:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Signpost/index&amp;diff=146768&amp;oldid=prev</id>
		<title>imported&gt;MusikBot II: Protected &quot;Module:Signpost/index&quot;: High-risk template or module: 509 transclusions (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Signpost/index&amp;diff=146768&amp;oldid=prev"/>
		<updated>2022-12-03T18:00:21Z</updated>

		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/research/Module:Signpost/index&quot; title=&quot;Module:Signpost/index&quot;&gt;Module:Signpost/index&lt;/a&gt;&amp;quot;: &lt;a href=&quot;https://en.wikipedia.org/wiki/High-risk_templates&quot; class=&quot;extiw&quot; title=&quot;wikipedia:High-risk templates&quot;&gt;High-risk template or module&lt;/a&gt;: 509 transclusions (&lt;a href=&quot;/index.php?title=User:MusikBot_II/TemplateProtector&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:MusikBot II/TemplateProtector (page does not exist)&quot;&gt;more info&lt;/a&gt;) ([Edit=Require autoconfirmed or confirmed access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module processes data from [[Module:Signpost/index]], to be loaded from&lt;br /&gt;
-- [[Module:Signpost]] with mw.loadData.&lt;br /&gt;
&lt;br /&gt;
local PAGE_FORMAT = &amp;#039;Wikipedia:Wikipedia Signpost/%s/%s&amp;#039;&lt;br /&gt;
local INDEX_START_YEAR = 2005&lt;br /&gt;
local INDEX_BASE = &amp;#039;Module:Signpost/index/&amp;#039;&lt;br /&gt;
local ALIASES_MODULE = &amp;#039;Module:Signpost/aliases&amp;#039;&lt;br /&gt;
local insert = table.insert&lt;br /&gt;
local format = string.format&lt;br /&gt;
&lt;br /&gt;
local function makePageName(date, subpage)&lt;br /&gt;
	return format(PAGE_FORMAT, date, subpage)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addSubtable(tIn, tOut, key)&lt;br /&gt;
	tOut[key] = tOut[key] or {}&lt;br /&gt;
	insert(tOut[key], tIn)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function maybeRequire(page)&lt;br /&gt;
	local success, module = pcall(require, page)&lt;br /&gt;
	if success then&lt;br /&gt;
		return module&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getYearIndexes()&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for i = INDEX_START_YEAR, os.date(&amp;#039;*t&amp;#039;).year + 1 do&lt;br /&gt;
		local module = maybeRequire(INDEX_BASE .. tostring(i))&lt;br /&gt;
		insert(ret, module)&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makeAliases()&lt;br /&gt;
	local aliasData = require(ALIASES_MODULE)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for key, aliases in pairs(aliasData) do&lt;br /&gt;
		for i, alias in ipairs(aliases) do&lt;br /&gt;
			ret[alias] = key&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addArticleToIndex(index, article, sortKey)&lt;br /&gt;
	article.sortKey = sortKey&lt;br /&gt;
	index.list[sortKey] = article&lt;br /&gt;
&lt;br /&gt;
	local date = article.date&lt;br /&gt;
	addSubtable(article, index.dates, date)&lt;br /&gt;
&lt;br /&gt;
	local page = makePageName(date, article.subpage)&lt;br /&gt;
	article.page = page&lt;br /&gt;
	index.pages[page] = article&lt;br /&gt;
&lt;br /&gt;
	article.tags = article.tags or {}&lt;br /&gt;
	for l, tag in ipairs(article.tags) do&lt;br /&gt;
		addSubtable(article, index.tags, tag)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	article.authors = article.authors or {}&lt;br /&gt;
	for l, author in ipairs(article.authors) do&lt;br /&gt;
		addSubtable(article, index.authors, author)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function main()&lt;br /&gt;
	local index = {&lt;br /&gt;
		aliases = makeAliases(),&lt;br /&gt;
		authors = {},&lt;br /&gt;
		dates = {},&lt;br /&gt;
		list = {},&lt;br /&gt;
		pages = {},&lt;br /&gt;
		tags = {},&lt;br /&gt;
	}&lt;br /&gt;
	local sortKey = 0&lt;br /&gt;
	for j, yearIndex in ipairs(getYearIndexes()) do&lt;br /&gt;
		for k, article in ipairs(yearIndex) do&lt;br /&gt;
			sortKey = sortKey + 1&lt;br /&gt;
			addArticleToIndex(index, article, sortKey)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return index&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return main()&lt;/div&gt;</summary>
		<author><name>imported&gt;MusikBot II</name></author>
	</entry>
</feed>