Closed sschmidTU closed 1 month ago
In elements_data.txt
, subelement synonyms can now be listed like this:
wand = magic wand = augury
instead of:
wand, magic wand, augury; wand=magic wand=augury
this saves a column, typing, redundance, etc. Also, all rows in the file can now be checked to have exactly 4 columns, not possibly 5 or more (>= 4).
createNewKanjiPage.mjs
: check if the "new" kanji already exists in .md files.
I accidentally added 3089.md 迄, which already existed as 2421.md.
fixed in e5fadaf3d6632947eeabf7ab3a8778f0442de2de, now 3089.md is 囘 (actually new kanji)
(edit: script now also checks for duplicate)npm test
/ npm run duplicates
/ checkKanjiDuplicates.mjs
We should add positioning data to elements_data.txt
now, instead of just unordered elements.
E.g. for summer (夏), instead of one, ceiling, drop, eye, walking legs
, we should give t(ceiling, drop, eye, walking legs)
.
This will allow us to also show the structure of sub elements, e.g. for 嗄, which has elementsTree: l(mouth, summer)
. Currently, it just adds the elements for summer without positioning info.
This will require some refactoring of how we handle elements_data.txt
. (for now, just remove all l(
, t(
, o(
, c(
, tl(
etc. and )
substrings, like in search.js
)
Also, we will have to again add subelements or synonyms from this, e.g. one
from ceiling
.
-> split into sub-issue #32
Done.
a07dee819fd57f59f8212bf5b36f73683c14f8d9 added a script to generate a new kanji page with stroke number etc filled out:
npm run newkanji [kanji]
(ornpm run newkanji -- [kanji]
if you want to be verbose/explicit) (or withnode
only:node _tools/createNewKanjiPage.mjs [kanji]
)if you added or changed elements in
elements_data.txt
, create the new elements json:npm run elements
(or:node _tools/elementsDataToJson.js
)It creates a file
[number].md
with the new info inrtk3-remain/
.Now we only need to add variants, elementsTree, etc. (and check the data fetched from
kanjiapi.dev
)