יחידה:NUMBEROF/other – הבדלי גרסאות

מויקיפדיה: https://he.wikipedia.org/wiki/%D7%99%D7%97%D7%99%D7%93%D7%94:NUMBEROF/other
 
התאמה
 
שורה 3: שורה 3:


local projects = {
local projects = {
'wikibooks',
'chabadpedia',
'wikinews',
'text.chabadpedia',
'wikiquote',
'zitut.chabadpedia',
'wikisource',
'wikiversity',
'wikivoyage',
'wiktionary',
}
}


שורה 27: שורה 23:
end
end
return {
return {
rankByIndex = rankByIndex,  -- rankByIndex[1] == 'en'
rankByIndex = rankByIndex,  -- rankByIndex[1] == 'text'
rankBySite = rankBySite,    -- rankBySite['en'] == 1
rankBySite = rankBySite,    -- rankBySite['en'] == 1
}
}
שורה 33: שורה 29:


local function makeData()
local function makeData()
-- For example, data to rank each language for sister project wikipedia is at
-- For example, data to rank each language for sister project chabadpedia is at
-- https://commons.wikimedia.org/wiki/Data:Wikipedia_statistics/rank/wikipedia.tab
-- https://commons.wikimedia.org/wiki/Data:Wikipedia_statistics/rank/wikipedia.tab
local result = {}
local result = {}
for _, project in ipairs(projects) do
for _, project in ipairs(projects) do
local file = 'Wikipedia statistics/rank/' .. project .. '.tab'
local file = 'chabadpedia statistics/rank/' .. project .. '.tab'
result[project] = getData(mw.ext.data.get(file))
result[project] = getData(mw.ext.data.get(file))
end
end