0.3.1 • Published 1 year ago
@libreservice/my-opencc v0.3.1
My OpenCC
Convert between Simplified and Traditional Chinese.
This is a STATIC website so you DON'T need to own a server to host it.
All computation is performed in browser, thanks to Web Assembly.
It's also a PWA, so you can install it like a native App and use it OFFLINE.
Transform matrix
| 源\目标 | s | t | tw | hk | jp |
|---|---|---|---|---|---|
| s | - | s2t | s2tw(p) | s2hk | - |
| t | t2s | - | t2tw | t2hk | t2jp |
| tw | tw2s(p) | tw2t | - | - | - |
| hk | hk2s | hk2t | - | - | - |
| jp | - | jp2t | - | - | - |
Self host
Download latest artifact built by GitHub Actions.
Development workflow
My OpenCC can be built on Linux and macOS.
For Windows, you may use WSL.
Install node
You may use nvm to install node.
Install pnpm and dev dependencies
npm i -g pnpm
pnpm iInstall emsdk
https://emscripten.org/docs/getting_started/downloads.html
Get submodule
git submodule init
git submodule updateBuild wasm
pnpm run native
pnpm run lib
pnpm run wasmRun develop server
pnpm run devLint
pnpm run lint:fixCheck type
pnpm run checkBuild
pnpm run buildTest
pnpm run testPreview
pnpm run previewDeploy
export LIBRESERVICE_CDN=https://cdn.jsdelivr.net/npm/@libreservice/my-opencc@VERSION/dist/ # optional
vercel build --prod
vercel deploy --prebuilt --prodLicense
AGPLv3+