<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://media.battlestarwiki.org/Module:ReadingTime/history?feed=atom</id>
	<title>Module:ReadingTime - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://media.battlestarwiki.org/Module:ReadingTime/history?feed=atom"/>
	<link rel="alternate" type="text/html" href="https://media.battlestarwiki.org/Module:ReadingTime/history"/>
	<updated>2026-05-13T13:37:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://media.battlestarwiki.org/w/index.php?title=Module:ReadingTime&amp;diff=109796&amp;oldid=prev</id>
		<title>Joe Beaudoin Jr.: Created page with &quot;local p = {}  function p.getReadingTime(frame)     -- Get the content of the current page     local title = mw.title.getCurrentTitle()     local content = title:getContent()          if not content then return &quot;1 min&quot; end      -- Strip out some wiki-markup to get a cleaner word count     -- This removes HTML comments, category links, and some formatting     local cleanContent = content:gsub(&quot;&lt;!%-%-.-%-%-&gt;&quot;, &quot;&quot;)                                :gsub(&quot;%[%[Category:.-%]%]&quot;,...&quot;</title>
		<link rel="alternate" type="text/html" href="https://media.battlestarwiki.org/w/index.php?title=Module:ReadingTime&amp;diff=109796&amp;oldid=prev"/>
		<updated>2026-03-08T17:36:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  function p.getReadingTime(frame)     -- Get the content of the current page     local title = mw.title.getCurrentTitle()     local content = title:getContent()          if not content then return &amp;quot;1 min&amp;quot; end      -- Strip out some wiki-markup to get a cleaner word count     -- This removes HTML comments, category links, and some formatting     local cleanContent = content:gsub(&amp;quot;&amp;lt;!%-%-.-%-%-&amp;gt;&amp;quot;, &amp;quot;&amp;quot;)                                :gsub(&amp;quot;%[%[Category:.-%]%]&amp;quot;,...&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.getReadingTime(frame)&lt;br /&gt;
    -- Get the content of the current page&lt;br /&gt;
    local title = mw.title.getCurrentTitle()&lt;br /&gt;
    local content = title:getContent()&lt;br /&gt;
    &lt;br /&gt;
    if not content then return &amp;quot;1 min&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
    -- Strip out some wiki-markup to get a cleaner word count&lt;br /&gt;
    -- This removes HTML comments, category links, and some formatting&lt;br /&gt;
    local cleanContent = content:gsub(&amp;quot;&amp;lt;!%-%-.-%-%-&amp;gt;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
                               :gsub(&amp;quot;%[%[Category:.-%]%]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
                               :gsub(&amp;quot;%[%[File:.-%]%]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    -- Count words (simple whitespace split)&lt;br /&gt;
    local _, wordCount = cleanContent:gsub(&amp;quot;%S+&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    -- Average reading speed (200-250 words per minute)&lt;br /&gt;
    local wpm = 225&lt;br /&gt;
    local minutes = math.ceil(wordCount / wpm)&lt;br /&gt;
    &lt;br /&gt;
    if minutes &amp;lt; 1 then minutes = 1 end&lt;br /&gt;
    &lt;br /&gt;
    return minutes .. &amp;quot; min read&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Joe Beaudoin Jr.</name></author>
	</entry>
</feed>