<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.teamspec.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ADaily</id>
	<title>Module:Daily - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.teamspec.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ADaily"/>
	<link rel="alternate" type="text/html" href="https://wiki.teamspec.net/index.php?title=Module:Daily&amp;action=history"/>
	<updated>2026-10-28T19:40:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.teamspec.net/index.php?title=Module:Daily&amp;diff=754&amp;oldid=prev</id>
		<title>TeamSpecBot: Daily rotation from a list page</title>
		<link rel="alternate" type="text/html" href="https://wiki.teamspec.net/index.php?title=Module:Daily&amp;diff=754&amp;oldid=prev"/>
		<updated>2026-10-20T22:38:23Z</updated>

		<summary type="html">&lt;p&gt;Daily rotation from a list page&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:38, 20 October 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l28&quot;&gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local entry = entries[ ( day + ( tonumber( args.offset ) or 0 ) ) % #entries + 1 ]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local entry = entries[ ( day + ( tonumber( args.offset ) or 0 ) ) % #entries + 1 ]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local field = tonumber( args.field )&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local field = tonumber( args.field )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;not &lt;/del&gt;field then&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if field then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;return &lt;/del&gt;entry&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		entry &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= mw.text.trim( mw.text.split( entry, &#039;|&#039;, true )[ field ] or &#039;&#039; )&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;local parts = mw.text.split&lt;/del&gt;( entry&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &#039;|&#039;, true )&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;return frame:preprocess&lt;/ins&gt;( entry )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	return mw.text.trim( parts[ field ] or &#039;&#039; &lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;return p&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;return p&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-742:rev-754:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>TeamSpecBot</name></author>
	</entry>
	<entry>
		<id>https://wiki.teamspec.net/index.php?title=Module:Daily&amp;diff=742&amp;oldid=prev</id>
		<title>TeamSpecBot: Daily rotation from a list page</title>
		<link rel="alternate" type="text/html" href="https://wiki.teamspec.net/index.php?title=Module:Daily&amp;diff=742&amp;oldid=prev"/>
		<updated>2026-10-20T22:37:35Z</updated>

		<summary type="html">&lt;p&gt;Daily rotation from a list page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Picks one line of a list page per day, the same line for every visitor.&lt;br /&gt;
-- {{#invoke:Daily|pick|list=Template:Did you know/list}} returns the whole line;&lt;br /&gt;
-- add |field=2 to return the second part of a line split on &amp;quot;|&amp;quot;.&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local SECONDS_PER_DAY = 86400&lt;br /&gt;
&lt;br /&gt;
local function readList( listTitle )&lt;br /&gt;
	local title = mw.title.new( listTitle )&lt;br /&gt;
	local text = title and title:getContent() or &amp;#039;&amp;#039;&lt;br /&gt;
	local entries = {}&lt;br /&gt;
	for line in mw.text.gsplit( text, &amp;#039;\n&amp;#039;, true ) do&lt;br /&gt;
		line = mw.text.trim( ( line:gsub( &amp;#039;^%*+&amp;#039;, &amp;#039;&amp;#039; ) ) )&lt;br /&gt;
		if line ~= &amp;#039;&amp;#039; then&lt;br /&gt;
			entries[ #entries + 1 ] = line&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return entries&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.pick( frame )&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	local entries = readList( args.list or &amp;#039;&amp;#039; )&lt;br /&gt;
	if #entries == 0 then&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	local day = math.floor( tonumber( mw.getContentLanguage():formatDate( &amp;#039;U&amp;#039; ) ) / SECONDS_PER_DAY )&lt;br /&gt;
	local entry = entries[ ( day + ( tonumber( args.offset ) or 0 ) ) % #entries + 1 ]&lt;br /&gt;
	local field = tonumber( args.field )&lt;br /&gt;
	if not field then&lt;br /&gt;
		return entry&lt;br /&gt;
	end&lt;br /&gt;
	local parts = mw.text.split( entry, &amp;#039;|&amp;#039;, true )&lt;br /&gt;
	return mw.text.trim( parts[ field ] or &amp;#039;&amp;#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>TeamSpecBot</name></author>
	</entry>
</feed>