<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://massarn.com/w/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AInterwiki%2Fdata</id>
	<title>Модуль:Interwiki/data - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://massarn.com/w/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AInterwiki%2Fdata"/>
	<link rel="alternate" type="text/html" href="https://massarn.com/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Interwiki/data&amp;action=history"/>
	<updated>2026-10-13T03:25:05Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://massarn.com/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Interwiki/data&amp;diff=1667&amp;oldid=prev</id>
		<title>Buto: Новая страница: «-- This module processes data from mw.site.interwikiMap for use with -- Module:Interwiki. By loading the data with mw.loadData we ensure that -- this is only done once per page parse.  local prefixes, urls, hosts = {}, {}, {}  local function makeCountedData(t, storeKey, counterKey, itemKey, item) 	t = t or {} 	t[storeKey] = t[storeKey] or {} 	t[storeKey][itemKey] = item 	t[counterKey] = t[counterKey] and t[counterKey] + 1 or 1 	return t end  for prefix,...»</title>
		<link rel="alternate" type="text/html" href="https://massarn.com/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Interwiki/data&amp;diff=1667&amp;oldid=prev"/>
		<updated>2026-10-08T16:59:37Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «-- This module processes data from mw.site.interwikiMap for use with -- &lt;a href=&quot;/w/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Interwiki&quot; title=&quot;Модуль:Interwiki&quot;&gt;Module:Interwiki&lt;/a&gt;. By loading the data with mw.loadData we ensure that -- this is only done once per page parse.  local prefixes, urls, hosts = {}, {}, {}  local function makeCountedData(t, storeKey, counterKey, itemKey, item) 	t = t or {} 	t[storeKey] = t[storeKey] or {} 	t[storeKey][itemKey] = item 	t[counterKey] = t[counterKey] and t[counterKey] + 1 or 1 	return t end  for prefix,...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module processes data from mw.site.interwikiMap for use with&lt;br /&gt;
-- [[Module:Interwiki]]. By loading the data with mw.loadData we ensure that&lt;br /&gt;
-- this is only done once per page parse.&lt;br /&gt;
&lt;br /&gt;
local prefixes, urls, hosts = {}, {}, {}&lt;br /&gt;
&lt;br /&gt;
local function makeCountedData(t, storeKey, counterKey, itemKey, item)&lt;br /&gt;
	t = t or {}&lt;br /&gt;
	t[storeKey] = t[storeKey] or {}&lt;br /&gt;
	t[storeKey][itemKey] = item&lt;br /&gt;
	t[counterKey] = t[counterKey] and t[counterKey] + 1 or 1&lt;br /&gt;
	return t&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
for prefix, data in pairs(mw.site.interwikiMap()) do&lt;br /&gt;
	local prefixData = {}&lt;br /&gt;
	for k, v in pairs(data) do&lt;br /&gt;
		prefixData[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	prefixes[prefix] = prefixData&lt;br /&gt;
&lt;br /&gt;
	local urlData = makeCountedData(&lt;br /&gt;
		urls[urlText],&lt;br /&gt;
		&amp;#039;prefixes&amp;#039;,&lt;br /&gt;
		&amp;#039;nPrefixes&amp;#039;,&lt;br /&gt;
		prefix,&lt;br /&gt;
		prefixData&lt;br /&gt;
	)&lt;br /&gt;
	urlData.url = prefixData.url&lt;br /&gt;
	urls[urlData.url] = urlData&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
for url, urlData in pairs(urls) do&lt;br /&gt;
	local urlObj = mw.uri.new(url) -- We can&amp;#039;t output URI objects as they have metatables&lt;br /&gt;
	if not urlObj or not urlObj.host then&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			&amp;quot;could not find a host in URL &amp;#039;%s&amp;#039;; &amp;quot; ..&lt;br /&gt;
			&amp;quot;please check your wiki&amp;#039;s interwiki data&amp;quot;,&lt;br /&gt;
			tostring(url)&lt;br /&gt;
		))&lt;br /&gt;
	end&lt;br /&gt;
	local hostData = makeCountedData(&lt;br /&gt;
		hosts[urlObj.host],&lt;br /&gt;
		&amp;#039;urls&amp;#039;,&lt;br /&gt;
		&amp;#039;nUrls&amp;#039;,&lt;br /&gt;
		url,&lt;br /&gt;
		urlData&lt;br /&gt;
	)&lt;br /&gt;
	hostData.host = urlObj.host&lt;br /&gt;
	hosts[urlObj.host] = hostData&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	prefixes = prefixes,&lt;br /&gt;
	urls = urls,&lt;br /&gt;
	hosts = hosts&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Buto</name></author>
	</entry>
</feed>