မေႃႇၵျူး:NUMBEROF/data
Appearance
ၽိုၼ်ၵႅမ်မိုဝ်းမေႃႇၵျူး[သၢင်ႈ]
တွၼ်ႈတႃႇ Scribunto module ဢၼ်ၼႆႉ ၸဝ်ႈၵဝ်ႇ ၸၢင်ႈ သၢင်ႈ ၼႃႈလိၵ်ႈ ၼႆႉလႆႈယူႇၶႃႈ။ ၽူႈၸိူဝ်းမႄးထတ်းၶဝ် ၸၢင်ႈၸၢမ်းတူၺ်းလႆႈ ၸိူဝ်းပဵၼ်ၼႃႈလိၵ်ႈ sandbox (သၢင်ႈ | ငဝ်းမိူၼ်) လႄႈ testcases (သၢင်ႈ) ႁင်း မေႃႇၵျူးဢၼ်ၼႆႉ လႆႈယူႇၶႃႈ။ သႂ်ႇပိူင်ထၢၼ်ႈ ၵႃႈတီႈ ၼႃႈလိၵ်ႈၽႄ /doc လႄႈ။ ၼႃႈလိၵ်ႈၽႄ ႁင်း မေႃႇၵျူး ဢၼ်ၼႆႉ။. |
-- Return a table of statistics to be accessed once per page using mw.loadData.
-- The table contains counts of edits, pages and more for each project.
local function makeData()
local statistics = mw.ext.data.get('Wikipedia statistics/data.tab') -- https://commons.wikimedia.org/wiki/Data:Wikipedia_statistics/data.tab
local data = {}
for _, v in ipairs(statistics.data) do
-- Assume "site" is first entry of 8.
data[v[1]] = { v[2], v[3], v[4], v[5], v[6], v[7], v[8] }
end
local map = {}
for i, v in ipairs(statistics.schema.fields) do
-- Assume "site" is first entry and skip it.
if i > 1 then
map[v.name] = i - 1 -- name is lowercase
end
end
return {
data = data,
map = map,
}
end
return makeData()