Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nk2028/tshet-uinh-examples
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 20220324
Choose a base ref
...
head repository: nk2028/tshet-uinh-examples
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 4,047 additions and 7,781 deletions.
  1. +22 −0 .github/actions/publish-to-cos/action.yml
  2. +49 −0 .github/workflows/build.yml
  3. +0 −35 .github/workflows/publish-cos.yml
  4. +0 −28 .github/workflows/publish-npm.yml
  5. +0 −28 .github/workflows/test.yml
  6. +1 −1 .gitignore
  7. +0 −3 .npmignore
  8. +1 −1 .vscode/extensions.json
  9. +0 −5 .vscode/settings.json
  10. +17 −18 README.md
  11. +266 −272 ayaka_v8.js
  12. +11 −7 baxter.js
  13. +0 −231 blankego.js
  14. +0 −85 build.py
  15. +90 −0 build/main.js
  16. +0 −245 chiangxhua.js
  17. +157 −0 eslint.config.js
  18. +0 −243 fanwan.js
  19. +177 −227 gwongzau.js
  20. +175 −0 high_tang.js
  21. +8 −6 karlgren.js
  22. +0 −221 kyonh.js
  23. +0 −293 langjin.js
  24. +108 −191 mid_tang.js
  25. +507 −0 mongol.js
  26. +135 −116 msoeg_v8.js
  27. +268 −0 n_song.js
  28. +1,001 −29 package-lock.json
  29. +21 −11 package.json
  30. +58 −31 panwuyun.js
  31. +201 −148 putonghua.js
  32. +36 −0 rules/tagged-is.js
  33. +0 −233 sliark_peengqvim.js
  34. +0 −510 taibu.js
  35. +0 −1 test/.prettierrc
  36. +57 −71 test/main.js
  37. +52 −66 tupa.js
  38. +132 −99 unt.js
  39. +20 −18 wangli.js
  40. +73 −0 yec_en_hua.js
  41. +331 −448 zaonhe.js
  42. +73 −62 zhongyuan.js
  43. +0 −3,798 zyepheng.js
22 changes: 22 additions & 0 deletions .github/actions/publish-to-cos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish to Tencent Cloud COS
description: Publish static files to Tencent Cloud Object Storage

runs:
using: composite
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install coscmd
run: pip install coscmd
shell: bash

- name: Configure coscmd
run: coscmd config -a $SECRET_ID -s $SECRET_KEY -b nk2028-1305783649 -r ap-guangzhou
shell: bash

- name: Publish static files to COS
run: coscmd upload -rs --delete -f . /tshet-uinh-examples --ignore '*/.*,*/node_modules/*,./test/*,./build/*,./dist/*,./package.json,./package-lock.json,./eslint.config.js'
shell: bash
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build

on:
workflow_dispatch:
push:
branches: [main, dev, dev-*]
pull_request:
branches: [main]
release:
types: [created]

jobs:
build:
name: ${{ github.event_name == 'release' && 'Publish to NPM' || (github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.repository == 'nk2028/tshet-uinh-examples' && github.ref == 'refs/heads/main')) && 'Publish to Tencent Cloud COS' || 'Test' }}
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: https://registry.npmjs.org/

- name: Install Node.js dependencies
run: npm ci

- name: Lint schemata
run: npm run lint

- name: Build project
run: npm run build

- name: Run tests
run: npm test

- if: github.event_name == 'release'
name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

- if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.repository == 'nk2028/tshet-uinh-examples' && github.ref == 'refs/heads/main')
name: Publish to Tencent Cloud COS
uses: ./.github/actions/publish-to-cos
env:
SECRET_ID: ${{ secrets.SecretId }}
SECRET_KEY: ${{ secrets.SecretKey }}
35 changes: 0 additions & 35 deletions .github/workflows/publish-cos.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/publish-npm.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
/index.js
dist
3 changes: 0 additions & 3 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "ms-python.python"]
"recommendations": ["ms-python.python"]
}
5 changes: 0 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": false
},
"[python]": {
"editor.defaultFormatter": "ms-python.python"
}
}
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
# qieyun-examples
# tshet-uinh-examples

JavaScript code examples to generate the derivatives of the Qieyun phonological system using qieyun-js
JavaScript code examples to generate the derivatives of the Qieyun system using TshetUinh.js

## Usage

```
https://nk2028-1305783649.file.myqcloud.com/qieyun-examples/<filename>
https://nk2028-1305783649.file.myqcloud.com/tshet-uinh-examples/<filename>
```

## List of included examples

**切韻音系拼音或轉寫 romanization/transcription of the Qieyun phonological system**
**切韻音系拼音或轉寫 romanization/transcription of the Qieyun system**

- 切韻拼音 (Tshet-uinh Phonetic Alphabet): `tupa.js`
- 白一平轉寫 (Baxter’s Transcription): `baxter.js`
- 有女羅馬字 (Blankego’s Romanization): `blankego.js`
- 古韻羅馬字 (Koxyonh’s Romanization): `kyonh.js`
- 隋拼 (Zyepheng): `zyepheng.js`
- Sliark 拼音 (Sliark’s Romanization): `sliark_peengqvim.js`

**切韻音系擬音 reconstruction of the Qieyun phonological system**
**切韻音系擬音 reconstruction of the Qieyun system**

- 高本漢擬音 (Bernhard Karlgren’s Reconstruction): `karlgren.js`
- 王力擬音 (Wang Li’s Reconstruction): `wangli.js`
- 潘悟雲擬音 (Pan Wuyun’s Reconstruction): `panwuyun.js`
- unt 切韻擬音 (unt’s Qieyun Reconstruction): `unt.js`
- msoeg 中古擬音 V8 (msoeg’s Middle Chinese Reconstruction V8): `msoeg_v8.js`
- unt 擬音 (unt’s Qieyun Reconstruction): `unt.js`
- msoeg 擬音 V8 (msoeg’s Reconstruction V8): `msoeg_v8.js`

**推導後世音系 extrapolated later phonological system**
**推導後世音系 extrapolated phonological system of later periods**

- 推導盛中唐擬音 (Extrapolated Reconstruction of High and Middle Tang Chinese): `mid_tang.js`
- 推導《聲音唱和圖》擬音 (Extrapolated Reconstruction of _Shing-im Chiang-xhua Dhu_): `chiangxhua.js`
- 推導盛唐(平水韻)擬音 (Extrapolated Reconstruction of High Tang Chinese (*Pingshui Yun*)): `high_tang.js`
- 推導中唐(韻圖)擬音 (Extrapolated Reconstruction of Middle Tang Chinese (*Yuntu*)): `mid_tang.js`
- 推導北宋(聲音唱和圖)擬音 (Extrapolated Reconstruction of Northern Song Chinese (*Shengyin Changhe Tu*)): `n_song.js`
- 推導《蒙古字韻》 (Extrapolated _Menggu Ziyun_): `mongol.js`
- 推導《中原音韻》擬音 (Extrapolated Reconstruction of _Zhongyuan Yinyun_): `zhongyuan.js`
- 推導《分韻撮要》擬音 (Extrapolated Reconstruction of _Fan-Wan Tsʽüt-Iú_): `fanwan.js`

**現代方言推導音 extrapolated pronunciations of modern dialects**

- 推導普通話 (Extrapolated Putonghua): `putonghua.js`
- 推導廣州音 (Extrapolated Cantonese): `gwongzau.js`
- 推導廣州話 (Extrapolated Cantonese): `gwongzau.js`
- 推導上海話 (Extrapolated Shanghainese): `zaonhe.js`
- 推導南京話 (Extrapolated Nankinese): `langjin.js`
- 推導大埔話 (Extrapolated Taibu Hakka): `taibu.js`

**人造音系 artificial phonological system**

- 綾香思考音系 (Ayaka’s Phonological System for Thinking): `ayaka_v8.js`
- 不通話 (Yec-en-ʻua): `yec_en_hua.js`
Loading