summaryrefslogtreecommitdiff
path: root/README
blob: 7be31d430e1e927af65eaa176cf4160ff60ec5d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
-----------------------------------=[Sources]=----------------------------------
Unihan Database from
	https://www.unicode.org/Public/UNIDATA/Unihan.zip
		Unihan_DictionaryLikeData.txt
		has four corners info for about 16k characters

Logo generated here:
	https://www.zhuanshuti.cn/3
---------------------------------=[How to Use]=---------------------------------
Installation]=---
$ make
$ sudo make install
$ ibus restart

Use]=---
$ ibus engine table:fc

Keybinds]=---
F1 to F9 are the character selectors
` is the wildcard character

Note that you can essentially type english and chinese at the same time without
changing input methods. If you need to type a number or use english punctuation,
simply press left shift and it will change into english mode.


-----------------------------=[Method of Creation]=-----------------------------
These are just notes on how the file was created, it's largely manual and very
janky but it works. If the UniHan database updates we can do all this again


$ cat Unihan_DictionaryLikeData.txt | grep kFourCornerCode

delete comment line

In vim:
	:%s/\(.*\s.*\s\)\(.*\)\s\(.*\)/\1\2\r\1\3/
	changes duplicate four corner codes to be seperate entries

In vim edit to format :
	12345	000ABC12
	where the hex code is exactly 8 digits long

then use the following to convert to actual unicode
	:%s/^\(.*\)\t\(.*\)$/echo -e "\1\\t$(echo \2 |xxd -r -ps -u | iconv -f UTF-32BE -t UTF-8)"/

The following command converts hex code to actual unicode char
$ xxd -r -ps -u | iconv -f UTF-32BE -t UTF-8

Create template according to usr/share/ibus-input/tables/template.txt

Counting conflicts
$ cat four | awk '{print $1}' | sort | uniq -c | sort -n