emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/pyim-basedict a819eed 01/32: Init commit


From: Feng Shu
Subject: [elpa] externals/pyim-basedict a819eed 01/32: Init commit
Date: Wed, 10 Mar 2021 20:56:12 -0500 (EST)

branch: externals/pyim-basedict
commit a819eedd9404ff59979378271dcae4ce06d1a287
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    Init commit
---
 .gitignore               |   2 ++
 README.md                |  21 ++++++++++++
 chinese-pyim-basedict.el |  84 +++++++++++++++++++++++++++++++++++++++++++++++
 pyim-basedict.pyim.gz    | Bin 0 -> 896099 bytes
 4 files changed, 107 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4b7d2ca
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/*~
+/chinese-pyim-basedict.org
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6a6295d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,21 @@
+- [chinese-pyim-basedict README](#chinese-pyim-basedict-readme)
+  - [简介](#简介)
+  - [安装和使用](#安装和使用)
+
+# chinese-pyim-basedict README<a id="orgheadline3"></a>
+
+## 简介<a id="orgheadline1"></a>
+
+Chinese-pyim-basedict 是 chinese-pyim 的默认词库,词库的内容的来源:
+
+1.  libpinyin 项目内置的词库
+2.  chinese-pyim 用户贡献的个人词库
+
+## 安装和使用<a id="orgheadline2"></a>
+
+1.  配置melpa源,参考:<http://melpa.org/#/getting-started>
+2.  M-x package-install RET chinese-pyim-basedict RET
+3.  在emacs配置文件中(比如: ~/.emacs)添加如下代码:
+
+        (require 'chinese-pyim-basedict)
+        (chinese-pyim-basedict-enable)
diff --git a/chinese-pyim-basedict.el b/chinese-pyim-basedict.el
new file mode 100644
index 0000000..a6b236a
--- /dev/null
+++ b/chinese-pyim-basedict.el
@@ -0,0 +1,84 @@
+;;; chinese-pyim-basedict.el --- The default pinyin dict of chinese-pyim
+
+;; * Header
+;; Copyright (C) 2015 Feng Shu <tumashu@163.com>
+
+;; Author: Feng Shu <tumashu@163.com>
+;; URL: https://github.com/tumashu/chinese-pyim-basedict
+;; Version: 0.0.1
+;; Keywords: convenience, Chinese, pinyin, input-method, complete
+
+;;; License:
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 3
+;; of the License, or (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+;; * chinese-pyim-basedict README                         :README:doc:
+
+;; ** 简介
+;; Chinese-pyim-basedict 是 chinese-pyim 的默认词库,词库的内容的来源:
+
+;; 1. libpinyin 项目内置的词库
+;; 2. chinese-pyim 用户贡献的个人词库
+
+;; ** 安装和使用
+;; 1. 配置melpa源,参考:http://melpa.org/#/getting-started
+;; 2. M-x package-install RET chinese-pyim-basedict RET
+;; 3. 在emacs配置文件中(比如: ~/.emacs)添加如下代码:
+;;    #+BEGIN_EXAMPLE
+;;    (require 'chinese-pyim-basedict)
+;;    (chinese-pyim-basedict-enable)
+;;    #+END_EXAMPLE
+
+;;; Code:
+;; * 代码                                                               :code:
+;; #+BEGIN_SRC emacs-lisp
+
+;;;###autoload
+(defun chinese-pyim-basedict-enable ()
+  "Add basedict to chinese-pyim."
+  (interactive)
+  (let* ((file (concat (file-name-directory
+                        (locate-library "chinese-pyim-basedict.el"))
+                       "pyim-basedict.pyim.gz")))
+    (when (file-exists-p file)
+      (if (featurep 'chinese-pyim)
+          (pyim-extra-dicts-add-dict
+           `(:name "Basedict-elpa"
+                   :file ,file
+                   :coding utf-8-unix
+                   :dict-type pinyin-dict
+                   :elpa t))
+        (message "Chinese-pyim 没有安装,chinese-pyim-basedict 启用失败。")))))
+
+;; Enable pyim-basedict
+(chinese-pyim-basedict-enable)
+
+;; #+END_SRC
+
+;; * Footer
+
+;; #+BEGIN_SRC emacs-lisp
+(provide 'chinese-pyim-basedict)
+
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
+
+;;; chinese-pyim-basedict.el ends here
+;; #+END_SRC
diff --git a/pyim-basedict.pyim.gz b/pyim-basedict.pyim.gz
new file mode 100644
index 0000000..49e69c3
Binary files /dev/null and b/pyim-basedict.pyim.gz differ



reply via email to

[Prev in Thread] Current Thread [Next in Thread]