├── .eslintrc-json.cjs ├── .eslintrc.cjs ├── .github └── workflows │ └── validate.yaml ├── .gitignore ├── Chinese ├── Cantonese │ └── index.json ├── Hakka │ └── index.json ├── Hokkien │ └── index.json ├── Mandarin │ └── index.json ├── Old │ └── index.json ├── Shape │ └── index.json ├── Wu │ └── index.json ├── Xiang │ └── index.json └── index.json ├── Collection └── index.json ├── English └── index.json ├── Japanese └── index.json ├── Korean └── index.json ├── LICENSE ├── Other └── index.json ├── README.md ├── index.json ├── package.json ├── scripts └── validate.ts ├── src └── index.d.ts └── tsconfig.json /.eslintrc-json.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | es2021: true 4 | }, 5 | extends: [ 6 | 'eslint:recommended', 7 | 'standard' 8 | ], 9 | rules: { 10 | 'no-unused-expressions': 0, 11 | 'quotes': [2, 'double'], 12 | 'quote-props': [2, 'always'] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | node: true, 4 | es2021: true 5 | }, 6 | extends: [ 7 | 'eslint:recommended', 8 | 'plugin:@typescript-eslint/recommended', 9 | 'standard' 10 | ], 11 | parserOptions: { 12 | ecmaVersion: 'latest', 13 | parser: '@typescript-eslint/parser', 14 | sourceType: 'module' 15 | }, 16 | plugins: [ 17 | '@typescript-eslint' 18 | ], 19 | rules: { 20 | '@typescript-eslint/no-non-null-assertion': 0, 21 | 'no-undef': 0 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.github/workflows/validate.yaml: -------------------------------------------------------------------------------- 1 | name: validate 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | 9 | jobs: 10 | validate: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - name: Use Node.js latest 15 | uses: actions/setup-node@v2 16 | with: 17 | node-version: 20.x 18 | - name: Install node dependencies 19 | run: | 20 | npm i -g pnpm 21 | pnpm i 22 | - name: Run lint 23 | run: | 24 | pnpm run lint 25 | - name: Type check 26 | run: | 27 | pnpm run check 28 | - name: Validate JSON files 29 | run: | 30 | pnpm run validate 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | pnpm-lock.yaml 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /Chinese/Cantonese/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "rime/rime-cantonese", 5 | "name": "粤语拼音", 6 | "schemas": [ 7 | "jyut6ping3", 8 | "jyut6ping3_ipa" 9 | ], 10 | "reverseDependencies": [ 11 | "rime/rime-luna-pinyin", 12 | "rime/rime-stroke", 13 | "rime/rime-cangjie" 14 | ], 15 | "license": "CC-BY-4.0" 16 | }, 17 | { 18 | "repo": "leimaau/naamning_jyutping", 19 | "name": "南宁话", 20 | "schemas": [ 21 | "naamning_baakwaa", 22 | "naamning_baakwaa_ipa", 23 | "naamning_bingwaa", 24 | "naamning_bingwaa_ipa" 25 | ], 26 | "license": "MIT" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /Chinese/Hakka/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "syndict/hakka", 5 | "name": "客语", 6 | "schemas": [ 7 | "hakka", 8 | "hakka_meixian" 9 | ] 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Chinese/Hokkien/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "kahaani/dieghv", 5 | "name": "潮语拼音", 6 | "schemas": [ 7 | "dieziu", 8 | "dioion", 9 | "gekion", 10 | "riaupeng", 11 | "suantau", 12 | "tenghai" 13 | ], 14 | "license": "GPL-3.0-only" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /Chinese/Mandarin/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "rime/rime-luna-pinyin", 5 | "name": "朙月拼音", 6 | "schemas": [ 7 | "luna_pinyin", 8 | "luna_pinyin_fluency", 9 | "luna_pinyin_simp", 10 | "luna_pinyin_tw", 11 | "luna_quanpin" 12 | ], 13 | "reverseDependencies": [ 14 | "rime/rime-stroke" 15 | ], 16 | "license": "LGPL-3.0-only" 17 | }, 18 | { 19 | "repo": "rime/rime-double-pinyin", 20 | "name": "双拼", 21 | "schemas": [ 22 | "double_pinyin", 23 | "double_pinyin_abc", 24 | "double_pinyin_flypy", 25 | "double_pinyin_mspy", 26 | "double_pinyin_pyjj" 27 | ], 28 | "dependencies": [ 29 | "rime/rime-luna-pinyin" 30 | ], 31 | "license": "GPL-3.0-only" 32 | }, 33 | { 34 | "repo": "rime/rime-pinyin-simp", 35 | "name": "袖珍简拼", 36 | "schemas": [ 37 | "pinyin_simp" 38 | ], 39 | "reverseDependencies": [ 40 | "rime/rime-stroke" 41 | ], 42 | "license": "Apache-2.0" 43 | }, 44 | { 45 | "repo": "rime/rime-terra-pinyin", 46 | "name": "地球拼音", 47 | "schemas": [ 48 | "terra_pinyin" 49 | ], 50 | "reverseDependencies": [ 51 | "rime/rime-stroke" 52 | ], 53 | "license": "LGPL-3.0-only" 54 | }, 55 | { 56 | "repo": "rime/rime-bopomofo", 57 | "name": "注音", 58 | "schemas": [ 59 | "bopomofo", 60 | "bopomofo_express" 61 | ], 62 | "dependencies": [ 63 | "rime/rime-terra-pinyin" 64 | ], 65 | "reverseDependencies": [ 66 | "rime/rime-stroke" 67 | ], 68 | "license": "LGPL-3.0-only" 69 | }, 70 | { 71 | "repo": "rime/rime-combo-pinyin", 72 | "name": "宫保拼音", 73 | "labels": [ 74 | "chord" 75 | ], 76 | "schemas": [ 77 | "combo_pinyin", 78 | "combo_pinyin_8", 79 | "combo_pinyin_9", 80 | "combo_pinyin_10" 81 | ], 82 | "dependencies": [ 83 | "rime/rime-luna-pinyin" 84 | ], 85 | "license": "GPL-3.0-only" 86 | }, 87 | { 88 | "repo": "rime/rime-stenotype", 89 | "name": "打字速记法", 90 | "schemas": [ 91 | "stenotype" 92 | ], 93 | "dependencies": [ 94 | "rime/rime-luna-pinyin" 95 | ], 96 | "license": "GPL-3.0-only" 97 | }, 98 | { 99 | "repo": "lotem/rime-c2h6-pinyin", 100 | "name": "乙烷拼音", 101 | "schemas": [ 102 | "c2h6_pinyin" 103 | ], 104 | "license": "LGPL-3.0-only" 105 | }, 106 | { 107 | "repo": "lotem/rime-zhung", 108 | "name": "中原官话", 109 | "schemas": [ 110 | "zhung", 111 | "zhung_42", 112 | "zhung_combo", 113 | "zhung_combo_transcript", 114 | "zhung_stenotype", 115 | "zhung_transcript" 116 | ] 117 | }, 118 | { 119 | "repo": "xiaobai9978/rime-xiaobai_simp", 120 | "name": "小白T9", 121 | "schemas": [ 122 | "xiaobai_simp" 123 | ] 124 | }, 125 | { 126 | "repo": "picado-tv/rime-handarin", 127 | "name": "韩官话", 128 | "schemas": [ 129 | "handarin" 130 | ], 131 | "dependencies": [ 132 | "rime/rime-luna-pinyin" 133 | ], 134 | "reverseDependencies": [ 135 | "rime/rime-stroke" 136 | ], 137 | "license": "GPL-3.0-only" 138 | } 139 | ] 140 | } 141 | -------------------------------------------------------------------------------- /Chinese/Old/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "rime/rime-middle-chinese", 5 | "name": "中古拼音", 6 | "schemas": [ 7 | "zyenpheng", 8 | "sampheng" 9 | ], 10 | "reverseDependencies": [ 11 | "rime/rime-luna-pinyin" 12 | ], 13 | "license": "GPL-3.0-only" 14 | }, 15 | { 16 | "repo": "lotem/rime-dungfungpuo", 17 | "name": "东风破", 18 | "schemas": [ 19 | "dungfungpuo" 20 | ] 21 | }, 22 | { 23 | "repo": "rime-aca/rime-nieh-ched", 24 | "name": "爾切羅馬字", 25 | "schemas": [ 26 | "njerchet" 27 | ] 28 | }, 29 | { 30 | "repo": "Hulenkius/RIME_OC_collections", 31 | "name": "上古音方案集", 32 | "schemas": [ 33 | "OC_msoegDK", 34 | "OC_msoeg", 35 | "OC_baxter-sagart", 36 | "OC_starostinLO", 37 | "OC_starostinTK", 38 | "OC_schuesslerOC", 39 | "OC_schuesslerLHC", 40 | "OC_zhengzhang", 41 | "OC_baxter1992", 42 | "OC_wangli", 43 | "OC_lifanggui", 44 | "OC_zhoufagao" 45 | ] 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /Chinese/Shape/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "rime/rime-wubi", 5 | "name": "86五笔", 6 | "schemas": [ 7 | "wubi86", 8 | "wubi_pinyin", 9 | "wubi_trad" 10 | ], 11 | "dependencies": [ 12 | "rime/rime-pinyin-simp" 13 | ], 14 | "license": "LGPL-3.0-only" 15 | }, 16 | { 17 | "repo": "rime/rime-cangjie", 18 | "name": "仓颉五代", 19 | "schemas": [ 20 | "cangjie5", 21 | "cangjie5_express" 22 | ], 23 | "reverseDependencies": [ 24 | "rime/rime-luna-pinyin" 25 | ], 26 | "license": "LGPL-3.0-only" 27 | }, 28 | { 29 | "repo": "rime/rime-stroke", 30 | "name": "五笔画", 31 | "schemas": [ 32 | "stroke" 33 | ], 34 | "reverseDependencies": [ 35 | "rime/rime-luna-pinyin" 36 | ], 37 | "license": "LGPL-3.0-only" 38 | }, 39 | { 40 | "repo": "rime/rime-array", 41 | "name": "行列", 42 | "schemas": [ 43 | "array30", 44 | "array30_query", 45 | "array30_wsymbols" 46 | ], 47 | "reverseDependencies": [ 48 | "rime/rime-luna-pinyin" 49 | ], 50 | "license": "GPL-3.0-only" 51 | }, 52 | { 53 | "repo": "rime/rime-scj", 54 | "name": "快速仓颉", 55 | "schemas": [ 56 | "scj6" 57 | ], 58 | "reverseDependencies": [ 59 | "rime/rime-luna-pinyin" 60 | ], 61 | "license": "GPL-3.0-only" 62 | }, 63 | { 64 | "repo": "rime/rime-quick", 65 | "name": "速成", 66 | "schemas": [ 67 | "quick5" 68 | ], 69 | "reverseDependencies": [ 70 | "rime/rime-luna-pinyin" 71 | ], 72 | "license": "LGPL-3.0-only" 73 | }, 74 | { 75 | "repo": "KyleBing/rime-wubi86-jidian", 76 | "name": "86五笔极点", 77 | "schemas": [ 78 | "numbers", 79 | "pinyin_simp", 80 | "wubi86_jidian", 81 | "wubi86_jidian_pinyin", 82 | "wubi86_jidian_trad", 83 | "wubi86_jidian_trad_pinyin" 84 | ], 85 | "license": "Apache-2.0" 86 | }, 87 | { 88 | "repo": "lotem/rime-zhengma", 89 | "name": "郑码", 90 | "schemas": [ 91 | "zhengma" 92 | ], 93 | "license": "GPL-3.0-only" 94 | }, 95 | { 96 | "repo": "lotem/rime-wubi98", 97 | "name": "98五笔", 98 | "schemas": [ 99 | "wubi98" 100 | ] 101 | }, 102 | { 103 | "repo": "lotem/rime-linguistic-wubi", 104 | "name": "大字符集五笔", 105 | "schemas": [ 106 | "linguistic_wubi" 107 | ] 108 | }, 109 | { 110 | "repo": "lotem/rime-guhuwubi", 111 | "name": "孤狐五笔", 112 | "schemas": [ 113 | "guhuwubi" 114 | ] 115 | }, 116 | { 117 | "repo": "amorphobia/rime-jiandao", 118 | "branch": "release", 119 | "name": "星空键道", 120 | "schemas": [ 121 | "jiandao" 122 | ] 123 | }, 124 | { 125 | "repo": "amorphobia/openfly", 126 | "name": "OpenFly", 127 | "schemas": [ 128 | "openfly" 129 | ] 130 | }, 131 | { 132 | "repo": "miounet/rime-kmm", 133 | "name": "空明码", 134 | "labels": [ 135 | "chord" 136 | ], 137 | "schemas": [ 138 | "kongmingma" 139 | ] 140 | }, 141 | { 142 | "repo": "0ZDragon/rime-huma", 143 | "name": "虎码", 144 | "schemas": [ 145 | "tiger", 146 | "tigress" 147 | ], 148 | "reverseDependencies": [ 149 | "rime/rime-pinyin-simp" 150 | ] 151 | }, 152 | { 153 | "repo": "bigshans/rime-zrm", 154 | "name": "自然码+辅码", 155 | "schemas": [ 156 | "zrm_pinyin" 157 | ], 158 | "license": "GPL-3.0-only" 159 | }, 160 | { 161 | "repo": "pingshunhuangalex/rime-keydo", 162 | "name": "键道·我流", 163 | "labels": [ 164 | "lua" 165 | ], 166 | "schemas": [ 167 | "keydo" 168 | ], 169 | "license": "GPL-3.0-only" 170 | }, 171 | { 172 | "repo": "zongxinbo/rime-zong", 173 | "name": "四角号码", 174 | "schemas": [ 175 | "sjhm" 176 | ] 177 | }, 178 | { 179 | "repo": "ksqsf/rime-moran", 180 | "name": "魔改自然码", 181 | "schemas": [ 182 | "moran", 183 | "moran_sentence", 184 | "moran_fixed" 185 | ] 186 | }, 187 | { 188 | "repo": "mirtlecn/rime-radical-pinyin", 189 | "name": "部件拆字", 190 | "schemas": [ 191 | "radical_pinyin" 192 | ], 193 | "license": "LGPL-3.0-only" 194 | } 195 | ] 196 | } 197 | -------------------------------------------------------------------------------- /Chinese/Wu/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "rime/rime-wugniu", 5 | "name": "上海吴语", 6 | "schemas": [ 7 | "wugniu_lopha", 8 | "wugniu" 9 | ], 10 | "reverseDependencies": [ 11 | "rime/rime-luna-pinyin" 12 | ], 13 | "license": "GPL-3.0-only" 14 | }, 15 | { 16 | "repo": "rime/rime-soutzoe", 17 | "name": "苏州吴语", 18 | "schemas": [ 19 | "soutzoe" 20 | ], 21 | "reverseDependencies": [ 22 | "rime/rime-luna-pinyin" 23 | ], 24 | "license": "GPL-3.0-only" 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /Chinese/Xiang/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "AlfredLouis00/rime-Sautungva", 5 | "name": "湘语邵东话拼音", 6 | "schemas": [ 7 | "sautungva", 8 | "sautungva_beta", 9 | "sautungva_phinin", 10 | "sautungva_cyrillic" 11 | ], 12 | "license": "GPL-3.0-only" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /Chinese/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": [ 3 | { 4 | "key": "Mandarin", 5 | "name": "普通话/官话" 6 | }, 7 | { 8 | "key": "Cantonese", 9 | "name": "粤语" 10 | }, 11 | { 12 | "key": "Wu", 13 | "name": "吴语" 14 | }, 15 | { 16 | "key": "Hakka", 17 | "name": "客语" 18 | }, 19 | { 20 | "key": "Hokkien", 21 | "name": "闽语" 22 | }, 23 | { 24 | "key": "Xiang", 25 | "name": "湘语" 26 | }, 27 | { 28 | "key": "Old", 29 | "name": "古音" 30 | }, 31 | { 32 | "key": "Shape", 33 | "name": "字形" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /Collection/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "iDvel/rime-ice", 5 | "name": "雾凇拼音", 6 | "labels": [ 7 | "lua" 8 | ], 9 | "schemas": [ 10 | "double_pinyin", 11 | "double_pinyin_abc", 12 | "double_pinyin_flypy", 13 | "double_pinyin_mspy", 14 | "double_pinyin_ziguang", 15 | "liangfen", 16 | "melt_eng", 17 | "rime_ice" 18 | ], 19 | "license": "GPL-3.0-only" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /English/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "sdadonkey/rime-english", 5 | "name": "English", 6 | "labels": [ 7 | "lua" 8 | ], 9 | "schemas": [ 10 | "english" 11 | ] 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /Japanese/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "lotem/rime-kana", 5 | "name": "假名", 6 | "schemas": [ 7 | "kana" 8 | ] 9 | }, 10 | { 11 | "repo": "momijineko/Rime-KappaJP", 12 | "name": "河童五笔", 13 | "schemas": [ 14 | "KappaJP", 15 | "KappaJP_fluency" 16 | ], 17 | "license": "MIT" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /Korean/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "picado-tv/rime-hangul", 5 | "name": "도한글", 6 | "schemas": [ 7 | "hangul" 8 | ], 9 | "dependencies": [ 10 | "picado-tv/rime-handarin" 11 | ], 12 | "license": "GPL-3.0-only" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Other/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": [ 3 | { 4 | "repo": "rime/rime-ipa", 5 | "name": "国际音标", 6 | "schemas": [ 7 | "ipa_xsampa", 8 | "ipa_yunlong" 9 | ], 10 | "license": "LGPL-3.0-only" 11 | }, 12 | { 13 | "repo": "lotem/rime-bopomofo-script", 14 | "name": "注音文", 15 | "schemas": [ 16 | "bopomofo_script" 17 | ] 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RIME Plum Package Index 2 | ![](https://img.shields.io/github/license/LibreService/rppi) 3 | 4 | ## Supported platforms 5 | * [My RIME](https://github.com/LibreService/my_rime) 6 | 7 | ## Specification 8 | ```ts 9 | type PARENT_INDEX = { 10 | categories: { 11 | key: string 12 | name: string 13 | }[] 14 | } 15 | 16 | type CHILD_INDEX = { 17 | recipes: { 18 | repo: string // e.g. rime/rime-double-pinyin 19 | branch?: string // Omit if use default branch 20 | name: string // Prefer Simplified Chinese if applicable 21 | labels?: ('chord' | 'lua')[] 22 | schemas: string[] // e.g. luna_pinyin 23 | dependencies?: string[] // Hard dependencies, e.g. rime/rime-luna-pinyin 24 | reverseDependencies?: string[] // Reverse-lookup dependencies, e.g. rime/rime-stroke 25 | license?: string // Omit if no OSI-approved license 26 | }[] 27 | } 28 | ``` 29 | -------------------------------------------------------------------------------- /index.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2023-08-10", 3 | "categories": [ 4 | { 5 | "key": "Chinese", 6 | "name": "汉语" 7 | }, 8 | { 9 | "key": "English", 10 | "name": "英语" 11 | }, 12 | { 13 | "key": "Japanese", 14 | "name": "日语" 15 | }, 16 | { 17 | "key": "Korean", 18 | "name": "韩语" 19 | }, 20 | { 21 | "key": "Other", 22 | "name": "其他" 23 | }, 24 | { 25 | "key": "Collection", 26 | "name": "方案集" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rppi", 3 | "version": "0.1.0", 4 | "license": "Apache-2.0", 5 | "type": "module", 6 | "main": "src/index.d.ts", 7 | "files": [ 8 | "src" 9 | ], 10 | "scripts": { 11 | "lint": "eslint --ext .ts,.cjs . && eslint -c .eslintrc-json.cjs --ext .json .", 12 | "lint:fix": "eslint --ext .ts,.cjs --fix . && eslint -c .eslintrc-json.cjs --ext .json --fix .", 13 | "check": "tsc --noEmit", 14 | "validate": "node --loader ts-node/esm scripts/validate.ts", 15 | "serve": "serve --cors" 16 | }, 17 | "devDependencies": { 18 | "@types/node": "^20.4.9", 19 | "@typescript-eslint/eslint-plugin": "^6.3.0", 20 | "eslint": "^8.46.0", 21 | "eslint-config-standard": "^17.1.0", 22 | "eslint-plugin-json": "^3.1.0", 23 | "joi": "^17.9.2", 24 | "serve": "^14.2.0", 25 | "ts-node": "^10.9.1", 26 | "typescript": "^5.1.6" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /scripts/validate.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'fs' 2 | import joi from 'joi' 3 | 4 | const INDEX = 'index.json' 5 | const repoPattern = /^[-_a-zA-Z0-9]+\/[-_a-zA-Z0-9]+$/ 6 | const branchPattern = /^[-_a-zA-Z0-9]+$/ 7 | const schemaPattern = /^[-_a-zA-Z0-9]+$/ 8 | const labels = ['chord', 'lua'] 9 | 10 | const parent = joi.object({ 11 | date: joi.string().pattern(/\d+-\d+-\d+/), 12 | categories: joi.array().items( 13 | joi.object({ 14 | key: joi.string().required(), 15 | name: joi.string().required() 16 | }) 17 | ).required() 18 | }) 19 | 20 | const child = joi.object({ 21 | recipes: joi.array().items( 22 | joi.object({ 23 | repo: joi.string().pattern(repoPattern).required(), 24 | branch: joi.string().pattern(branchPattern), 25 | name: joi.string().required(), 26 | labels: joi.array().items(joi.string().valid(...labels)).unique(), 27 | schemas: joi.array().items(joi.string().pattern(schemaPattern)).required().unique(), 28 | dependencies: joi.array().items(joi.string().pattern(repoPattern)).unique(), 29 | reverseDependencies: joi.array().items(joi.string().pattern(repoPattern)).unique(), 30 | license: joi.string() 31 | }) 32 | ) 33 | }) 34 | 35 | const repos: string[] = [] 36 | const deps: string[] = [] 37 | 38 | function validate (path: string) { 39 | const file = `${path}/${INDEX}` 40 | console.log(`Validating ${file}`) 41 | const content = JSON.parse(readFileSync(file) as unknown as string) 42 | const isParent = 'categories' in content 43 | const { error } = (isParent ? parent : child).validate(content) 44 | if (error) { 45 | throw error 46 | } 47 | if (isParent) { 48 | for (const category of content.categories) { 49 | validate(`${path}/${category.key}`) 50 | } 51 | } else { 52 | for (const recipe of content.recipes) { 53 | const { repo, dependencies, reverseDependencies } = recipe 54 | if (repos.includes(repo)) { 55 | throw new Error(`Duplicated repo: ${repo}`) 56 | } 57 | repos.push(repo) 58 | dependencies && deps.push(...dependencies) 59 | reverseDependencies && deps.push(...reverseDependencies) 60 | } 61 | } 62 | } 63 | 64 | validate('.') 65 | 66 | for (const dependency of deps) { 67 | if (!repos.includes(dependency)) { 68 | throw new Error(`Unknown dependency ${dependency}`) 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/index.d.ts: -------------------------------------------------------------------------------- 1 | type PARENT_INDEX = { 2 | categories: { 3 | key: string 4 | name: string 5 | }[] 6 | } 7 | 8 | type LABEL = 'chord' | 'lua' 9 | 10 | type RECIPE = { 11 | repo: string 12 | branch?: string 13 | name: string 14 | labels?: LABEL[] 15 | schemas: string[] 16 | dependencies?: string[] 17 | reverseDependencies?: string[] 18 | license?: string 19 | } 20 | 21 | type CHILD_INDEX = { 22 | recipes: RECIPE[] 23 | } 24 | 25 | export { 26 | PARENT_INDEX, 27 | LABEL, 28 | RECIPE, 29 | CHILD_INDEX 30 | } 31 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "strict": true, 8 | "isolatedModules": true, 9 | "esModuleInterop": true, 10 | "lib": ["ESNext"], 11 | "skipLibCheck": true, 12 | "noEmit": true 13 | }, 14 | "include": ["scripts/**.ts"] 15 | } 16 | --------------------------------------------------------------------------------