If you want to contribute to the source code, feel free to do so! ❤️
Don't forget to state what should be changed and their respective reasons.
If you want to see/modify on the codepoints supported and/or their respective translation(s), feel free to do so! Here are the ways on how to do them;
- To convert the binary into a readable text file, do the following:
node scripts/read.mjs path/to/output.txt
- To convert the binary into a readable and modifiable JSON, do the following:
node scripts/read.mjs [path/to/output.json]
If the output file name is not supplied, it will default to output.json
.
- And to validate, optimize, and convert the JSON back into a binary, do the following:
node scripts/write.mjs path/to/input.json
- The structure of the JSON is as follows:
The optional fields here are only optional when writing and encoding them back into a binary.
interface Codepoint {
codepoint: number
translation: string
}
interface JsonContents {
codepoints: Codepoint[]
similar: string[][]
}
-
Information regarding the
Codepoint
structure:- The
JsonContents#codepoints
array must NOT be empty. Codepoint#codepoint
is the unicode codepoint. It must be around\u80
to\ue00ff
and must NOT be a surrogate.Codepoint#translation
is the translation string: its length must not exceed15
, it must be in lowercase, and it must be in ASCII.
- The
-
Information regarding the
JsonContents#similar
field:- The
string[][]
two-dimensional array must NOT be empty and its length must NOT exceed127
. - The
string[]
arrays must NOT be empty and their lengths must NOT exceed255
. - Each
string
must ONLY be one character long. - Each
string
must be ASCII.
- The
Other useful scripts have been added as a utility for maintaining decancer
.
Prerequisites:
node scripts/pretty.mjs
node scripts/version.mjs 1.2.3
node scripts/update_unicode.mjs