feat: Grey out ignored kanji in grid with special list
This commit is contained in:
parent
a2c07e5d2f
commit
87ca6a5564
|
@ -0,0 +1,61 @@
|
||||||
|
勐
|
||||||
|
Sale como 異体字 de 猛 pero en verdad parece ser que se usa en nombre de
|
||||||
|
cuidades tailandesas? Parece que denota un tipo de templo especifico.
|
||||||
|
https://en.wikipedia.org/wiki/Mueang
|
||||||
|
|
||||||
|
勑
|
||||||
|
異体字 de 勅 y su 旧字体「敕」. No tiene mucho interés.
|
||||||
|
|
||||||
|
勰
|
||||||
|
Significa "harmonioso" pero no hay mucho en referencia de ello.
|
||||||
|
Básicamente se usa para el nombre de un pavo que hizo un libro sobre agricultura.
|
||||||
|
En ebooks sale esta persona también referenciada.
|
||||||
|
|
||||||
|
勚
|
||||||
|
Versión simplificada de 勩. No tiene ni uso ni referencias ni nada.
|
||||||
|
|
||||||
|
勔
|
||||||
|
異体字 of 勉強の勉. No se usa. No tiene interés.
|
||||||
|
|
||||||
|
匊
|
||||||
|
Old variant of 掬, also has the 古字 of "𦥑" . An ebook says it represent
|
||||||
|
having your hands full with rice.
|
||||||
|
|
||||||
|
匋
|
||||||
|
Old variant/origin? of 陶, which is 常用漢字 / 名前に使える漢字 and 3級. Seems
|
||||||
|
to kinda mean "pottery" , "clay" . It's used in 陶器[とうき].
|
||||||
|
Not interesting on its own
|
||||||
|
|
||||||
|
匜
|
||||||
|
Old vase for holding water/wine. Not used aside from that.
|
||||||
|
https://en.wikipedia.org/wiki/Yi_(vessel)
|
||||||
|
REVISIT
|
||||||
|
|
||||||
|
匦
|
||||||
|
Simplified form of 匭. Not of interest at all. Small box or something.
|
||||||
|
|
||||||
|
匵
|
||||||
|
Old variant of something that isn't even used. No reason to pay attention
|
||||||
|
|
||||||
|
匼
|
||||||
|
Not used at all, wtf. Seems to be used in some dialects to kinda mean 蓋[ふた].
|
||||||
|
Of no interest.
|
||||||
|
|
||||||
|
匾
|
||||||
|
Traditional chinese of 匾 (same code lol). Horizontal tablet to have the name
|
||||||
|
of stuff in entrances and stuff.
|
||||||
|
Traditional is 匾 and in japanese it's just 扁, wich is
|
||||||
|
一級. Of no interest for now, idk, too many characters for one concept.
|
||||||
|
https://zh.wikipedia.org/wiki/%E5%8C%BE%E9%A1%8D
|
||||||
|
REVISIT
|
||||||
|
|
||||||
|
卌
|
||||||
|
Means forty. Not used aside historially and not as funny as 卄, 卅 or 卆
|
||||||
|
|
||||||
|
卞
|
||||||
|
Seems to be used in names of places and that's kinda it. A variant of 鞭 or
|
||||||
|
something. Not learning it for now. Of no interst.
|
||||||
|
|
||||||
|
卟
|
||||||
|
used in the transliteration of the names of organic compounds porphyrin 卟啉
|
||||||
|
and porphin 卟吩. Of no use.
|
|
@ -29,6 +29,29 @@ class KanjiController extends AbstractController
|
||||||
return "kanji/$path.html.twig";
|
return "kanji/$path.html.twig";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @return array<string, string> */
|
||||||
|
public function getIgnoredList(): array
|
||||||
|
{
|
||||||
|
$path = "{$this->getParameter('kernel.project_dir')}/data/ignored.list";
|
||||||
|
$ret = [];
|
||||||
|
|
||||||
|
$file = fopen($path, 'r');
|
||||||
|
while (($kanji = fgets($file)) !== false) {
|
||||||
|
$kanji = mb_trim($kanji);
|
||||||
|
|
||||||
|
if (mb_strlen($kanji) !== 1) throw new \Exception(sprintf(
|
||||||
|
'Kanji expected, got "%s"',
|
||||||
|
$kanji,
|
||||||
|
));
|
||||||
|
while (($explanation = fgets($file)) !== false) {
|
||||||
|
if ($explanation === "\n") continue 2;
|
||||||
|
$ret[$kanji] = mb_trim(fgets($file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
/** @return array<string, array<string, 0>> */
|
/** @return array<string, array<string, 0>> */
|
||||||
private function getCharInfo(bool $force = false): array
|
private function getCharInfo(bool $force = false): array
|
||||||
{
|
{
|
||||||
|
@ -42,6 +65,7 @@ class KanjiController extends AbstractController
|
||||||
'sn' => $this->anki->getKnownSnKanjiCounts(),
|
'sn' => $this->anki->getKnownSnKanjiCounts(),
|
||||||
'sln' => $this->anki->getKnownSlnKanjiCounts(),
|
'sln' => $this->anki->getKnownSlnKanjiCounts(),
|
||||||
'unicode' => $this->anki->getUnicodeKanji(),
|
'unicode' => $this->anki->getUnicodeKanji(),
|
||||||
|
'ignored' => $this->getIgnoredList(),
|
||||||
];
|
];
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
|
@ -103,9 +127,12 @@ class KanjiController extends AbstractController
|
||||||
public function register(string $codepoint): Response
|
public function register(string $codepoint): Response
|
||||||
{
|
{
|
||||||
// Properly check it's valid (make a util?)
|
// Properly check it's valid (make a util?)
|
||||||
$char = mb_chr(Number::hexint($codepoint), 'UTF-8');
|
$charStr = mb_chr(Number::hexint($codepoint), 'UTF-8');
|
||||||
|
|
||||||
|
$note = UnicodeNote::fromCharacter($charStr);
|
||||||
|
$terms = $this->anki->searchTerms($charStr);
|
||||||
|
$note->setTerms($terms);
|
||||||
|
|
||||||
$note = UnicodeNote::fromCharacter($char);
|
|
||||||
$this->anki->addNote($note, UnicodeNote::DECK);
|
$this->anki->addNote($note, UnicodeNote::DECK);
|
||||||
|
|
||||||
return new Response();
|
return new Response();
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
.ebook { border-top: 3px solid deeppink !important; }
|
.ebook { border-top: 3px solid deeppink !important; }
|
||||||
.jimaku { border-top: 3px solid lightgray !important; }
|
.jimaku { border-top: 3px solid lightgray !important; }
|
||||||
|
|
||||||
.none { opacity: 0.40; }
|
.none, .ignored { opacity: 0.15; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div style="background-color: var(--bs-gray-300)">
|
<div style="background-color: var(--bs-gray-300)">
|
||||||
|
|
Loading…
Reference in New Issue