Commit dae6064a authored by Yuanle Song's avatar Yuanle Song

add a README file

parent d5d1b1a6
* COMMENT -*- mode: org -*-
#+Date: 2019-09-28
Time-stamp: <2019-09-28>
* zero-pinyin-service
zero-pinyin-service is a dbus service to provide pinyin input method service
for zero-el pinyin input method. This allows doing arbitrarily complex things
in C, while the elisp side code can be simple and efficient.
You can see the dbus service interface in
./com.emacsos.zero.ZeroPinyinService1.ZeroPinyinServiceInterface.xml
You can check zero-el document at https://blog.emacsos.com/zero-el.html
zero-pinyin-service requires a character/word table to get candidates for
pinyin preedit string. It uses libpyzy's openphrase db for
this. zero-pinyin-service should know how to break pinyin and how to convert
pinyin preedit string to Chinese character candidates, currently it also use
libpyzy for this. So you can think of the current implementation as an adapter
that makes libpyzy work with zero-el pinyin input method. This implementation
is to get zero-el pinyin working with minimum effort. There are lots of
improvements that can be done here.
* how to build zero-pinyin-service
- Get [[https://mesonbuild.com][meson build tool]].
- Install zero-pinyin-service dependencies
#+BEGIN_SRC sh
sudo apt install libglib2.0-dev libsqlite3-dev uuid-dev
#+END_SRC
- Build zero-pinyin-service
#+BEGIN_SRC sh
git clone https://gitlab.emacsos.com/sylecn/libpyzy.git
cd libpyzy/src/
git clone https://gitlab.emacsos.com/sylecn/zero-pinyin-service.git
cd zero-pinyin-service/
meson setup release/
cd release && ninja
#+END_SRC
You can install it on local system via
#+BEGIN_SRC sh
cd release
sudo ninja install
#+END_SRC
Or you can build a deb and install the deb instead.
- Create deb for zero-pinyin-service
Create deb requires [[https://github.com/jordansissel/fpm][fpm]] tool.
#+BEGIN_SRC sh
fpm --version
#+END_SRC
At project root dir,
#+BEGIN_SRC sh
./create-deb.sh
#+END_SRC
** how to install meson
Read official doc for how to install it. The key commands are
#+BEGIN_SRC sh
apt install python3-pip
python3 -m pip install --user meson
# add ~/.local/bin to PATH
#+END_SRC
** how to install fpm tool
Read official doc for how to install it. The key commands are
#+BEGIN_SRC sh
apt install ruby ruby-dev
gem install --user fpm
# add ruby gem bin dir to PATH
#+END_SRC
* 2019-08-31 ibus-pinyin user db inference notice.
zero-pinyin-service reuses ibus-pinyin's userdb at
~/.cache/ibus/pinyin/user-1.0.db
This is generally not a problem. But if ibus-pinyin (libpyzy) changes their
table schema in the future, zero-pinyin-service may require update.
zero-pinyin-service also stores user phrase in this db. So user phrases are
shared between zero-pinyin and ibus-pinyin.
If you don't use ibus-pinyin, this is not a problem for
you. zero-pinyin-service works fine when ibus-pinyin is not installed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment