Currently My RIME only distributes IMEs maintained by RIME organization. For ease of maintenance, 3rd party IME integration request is usually not accepted.
However, you are more than welcomed to host a customized version of My RIME to distribute 3rd party IME.
- Your IME must work on Linux/Windows/macOS.
- If your IME works on desktop but doesn't work as expected when you port it to web, it may be the result of My RIME not fully utilizing librime functionalities, so I'm glad to help you resolve.
- Your IME should be plum compatible, otherwise you have to customize build script yourself.
- Clone the repo. Do not use
--recurse-submodules
. - Replicate build steps locally. You may reference README, Dockerfile or
build
job of CI script. Those steps work on Ubuntu latest stable and LTS release. It's highly recommended to be done BEFORE your customization, in order to locate problems. - Customize schemas.json.
- If your IME has
*.custom.yaml
, place them under rime-config. - Run
pnpm run schema
. - Run
pnpm run wasm
(givenpnpm run lib
has already been executed). - Test by
pnpm run dev
. - Once everything works fine, run
pnpm run build
. - The artifact is in
dist
, and you may deploy it to a static web server.
schemas.json
is a list of objects.
An IME corresponds to a schema id.
- IMEs in different plum-compatible repositories should be placed in different objects, e.g.
luna_pinyin
(in luna-pinyin) andjyut6ping3
(in cantonese), although there's a reverse-lookup dependency between them. - IMEs in one repository should be placed in one object if they share variant configurations, e.g.
luna_pinyin
andluna_pinyin_fluency
both have 简 and 繁. - IMEs in one repository should be placed in different objects if they don't share variant configurations, e.g. you have both
luna_pinyin
andmelt_eng
.
For each object, here are key and value definitions:
-
id: string
, the schema id that you place indefault.yaml
for desktop RIME. -
name: string
, the label you want to show as IME name for user to select. -
disabled?: boolean
, whether the IME is only used for reverse-lookup by other IMEs so you don't want to show it in select. Defaultfalse
. -
group?: string
, group of the IME. Defaultundefined
. -
emoji?: boolean
, whether integrate emoji. Defaultfalse
. -
target: string
, the same argument you use when installing by plum:bash rime-install <target>
. -
dependencies?: string[]
, schema ids that are either a hard dependency (e.g.luna_pinyin
fordouble_pinyin
) or a soft (required by reverse-lookup) dependency (e.g.stroke
forluna_pinyin
). Make sure you have them defined in other objects. Default[]
. -
variants?: object[]
, simplified/traditional/... variants. Defaultundefined
means the table is traditional, and simplified variant is available by OpenCC usingsimplification
option, and you want simplified variant be the default variant unless browser's locale is Hong Kong or Taiwan, e.g.luna_pinyin
. An empty[]
means there are no variants and the variant switch button is disabled, e.g.stroke
.id: string
, the correspondingoption
in.schema.yaml
.name: string
, the label you want to show on the switch button.languages?: ('zh-CN' | 'zh-HK' | 'zh-TW' | 'zh-SG')[]
, if browser's locale is in the list, use this variant by default.
The first variant will be the default variant, regardless what default value is in
.schema.yaml
. Switching to a variant will first set otheroption
s to0
, and then set this variant'soption
to1
. So if there is only oneoption
that controls 2 variants, you may use[{"id": "option"}, {"id": "random stuff"}]
if the default variant should haveoption
on, and[{"id": "random stuff"}, {"id": "option"}]
if the default variant should haveoption
off. If you can understand this, you should agree thatundefined
is equivalent to[{"id": "simplification", "name": "简"}, {"id": "233", "name": "繁", "languages": ["zh-HK", "zh-TW"]}]
. -
extended?: boolean
, whether the.schema.yaml
supports common/extended charset switch. Defaultfalse
. -
hideComment?: boolean | 'emoji'
, whether hide comment after candidate.'emoji'
means only hide comment after emoji candidate. Defaultfalse
. -
family?: object[]
, the other IMEs that share some files. Each shares the samevariants
with the major IME. Default[]
.id: string
, the schema id.name: string
, the label.disabled?: boolean
, same with thedisabled
in parent level.
-
license: string
, a SPDX license identifier used inpackage.json
.
As per LICENSE requires, you have to
- Adopt the same AGPL license to your distribution.
- Include my copyright. The easiest way to comply is to put a link to https://github.com/LibreService/my_rime in your site.
if you distribute it to a public-accessible site.
You are not required, but welcomed to make your IME (*.schema.yaml, *.dict.yaml, *.lua) Open Source and plum compatible.