Compare commits

...

No commits in common. "main" and "pinyin-completion" have entirely different histories.

5 changed files with 62 additions and 3 deletions

16
.SRCINFO Normal file
View file

@ -0,0 +1,16 @@
pkgbase = pinyin-completion
pkgdesc = complete path name based upon the pinyin acronym of Chinese characters
pkgver = 56.5feec0b
pkgrel = 1
url = https://github.com/petronny/pinyin-completion
install = pinyin-completion.install
arch = any
license = GPL3
makedepends = git
depends = python
source = git+https://github.com/petronny/pinyin-completion
source = pinyin-completion.install
sha256sums = SKIP
sha256sums = f6dbcc8fc15c6de71897281f1d64f05df7dfd1e5ec3b1a70bd46a4f3078f9f13
pkgname = pinyin-completion

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*.log
*.tar*
*/

35
PKGBUILD Normal file
View file

@ -0,0 +1,35 @@
# Maintainer: Jingbei Li <i@jingbei.li>
pkgname=pinyin-completion
pkgver=56.5feec0b
pkgrel=1
pkgdesc="complete path name based upon the pinyin acronym of Chinese characters"
arch=('any')
url="https://github.com/petronny/pinyin-completion"
license=('GPL3')
depends=('python')
makedepends=('git')
source=("git+https://github.com/petronny/pinyin-completion"
"pinyin-completion.install")
sha256sums=('SKIP'
'f6dbcc8fc15c6de71897281f1d64f05df7dfd1e5ec3b1a70bd46a4f3078f9f13')
install='pinyin-completion.install'
pkgver() {
cd $pkgname
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
build() {
cd "$srcdir/$pkgname/tools"
python table-generator.py > ../pinyin_completion/pinyin_initial.py
}
package() {
cd $pkgname
mkdir -p "$pkgdir/usr/share/$pkgname/"
cp -r shell "$pkgdir/usr/share/$pkgname/"
cp -r tools "$pkgdir/usr/share/$pkgname/"
python setup.py install --root=$pkgdir/ --optimize=1
}

View file

@ -1,3 +0,0 @@
# aur.git
This is a experimental mirror of the aur.git repository backing [the AUR](https://aur.archlinux.org).

View file

@ -0,0 +1,8 @@
post_install() {
echo "For bash users, source /usr/share/pinyin-completion/shell/pinyin-comp.bash in your ~/.bashrc"
echo "For bash users, source /usr/share/pinyin-completion/shell/pinyin-comp.zsh in your ~/.zshrc"
echo -e "\n"
echo "If you feel the default pinyin_initial.py is too big, which cause sensible delay and un-wanted ambigurous,just use you favourite editor to modify tools/unicode-han-pinyin.txt, then regenerate pinyin_initial.py by running:"
echo "/usr/share/pinyin-completion-git/tools/table-generator.py > pinyin_initial.py"
}