<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.randombell.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ATracklist</id>
	<title>Module:Tracklist - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.randombell.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ATracklist"/>
	<link rel="alternate" type="text/html" href="https://wiki.randombell.com/index.php?title=Module:Tracklist&amp;action=history"/>
	<updated>2026-09-11T14:24:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.randombell.com/index.php?title=Module:Tracklist&amp;diff=3030&amp;oldid=prev</id>
		<title>Randombell: Created page with &quot;local p = {}  function p.main(frame)     local args = frame:getParent().args     local totalSeconds = 0     local output = &#039;&lt;table class=&quot;wikitable&quot;&gt;\n&lt;tr&gt;&lt;th&gt;#&lt;/th&gt;&lt;th&gt;Title&lt;/th&gt;&lt;th&gt;Length&lt;/th&gt;&lt;/tr&gt;\n&#039;          local i = 1     while args[&#039;track&#039; .. i] do         local title = args[&#039;track&#039; .. i]         local length = args[&#039;length&#039; .. i] or &quot;0:00&quot;                  -- Parse MM:SS into seconds         local min, sec = length:match(&quot;(%d+):(%d+)&quot;)         if min and sec then...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.randombell.com/index.php?title=Module:Tracklist&amp;diff=3030&amp;oldid=prev"/>
		<updated>2026-07-15T14:11:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  function p.main(frame)     local args = frame:getParent().args     local totalSeconds = 0     local output = &amp;#039;&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;\n&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;#&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Length&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;#039;          local i = 1     while args[&amp;#039;track&amp;#039; .. i] do         local title = args[&amp;#039;track&amp;#039; .. i]         local length = args[&amp;#039;length&amp;#039; .. i] or &amp;quot;0:00&amp;quot;                  -- Parse MM:SS into seconds         local min, sec = length:match(&amp;quot;(%d+):(%d+)&amp;quot;)         if min and sec then...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
    local args = frame:getParent().args&lt;br /&gt;
    local totalSeconds = 0&lt;br /&gt;
    local output = &amp;#039;&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;\n&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;#&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Length&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    local i = 1&lt;br /&gt;
    while args[&amp;#039;track&amp;#039; .. i] do&lt;br /&gt;
        local title = args[&amp;#039;track&amp;#039; .. i]&lt;br /&gt;
        local length = args[&amp;#039;length&amp;#039; .. i] or &amp;quot;0:00&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        -- Parse MM:SS into seconds&lt;br /&gt;
        local min, sec = length:match(&amp;quot;(%d+):(%d+)&amp;quot;)&lt;br /&gt;
        if min and sec then&lt;br /&gt;
            totalSeconds = totalSeconds + (string.toint(min) * 60) + string.toint(sec)&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        output = output .. string.format(&amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;%d&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;%s&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;%s&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;, i, title, length)&lt;br /&gt;
        i = i + 1&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Format total seconds back to MM:SS or H:MM:SS&lt;br /&gt;
    local totalMin = math.floor(totalSeconds / 60)&lt;br /&gt;
    local totalSec = totalSeconds % 60&lt;br /&gt;
    local totalStr = string.format(&amp;quot;%d:%02d&amp;quot;, totalMin, totalSec)&lt;br /&gt;
    &lt;br /&gt;
    output = output .. string.format(&amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;Total Length&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;%s&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;lt;/table&amp;gt;&amp;#039;, totalStr)&lt;br /&gt;
    &lt;br /&gt;
    return output&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Helper function to safely convert to integer&lt;br /&gt;
function string.toint(str)&lt;br /&gt;
    return tonumber(str) or 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Randombell</name></author>
	</entry>
</feed>