<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="yi">
	<id>https://yi.hamichlol.org.il/w/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3ANUMBEROF</id>
	<title>יחידה:NUMBEROF - ווערסיע היסטאריע</title>
	<link rel="self" type="application/atom+xml" href="https://yi.hamichlol.org.il/w/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3ANUMBEROF"/>
	<link rel="alternate" type="text/html" href="https://yi.hamichlol.org.il/w/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:NUMBEROF&amp;action=history"/>
	<updated>2026-04-20T23:07:46Z</updated>
	<subtitle>ווערסיע היסטאריע פאר דעם בלאט אויפן וויקי</subtitle>
	<generator>MediaWiki 1.39.4</generator>
	<entry>
		<id>https://yi.hamichlol.org.il/w/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:NUMBEROF&amp;diff=201256&amp;oldid=prev</id>
		<title>תנא קמא: 1 רעוויזיע אימפארטירט פון :wikipedia:he:יחידה:NUMBEROF</title>
		<link rel="alternate" type="text/html" href="https://yi.hamichlol.org.il/w/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:NUMBEROF&amp;diff=201256&amp;oldid=prev"/>
		<updated>2023-02-12T05:20:55Z</updated>

		<summary type="html">&lt;p&gt;1 רעוויזיע אימפארטירט פון &lt;a href=&quot;https://en.wikipedia.org/wiki/he:%D7%99%D7%97%D7%99%D7%93%D7%94:NUMBEROF&quot; class=&quot;extiw&quot; title=&quot;wikipedia:he:יחידה:NUMBEROF&quot;&gt;wikipedia:he:יחידה:NUMBEROF&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;yi&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;→ עלטערע  ווערסיע&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;רעוויזיע פון 05:20, 12 פעברואר 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;yi&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(קיין אונטערשייד)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>תנא קמא</name></author>
	</entry>
	<entry>
		<id>https://yi.hamichlol.org.il/w/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:NUMBEROF&amp;diff=201255&amp;oldid=prev</id>
		<title>wikipedia:he&gt;GreenC: יצירת דף עם התוכן &quot;local function trimArg(arg, i) 	arg = mw.text.trim(arg or '') 	if arg == '' then 		if i then 			error('Parameter ' .. i .. ' is missing. See template documentati...&quot;</title>
		<link rel="alternate" type="text/html" href="https://yi.hamichlol.org.il/w/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:NUMBEROF&amp;diff=201255&amp;oldid=prev"/>
		<updated>2020-06-09T18:01:47Z</updated>

		<summary type="html">&lt;p&gt;יצירת דף עם התוכן &amp;quot;local function trimArg(arg, i) 	arg = mw.text.trim(arg or &amp;#039;&amp;#039;) 	if arg == &amp;#039;&amp;#039; then 		if i then 			error(&amp;#039;Parameter &amp;#039; .. i .. &amp;#039; is missing. See template documentati...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;נייער בלאַט&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local function trimArg(arg, i)&lt;br /&gt;
	arg = mw.text.trim(arg or '')&lt;br /&gt;
	if arg == '' then&lt;br /&gt;
		if i then&lt;br /&gt;
			error('Parameter ' .. i .. ' is missing. See template documentation')&lt;br /&gt;
		end&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	return mw.ustring.lower(arg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getValue(stats, action, map)&lt;br /&gt;
	if action == 'depth' then&lt;br /&gt;
		-- https://meta.wikimedia.org/wiki/Wikipedia_article_depth&lt;br /&gt;
		-- This gives silly results if, for example, the number of articles is small.&lt;br /&gt;
		local n = { 'articles', 'edits', 'pages' }&lt;br /&gt;
		if map then&lt;br /&gt;
			for i, v in ipairs(n) do&lt;br /&gt;
				n[i] = map[v]&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		for i, v in ipairs(n) do&lt;br /&gt;
			n[i] = stats[v] or 0&lt;br /&gt;
		end&lt;br /&gt;
		local articles, edits, pages = n[1], n[2], n[3]&lt;br /&gt;
		if pages == 0 or articles == 0 then&lt;br /&gt;
			return 0&lt;br /&gt;
		end&lt;br /&gt;
		return math.floor((edits/pages) * ((pages - articles)/articles)^2)&lt;br /&gt;
	end&lt;br /&gt;
	if map then&lt;br /&gt;
		action = map[action]&lt;br /&gt;
	end&lt;br /&gt;
	return stats[action]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getIfLocal(site, action)&lt;br /&gt;
	-- If wanted site is the local site where module is running,&lt;br /&gt;
	-- return numberof result for given action, or nil.&lt;br /&gt;
	-- This is faster than reading the cached table, and gives the current value.&lt;br /&gt;
	local localSite = string.match(mw.site.server, '.*//(.*)%.org$')  -- examples: 'af.wikipedia', 'commons.wikimedia'&lt;br /&gt;
	if site == localSite then&lt;br /&gt;
		if action == 'activeusers' then&lt;br /&gt;
			action = 'activeUsers'&lt;br /&gt;
		end&lt;br /&gt;
		return getValue(mw.site.stats, action)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function main(frame)&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	local action = trimArg(args[1], 1)  -- activeusers, admins, articles, edits, files, pages, users, depth&lt;br /&gt;
	if action:sub(1, 8) == 'numberof' then  -- numberofX is an alias for X&lt;br /&gt;
		action = trimArg(action:sub(9), 1)&lt;br /&gt;
	end&lt;br /&gt;
	local site = trimArg(args[2], 2)  -- &amp;quot;af&amp;quot; or &amp;quot;af.wikipedia&amp;quot; or &amp;quot;af.wikiquote&amp;quot; etc., including &amp;quot;total&amp;quot;&lt;br /&gt;
	if not site:find('.', 1, true) then&lt;br /&gt;
		site = site .. '.wikipedia'&lt;br /&gt;
	end&lt;br /&gt;
	local wantComma = trimArg(args[3])  -- nil for no commas in output; &amp;quot;N&amp;quot; or anything nonblank inserts commas&lt;br /&gt;
	local result = getIfLocal(site, action)&lt;br /&gt;
	if not result then&lt;br /&gt;
		local data = mw.loadData('Module:NUMBEROF/data')&lt;br /&gt;
		local map = data.map&lt;br /&gt;
		data = data.data&lt;br /&gt;
		result = data[site]&lt;br /&gt;
		if result then&lt;br /&gt;
			result = getValue(result, action, map)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if result then&lt;br /&gt;
		if wantComma then&lt;br /&gt;
			result = mw.getContentLanguage():formatNum(result)&lt;br /&gt;
		end&lt;br /&gt;
		return result  -- number or formatted string&lt;br /&gt;
	end&lt;br /&gt;
	return -1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function rank(frame)&lt;br /&gt;
	-- Rank sites in a specified sister project by their number of articles.&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	local parm = trimArg(args[1], 1)  -- a number like 12 or a site name like &amp;quot;af&amp;quot; (not &amp;quot;af.wikipedia&amp;quot;)&lt;br /&gt;
	local base = trimArg(args[2]) or 'wikipedia'  -- base of full site name like &amp;quot;wikipedia&amp;quot; or &amp;quot;wikiquote&amp;quot;&lt;br /&gt;
	local wantComma = trimArg(args[3])&lt;br /&gt;
	local data = mw.loadData('Module:NUMBEROF/' .. (base == 'wikipedia' and 'rank' or 'other'))&lt;br /&gt;
	data = data[base]&lt;br /&gt;
	if data then&lt;br /&gt;
		local result&lt;br /&gt;
		parm = tonumber(parm) or parm&lt;br /&gt;
		if type(parm) == 'number' then&lt;br /&gt;
			result = data.rankByIndex[parm]&lt;br /&gt;
		else&lt;br /&gt;
			result = data.rankBySite[parm]&lt;br /&gt;
			if result and wantComma then&lt;br /&gt;
				result = mw.getContentLanguage():formatNum(result)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if result then&lt;br /&gt;
			return result  -- number or string&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return -1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	main = main,&lt;br /&gt;
	rank = rank,&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>wikipedia:he&gt;GreenC</name></author>
	</entry>
</feed>