Module:Kangxi radical
Appearance
require('strict')
local p = {}
local labels = {
"one", "line", "dot", "slash", "second", "hook", "two", "lid", "man", "legs",
"enter", "eight", "down box", "cover",
"ice", "table",
"open box",
"knife",
"power",
"wrap",
"spoon",
"right open box",
"hiding enclosure",
"ten",
"divination",
"seal",
"cliff",
"private",
"again",
"mouth",
"enclosure",
"earth",
"scholar",
"go",
"go slowly",
"evening",
"big",
"woman",
"child",
"roof",
"inch",
"small",
"lame",
"corpse",
"sprout",
"mountain",
"river",
"work",
"oneself",
"turban",
"dry",
"short thread",
"dotted cliff",
"long stride",
"two hands",
"shoot",
"bow",
"snout",
"bristle",
"step",
"heart",
"halberd",
"door",
"hand",
"branch",
"rap",
"script",
"dipper",
"axe",
"square",
"not",
"sun",
"say",
"moon",
"tree",
"lack",
"stop",
"death",
"weapon",
"do not",
"compare",
"fur",
"clan",
"steam",
"water",
"fire",
"claw",
"father",
"double x",
"half tree trunk",
"slice",
"fang",
"cow",
"dog",
"profound",
"jade",
"melon",
"tile",
"sweet",
"life",
"use",
"field",
"bolt of cloth",
"sickness",
"dotted tent",
"white",
"skin",
"dish",
"eye",
"spear",
"arrow",
"stone",
"spirit",
"track",
"grain",
"cave",
"stand",
"bamboo",
"rice",
"silk",
"jar",
"net",
"sheep",
"feather",
"old",
"and",
"plow",
"ear",
"brush",
"meat",
"minister",
"self",
"arrive",
"mortar",
"tongue",
"oppose",
"boat",
"stopping",
"color",
"grass",
"tiger",
"insect",
"blood",
"walk enclosure",
"clothes",
"west",
"see",
"horn",
"speech",
"valley",
"bean",
"pig",
"badger",
"shell",
"red",
"run",
"foot",
"body",
"cart",
"bitter",
"morning",
"walk",
"city",
"wine",
"distinguish",
"village",
"gold",
"long",
"gate",
"mound",
"slave",
"short tailed bird",
"rain",
"blue",
"wrong",
"face",
"leather",
"tanned leather",
"leek",
"sound",
"leaf",
"wind",
"fly",
"eat",
"head",
"fragrant",
"horse",
"bone",
"tall",
"hair",
"fight",
"sacrificial wine",
"cauldron",
"ghost",
"fish",
"bird",
"salt",
"deer",
"wheat",
"hemp",
"yellow",
"millet",
"black",
"embroidery",
"frog",
"tripod",
"drum",
"rat",
"nose",
"even",
"tooth",
"dragon",
"turtle",
"flute",
}
function p.Kxr(frame)
-- simplify handling of args
local getArgs = require('Module:Arguments').getArgs
local args = getArgs(frame)
local r = math.floor(tonumber(args[1]))
if args[2] then
error("Only one argument of a number between 1 and 214 is accepted")
elseif r < 1 or r > 214 then
error("Argument must be between 1 and 214")
else
return p._Kxr(r)
end
return
end
function p._Kxr(r)
local unicode = 0x2F00 + r - 1
local u_str = "&#" .. unicode .. ";"
local result = u_str .. " {{smallcaps|" .. labels[r] .. "}"
return result
end
return p