summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 13:46:59 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 13:46:59 +0000
commitf9d155155cb0ce1c2684ca0cc6fd43b987ea7c8d (patch)
tree3641c93e975421254e4459386e52796392363a6f
parente57ecf457377c97480d0e2c45e982affff482919 (diff)
automatic import of python-opencc-python-reimplementedopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-opencc-python-reimplemented.spec678
-rw-r--r--sources1
3 files changed, 680 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..abb0165 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/opencc-python-reimplemented-0.1.7.tar.gz
diff --git a/python-opencc-python-reimplemented.spec b/python-opencc-python-reimplemented.spec
new file mode 100644
index 0000000..41341e9
--- /dev/null
+++ b/python-opencc-python-reimplemented.spec
@@ -0,0 +1,678 @@
+%global _empty_manifest_terminate_build 0
+Name: python-opencc-python-reimplemented
+Version: 0.1.7
+Release: 1
+Summary: OpenCC made with Python
+License: Apache License
+URL: https://github.com/yichen0831/opencc-python
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/8d/6d/c6f37eed651dd6b752e50f80a93396cdaa42a6acc6ce05ad7452303ea511/opencc-python-reimplemented-0.1.7.tar.gz
+BuildArch: noarch
+
+
+%description
+# 開放中文轉換(Pure Python)
+
+
+
+Open Chinese convert (OpenCC) in pure Python.
+
+
+
+## Introduction 簡介
+
+
+
+[opencc-python](https://github.com/yichen0831/opencc-python) 是用純 Python 所寫,使用由 BYVoid(<byvoid.kcp@gmail.com>) 所開發的 [OpenCC](https://github.com/BYVoid/OpenCC) 中的字典檔案。
+
+opencc-python 可以支援 Python2.7 及 Python3.x。
+
+
+
+[opencc-python](https://github.com/yichen0831/opencc-python) is made by pure Python with the dictionary files of [OpenCC](https://github.com/BYVoid/OpenCC) which is developed by BYVoid(<byvoid.kcp@gmail.com>).
+
+
+
+opencc-python can run with Python2.7 and Python3.x.
+
+
+
+## Installation 安裝
+
+
+
+將 `opencc` 這個目錄複製到你正在開發的專案中即可,或是執行(需要管理者權限):
+
+
+
+```sh
+
+python setup.py install
+
+```
+
+
+
+套件也可從 [PyPI](https://pypi.org/project/opencc-python-reimplemented/) 安裝,使用指令:
+
+
+
+```sh
+
+pip install opencc-python-reimplemented
+
+```
+
+
+
+Copy the `opencc` folder to your project, or run (admin required)
+
+
+
+```sh
+
+python setup.py install
+
+```
+
+
+
+The package can also be installed from [PyPI](https://pypi.org/project/opencc-python-reimplemented/) by issuing:
+
+
+
+```sh
+
+pip install opencc-python-reimplemented
+
+```
+
+
+
+## Usage 使用方式
+
+### Code
+
+
+
+``` python
+
+from opencc import OpenCC
+
+cc = OpenCC('s2t') # convert from Simplified Chinese to Traditional Chinese
+
+# can also set conversion by calling set_conversion
+
+# cc.set_conversion('s2tw')
+
+to_convert = '开放中文转换'
+
+converted = cc.convert(to_convert)
+
+```
+
+### Command Line
+
+
+
+```sh
+
+usage: python -m opencc [-h] [-i <file>] [-o <file>] [-c <conversion>]
+
+ [--in-enc <encoding>] [--out-enc <encoding>]
+
+
+
+optional arguments:
+
+ -h, --help show this help message and exit
+
+ -i <file>, --input <file>
+
+ Read original text from <file>. (default: None = STDIN)
+
+ -o <file>, --output <file>
+
+ Write converted text to <file>. (default: None = STDOUT)
+
+ -c <conversion>, --config <conversion>
+
+ Conversion (default: None)
+
+ --in-enc <encoding> Encoding for input (default: UTF-8)
+
+ --out-enc <encoding> Encoding for output (default: UTF-8)
+
+
+
+example with UTF-8 encoded file:
+
+
+
+ python -m opencc -c s2t -i my_simplified_input_file.txt -o my_traditional_output_file.txt
+
+
+
+See https://docs.python.org/3/library/codecs.html#standard-encodings for list of encodings.
+
+```
+
+
+
+### Conversions 轉換
+
+
+
+* `hk2s`: Traditional Chinese (Hong Kong standard) to Simplified Chinese
+
+
+
+* `s2hk`: Simplified Chinese to Traditional Chinese (Hong Kong standard)
+
+
+
+* `s2t`: Simplified Chinese to Traditional Chinese
+
+
+
+* `s2tw`: Simplified Chinese to Traditional Chinese (Taiwan standard)
+
+
+
+* `s2twp`: Simplified Chinese to Traditional Chinese (Taiwan standard, with phrases)
+
+
+
+* `t2hk`: Traditional Chinese to Traditional Chinese (Hong Kong standard)
+
+
+
+* `t2s`: Traditional Chinese to Simplified Chinese
+
+
+
+* `t2tw`: Traditional Chinese to Traditional Chinese (Taiwan standard)
+
+
+
+* `tw2s`: Traditional Chinese (Taiwan standard) to Simplified Chinese
+
+
+
+* `tw2sp`: Traditional Chinese (Taiwan standard) to Simplified Chinese (with phrases)
+
+
+
+## Issues 問題
+
+
+
+當轉換有兩個以上的字詞可能時,程式只會使用第一個。
+
+
+
+When there is more than one conversion available, only the first one is taken.
+
+
+
+%package -n python3-opencc-python-reimplemented
+Summary: OpenCC made with Python
+Provides: python-opencc-python-reimplemented
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-opencc-python-reimplemented
+# 開放中文轉換(Pure Python)
+
+
+
+Open Chinese convert (OpenCC) in pure Python.
+
+
+
+## Introduction 簡介
+
+
+
+[opencc-python](https://github.com/yichen0831/opencc-python) 是用純 Python 所寫,使用由 BYVoid(<byvoid.kcp@gmail.com>) 所開發的 [OpenCC](https://github.com/BYVoid/OpenCC) 中的字典檔案。
+
+opencc-python 可以支援 Python2.7 及 Python3.x。
+
+
+
+[opencc-python](https://github.com/yichen0831/opencc-python) is made by pure Python with the dictionary files of [OpenCC](https://github.com/BYVoid/OpenCC) which is developed by BYVoid(<byvoid.kcp@gmail.com>).
+
+
+
+opencc-python can run with Python2.7 and Python3.x.
+
+
+
+## Installation 安裝
+
+
+
+將 `opencc` 這個目錄複製到你正在開發的專案中即可,或是執行(需要管理者權限):
+
+
+
+```sh
+
+python setup.py install
+
+```
+
+
+
+套件也可從 [PyPI](https://pypi.org/project/opencc-python-reimplemented/) 安裝,使用指令:
+
+
+
+```sh
+
+pip install opencc-python-reimplemented
+
+```
+
+
+
+Copy the `opencc` folder to your project, or run (admin required)
+
+
+
+```sh
+
+python setup.py install
+
+```
+
+
+
+The package can also be installed from [PyPI](https://pypi.org/project/opencc-python-reimplemented/) by issuing:
+
+
+
+```sh
+
+pip install opencc-python-reimplemented
+
+```
+
+
+
+## Usage 使用方式
+
+### Code
+
+
+
+``` python
+
+from opencc import OpenCC
+
+cc = OpenCC('s2t') # convert from Simplified Chinese to Traditional Chinese
+
+# can also set conversion by calling set_conversion
+
+# cc.set_conversion('s2tw')
+
+to_convert = '开放中文转换'
+
+converted = cc.convert(to_convert)
+
+```
+
+### Command Line
+
+
+
+```sh
+
+usage: python -m opencc [-h] [-i <file>] [-o <file>] [-c <conversion>]
+
+ [--in-enc <encoding>] [--out-enc <encoding>]
+
+
+
+optional arguments:
+
+ -h, --help show this help message and exit
+
+ -i <file>, --input <file>
+
+ Read original text from <file>. (default: None = STDIN)
+
+ -o <file>, --output <file>
+
+ Write converted text to <file>. (default: None = STDOUT)
+
+ -c <conversion>, --config <conversion>
+
+ Conversion (default: None)
+
+ --in-enc <encoding> Encoding for input (default: UTF-8)
+
+ --out-enc <encoding> Encoding for output (default: UTF-8)
+
+
+
+example with UTF-8 encoded file:
+
+
+
+ python -m opencc -c s2t -i my_simplified_input_file.txt -o my_traditional_output_file.txt
+
+
+
+See https://docs.python.org/3/library/codecs.html#standard-encodings for list of encodings.
+
+```
+
+
+
+### Conversions 轉換
+
+
+
+* `hk2s`: Traditional Chinese (Hong Kong standard) to Simplified Chinese
+
+
+
+* `s2hk`: Simplified Chinese to Traditional Chinese (Hong Kong standard)
+
+
+
+* `s2t`: Simplified Chinese to Traditional Chinese
+
+
+
+* `s2tw`: Simplified Chinese to Traditional Chinese (Taiwan standard)
+
+
+
+* `s2twp`: Simplified Chinese to Traditional Chinese (Taiwan standard, with phrases)
+
+
+
+* `t2hk`: Traditional Chinese to Traditional Chinese (Hong Kong standard)
+
+
+
+* `t2s`: Traditional Chinese to Simplified Chinese
+
+
+
+* `t2tw`: Traditional Chinese to Traditional Chinese (Taiwan standard)
+
+
+
+* `tw2s`: Traditional Chinese (Taiwan standard) to Simplified Chinese
+
+
+
+* `tw2sp`: Traditional Chinese (Taiwan standard) to Simplified Chinese (with phrases)
+
+
+
+## Issues 問題
+
+
+
+當轉換有兩個以上的字詞可能時,程式只會使用第一個。
+
+
+
+When there is more than one conversion available, only the first one is taken.
+
+
+
+%package help
+Summary: Development documents and examples for opencc-python-reimplemented
+Provides: python3-opencc-python-reimplemented-doc
+%description help
+# 開放中文轉換(Pure Python)
+
+
+
+Open Chinese convert (OpenCC) in pure Python.
+
+
+
+## Introduction 簡介
+
+
+
+[opencc-python](https://github.com/yichen0831/opencc-python) 是用純 Python 所寫,使用由 BYVoid(<byvoid.kcp@gmail.com>) 所開發的 [OpenCC](https://github.com/BYVoid/OpenCC) 中的字典檔案。
+
+opencc-python 可以支援 Python2.7 及 Python3.x。
+
+
+
+[opencc-python](https://github.com/yichen0831/opencc-python) is made by pure Python with the dictionary files of [OpenCC](https://github.com/BYVoid/OpenCC) which is developed by BYVoid(<byvoid.kcp@gmail.com>).
+
+
+
+opencc-python can run with Python2.7 and Python3.x.
+
+
+
+## Installation 安裝
+
+
+
+將 `opencc` 這個目錄複製到你正在開發的專案中即可,或是執行(需要管理者權限):
+
+
+
+```sh
+
+python setup.py install
+
+```
+
+
+
+套件也可從 [PyPI](https://pypi.org/project/opencc-python-reimplemented/) 安裝,使用指令:
+
+
+
+```sh
+
+pip install opencc-python-reimplemented
+
+```
+
+
+
+Copy the `opencc` folder to your project, or run (admin required)
+
+
+
+```sh
+
+python setup.py install
+
+```
+
+
+
+The package can also be installed from [PyPI](https://pypi.org/project/opencc-python-reimplemented/) by issuing:
+
+
+
+```sh
+
+pip install opencc-python-reimplemented
+
+```
+
+
+
+## Usage 使用方式
+
+### Code
+
+
+
+``` python
+
+from opencc import OpenCC
+
+cc = OpenCC('s2t') # convert from Simplified Chinese to Traditional Chinese
+
+# can also set conversion by calling set_conversion
+
+# cc.set_conversion('s2tw')
+
+to_convert = '开放中文转换'
+
+converted = cc.convert(to_convert)
+
+```
+
+### Command Line
+
+
+
+```sh
+
+usage: python -m opencc [-h] [-i <file>] [-o <file>] [-c <conversion>]
+
+ [--in-enc <encoding>] [--out-enc <encoding>]
+
+
+
+optional arguments:
+
+ -h, --help show this help message and exit
+
+ -i <file>, --input <file>
+
+ Read original text from <file>. (default: None = STDIN)
+
+ -o <file>, --output <file>
+
+ Write converted text to <file>. (default: None = STDOUT)
+
+ -c <conversion>, --config <conversion>
+
+ Conversion (default: None)
+
+ --in-enc <encoding> Encoding for input (default: UTF-8)
+
+ --out-enc <encoding> Encoding for output (default: UTF-8)
+
+
+
+example with UTF-8 encoded file:
+
+
+
+ python -m opencc -c s2t -i my_simplified_input_file.txt -o my_traditional_output_file.txt
+
+
+
+See https://docs.python.org/3/library/codecs.html#standard-encodings for list of encodings.
+
+```
+
+
+
+### Conversions 轉換
+
+
+
+* `hk2s`: Traditional Chinese (Hong Kong standard) to Simplified Chinese
+
+
+
+* `s2hk`: Simplified Chinese to Traditional Chinese (Hong Kong standard)
+
+
+
+* `s2t`: Simplified Chinese to Traditional Chinese
+
+
+
+* `s2tw`: Simplified Chinese to Traditional Chinese (Taiwan standard)
+
+
+
+* `s2twp`: Simplified Chinese to Traditional Chinese (Taiwan standard, with phrases)
+
+
+
+* `t2hk`: Traditional Chinese to Traditional Chinese (Hong Kong standard)
+
+
+
+* `t2s`: Traditional Chinese to Simplified Chinese
+
+
+
+* `t2tw`: Traditional Chinese to Traditional Chinese (Taiwan standard)
+
+
+
+* `tw2s`: Traditional Chinese (Taiwan standard) to Simplified Chinese
+
+
+
+* `tw2sp`: Traditional Chinese (Taiwan standard) to Simplified Chinese (with phrases)
+
+
+
+## Issues 問題
+
+
+
+當轉換有兩個以上的字詞可能時,程式只會使用第一個。
+
+
+
+When there is more than one conversion available, only the first one is taken.
+
+
+
+%prep
+%autosetup -n opencc-python-reimplemented-0.1.7
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-opencc-python-reimplemented -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.7-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..0a19ea9
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+81be109d33658ab2455e5a55310877e3 opencc-python-reimplemented-0.1.7.tar.gz