Module:User:Wyang/desired
- This module lacks a documentation subpage. You may create it.
- Useful links: root page • root page’s subpages • links • transclusions • testcases • user page • user talk page • userspace
This is a private module sandbox of Wyang, for their own experimentation. Items in this module may be added and removed at Wyang's discretion; do not rely on this module's stability.
local export = {}
local data = mw.loadData("Module:User:Wyang/desired/data")
function export.catch_em_all2()
result = {}
i, j = 0, 4586
while i < 200 do
while not data[j] do
j = j + 1
end
local readings = data[j]
if not mw.title.new(readings[1]).exists then
table.insert(result, "[" .. j .. "] = { \"" .. readings[1] .. "\", \"" .. readings[2] .. "\", " .. readings[3] .. " },")
i = i + 1
end
j = j + 1
end
return "<pre>" .. table.concat(result, "\n") .. "</pre>"
end
function export.catch_em_all()
result = { "List of Chinese entries to add, sorted by importance. Showing the first 300 uncreated words.\n\n==List==\n<small>(There are errors.)</small>\n<center>\n{| class=\"wikitable sortable\" style=\"text-align:center; font-size: 120%\"\n|-\n!Word!!Readings!!Count" }
i, j = 0, 1
while i < 200 do
while not data[j] do
j = j + 1
end
local readings = data[j]
if not mw.title.new(readings[1]):getContent() then
table.insert(result, "\n|-\n|style=\"background-color:#cfe8f7\"|<span lang=\"zh\" class=\"Hani\" style=\"font-size:140%\">[[" .. readings[1] ..
"]]</span>\n|style=\"background-color:#FFFDD0\"|" .. mw.ustring.gsub(mw.ustring.gsub(readings[2], "([^|]+):([^|]+)", "<b>%1</b>: <i>%2</i>"), "|", "<br>") .. "\n|" .. readings[3])
i = i + 1
end
j = j + 1
end
return table.concat(result) .. "\n|}\n</center>"
end
return export