mirror of
https://github.com/plasmaofthedawn/fcitx5-toki-pona.git
synced 2026-04-09 05:09:32 -06:00
made emoji and UCSUR creation better
This commit is contained in:
19
combine.py
19
combine.py
@@ -1,14 +1,25 @@
|
||||
import subprocess
|
||||
import os
|
||||
import os
|
||||
from collections import defaultdict
|
||||
|
||||
header = """KeyCode=mnptkswljiueoaAR
|
||||
|
||||
|
||||
|
||||
headers = defaultdict(lambda: """KeyCode=mnptkswljiueoaAR
|
||||
Length=16
|
||||
Prompt=
|
||||
ConstructPhrase=
|
||||
[Data]
|
||||
""")
|
||||
|
||||
headers["UCSUR"] = """KeyCode=mnptkswljiueoa()[]{}^*.:"
|
||||
Length=16
|
||||
Prompt=
|
||||
ConstructPhrase=
|
||||
[Data]
|
||||
"""
|
||||
|
||||
ucscr_header = """KeyCode=mnptkswljiueoa()[]{}^*.: -"
|
||||
headers["nasin pi sitelen jelo"] = """KeyCode=mnptkswljiueoa[]"
|
||||
Length=16
|
||||
Prompt=
|
||||
ConstructPhrase=
|
||||
@@ -70,7 +81,7 @@ for n, fn, d in zip(names, filenames, data.split("---")):
|
||||
print(n, fn)
|
||||
|
||||
with open(f"raw_tables/{fn}.txt", "w") as f:
|
||||
f.write(header if n != "UCSUR" and n != "nasin pi sitelen jelo" else ucscr_header)
|
||||
f.write(headers[n])
|
||||
f.write(d.strip())
|
||||
|
||||
subprocess.Popen(["libime_tabledict", f"raw_tables/{fn}.txt", f"table/{fn}.dict"])
|
||||
|
||||
Reference in New Issue
Block a user