Giter Club home page Giter Club logo

atmouse- / my_rime Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libreservice/my_rime

0.0 1.0 0.0 118 KB

Free and Open Source online Chinese IME powered by RIME. 自由开源在线中文输入法 拼音 双拼 粤语 注音 五笔 仓颉 速成

Home Page: https://my-rime.vercel.app/

License: GNU Affero General Public License v3.0

Shell 4.40% JavaScript 11.42% C++ 3.48% Lua 0.20% TypeScript 57.76% CSS 0.27% HTML 0.82% Vue 20.61% Dockerfile 1.05%

my_rime's Introduction

My RIME

Chinese IME powered by RIME.

https://my-rime.vercel.app/

If you want to distribute your own IME, see customize.

Self host

Download latest artifact built by GitHub Actions.

Development workflow

My RIME can be built on Linux.

Install node

You may use nvm to install node.

Install pnpm and dev dependencies

npm i -g pnpm
pnpm i

Install RIME dependencies

apt install libboost-dev \
  libboost-filesystem-dev \
  libboost-regex-dev \
  libboost-system-dev \
  libyaml-cpp-dev \
  libleveldb-dev \
  libmarisa-dev \
  libopencc-dev

Install emsdk

https://emscripten.org/docs/getting_started/downloads.html

Get submodule

It's not recommended to clone recursively, as many boost libs are not needed.

pnpm run submodule

Get font

Uncommon characters are rendered using 花园明朝.

pnpm run font

Build wasm

pnpm run native
pnpm run schema
export ENABLE_LOGGING=ON # optional
pnpm run lib
pnpm run wasm

Run develop server

pnpm run dev

The app is accessible at http://localhost:5173

Optionally, go to http://localhost:5173/?debug=on so that you can send raw key sequences to librime, e.g. {Shift+Delete}, {Release+a}. This feature is better used when you set ENABLE_LOGGING=ON in the previous step.

Lint

pnpm run lint:fix

Check type

pnpm run check

Build

pnpm run build

Test

pnpm run test

Preview

pnpm run preview

Deploy (maintainer only)

# publish IMEs
declare -a packages=(
  ... # targets output by pnpm run schema
)
for package in "${packages[@]}"; do
  pushd public/ime/$package
  npm publish
  popd
done

# set VERSION to avoid CDN and browser caching old version
export LIBRESERVICE_CDN=https://cdn.jsdelivr.net/npm/@libreservice/my-rime@VERSION/dist/
export RIME_CDN=https://cdn.jsdelivr.net/npm/@rime-contrib/

vercel build --prod
npm publish
vercel deploy --prebuilt --prod

Docker

docker build \
  --build-arg ENABLE_LOGGING=ON \
  -t my-rime .
docker run --name my-rime -d my-rime

Let's say the IP address of the container is 172.17.0.2 (got by docker inspect my-rime | grep IPAddress), then My RIME is accessible at http://172.17.0.2/.

License

AGPLv3+

my_rime's People

Contributors

eagleoflqj avatar bczhc avatar atmouse- avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.