From f62c11a2aeffd7e6f1c69812df7bc339746edce6 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 18 May 2023 03:48:30 +0000 Subject: automatic import of python-pyewts --- .gitignore | 1 + python-pyewts.spec | 453 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 455 insertions(+) create mode 100644 python-pyewts.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..cc1d66c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pyewts-0.2.0.tar.gz diff --git a/python-pyewts.spec b/python-pyewts.spec new file mode 100644 index 0000000..f9a3a8f --- /dev/null +++ b/python-pyewts.spec @@ -0,0 +1,453 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pyewts +Version: 0.2.0 +Release: 1 +Summary: Python utils for EWTS conversion from / to Unicode +License: Apache2 +URL: https://github.com/Esukhia/pyewts +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f9/bb/51707e7f19b78b55b59eed66c5fa83b89786c30b346dea71dfecffb122a5/pyewts-0.2.0.tar.gz +BuildArch: noarch + + +%description +

+
+ OpenPecha +
+

+ +

Python Tibetan Unicode to Wylie (EWTS) Converter

+ + + + +

+ Description • + Installation • + Examples • + Changes • + License • + Maintenance • + Owner +

+
+ +## Description + +The goal of this code is to provide a library to convert back and forth between Tibetan Unicode and [EWTS](http://www.thlib.org/reference/transliteration/#!essay=/thl/ewts/). The code is adapted from Java [ewts-converter](https://github.com/buda-base/ewts-converter). + +It also provides a conversion from the [ACIP Transliteration](https://web.archive.org/web/20080828031427/http://www.asianclassics.org/download/tibetancode/ticode.pdf) to EWTS. + + + + +## Installation + +```bash +pip install pyewts +``` + +## Examples + +Convert Wylie to Unicode + +```python +import pyewts + +converter = pyewts.pyewts() +print(converter.toUnicode("ba b+ba [a] ba\\u0f0b")) +# བ་བྦ་a་བ་ +``` + +Convert Unicode to Wylie + +```python +print(converter.toWylie("༼༽")) +# () +``` + +Catch Wylie warnings + +```python +>>> orig = """dangs +... zhwa +... dwang +... rma +... tshe +... phywa +... dge +... rgya +... dwags +... (rtse mgron)""" +>>> +>>> print(orig) +dangs +zhwa +dwang +rma +tshe +phywa +dge +rgya +dwags +(rtse mgron) +>>> warns = [] +>>> res = converter.toUnicode(orig, warns) +>>> print(res) +དངས +ཞྭ +དྭང +རྨ +ཚེ +ཕྱྭ +དགེ +རྒྱ +དྭགས +༼རྩེ་མགྲོན༽ +>>> print(warns) +['line 1: "dangs": Syllable should probably be "dngas".'] +``` + +See [demo.py](demo.py) + +## Changes + +See [CHANGELOG.md](CHANGELOG.md). + +## License + +The Python code is Copyright (C) 2018 Esukhia, provided under [MIT License](LICENSE). See [CONTRIBUTORS.md](CONTRIBUTORS.md) for a list of authors and contributors. + +## Maintenance + +Build the source dist: + +``` +rm -rf dist/ +python3 setup.py clean sdist +``` + +and upload on twine (version >= `1.11.0`) with: + +``` +twine upload dist/* +``` + +## Owner + +- [@eroux](https://github.com/eroux) + + + +%package -n python3-pyewts +Summary: Python utils for EWTS conversion from / to Unicode +Provides: python-pyewts +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pyewts +

+
+ OpenPecha +
+

+ +

Python Tibetan Unicode to Wylie (EWTS) Converter

+ + + + +

+ Description • + Installation • + Examples • + Changes • + License • + Maintenance • + Owner +

+
+ +## Description + +The goal of this code is to provide a library to convert back and forth between Tibetan Unicode and [EWTS](http://www.thlib.org/reference/transliteration/#!essay=/thl/ewts/). The code is adapted from Java [ewts-converter](https://github.com/buda-base/ewts-converter). + +It also provides a conversion from the [ACIP Transliteration](https://web.archive.org/web/20080828031427/http://www.asianclassics.org/download/tibetancode/ticode.pdf) to EWTS. + + + + +## Installation + +```bash +pip install pyewts +``` + +## Examples + +Convert Wylie to Unicode + +```python +import pyewts + +converter = pyewts.pyewts() +print(converter.toUnicode("ba b+ba [a] ba\\u0f0b")) +# བ་བྦ་a་བ་ +``` + +Convert Unicode to Wylie + +```python +print(converter.toWylie("༼༽")) +# () +``` + +Catch Wylie warnings + +```python +>>> orig = """dangs +... zhwa +... dwang +... rma +... tshe +... phywa +... dge +... rgya +... dwags +... (rtse mgron)""" +>>> +>>> print(orig) +dangs +zhwa +dwang +rma +tshe +phywa +dge +rgya +dwags +(rtse mgron) +>>> warns = [] +>>> res = converter.toUnicode(orig, warns) +>>> print(res) +དངས +ཞྭ +དྭང +རྨ +ཚེ +ཕྱྭ +དགེ +རྒྱ +དྭགས +༼རྩེ་མགྲོན༽ +>>> print(warns) +['line 1: "dangs": Syllable should probably be "dngas".'] +``` + +See [demo.py](demo.py) + +## Changes + +See [CHANGELOG.md](CHANGELOG.md). + +## License + +The Python code is Copyright (C) 2018 Esukhia, provided under [MIT License](LICENSE). See [CONTRIBUTORS.md](CONTRIBUTORS.md) for a list of authors and contributors. + +## Maintenance + +Build the source dist: + +``` +rm -rf dist/ +python3 setup.py clean sdist +``` + +and upload on twine (version >= `1.11.0`) with: + +``` +twine upload dist/* +``` + +## Owner + +- [@eroux](https://github.com/eroux) + + + +%package help +Summary: Development documents and examples for pyewts +Provides: python3-pyewts-doc +%description help +

+
+ OpenPecha +
+

+ +

Python Tibetan Unicode to Wylie (EWTS) Converter

+ + + + +

+ Description • + Installation • + Examples • + Changes • + License • + Maintenance • + Owner +

+
+ +## Description + +The goal of this code is to provide a library to convert back and forth between Tibetan Unicode and [EWTS](http://www.thlib.org/reference/transliteration/#!essay=/thl/ewts/). The code is adapted from Java [ewts-converter](https://github.com/buda-base/ewts-converter). + +It also provides a conversion from the [ACIP Transliteration](https://web.archive.org/web/20080828031427/http://www.asianclassics.org/download/tibetancode/ticode.pdf) to EWTS. + + + + +## Installation + +```bash +pip install pyewts +``` + +## Examples + +Convert Wylie to Unicode + +```python +import pyewts + +converter = pyewts.pyewts() +print(converter.toUnicode("ba b+ba [a] ba\\u0f0b")) +# བ་བྦ་a་བ་ +``` + +Convert Unicode to Wylie + +```python +print(converter.toWylie("༼༽")) +# () +``` + +Catch Wylie warnings + +```python +>>> orig = """dangs +... zhwa +... dwang +... rma +... tshe +... phywa +... dge +... rgya +... dwags +... (rtse mgron)""" +>>> +>>> print(orig) +dangs +zhwa +dwang +rma +tshe +phywa +dge +rgya +dwags +(rtse mgron) +>>> warns = [] +>>> res = converter.toUnicode(orig, warns) +>>> print(res) +དངས +ཞྭ +དྭང +རྨ +ཚེ +ཕྱྭ +དགེ +རྒྱ +དྭགས +༼རྩེ་མགྲོན༽ +>>> print(warns) +['line 1: "dangs": Syllable should probably be "dngas".'] +``` + +See [demo.py](demo.py) + +## Changes + +See [CHANGELOG.md](CHANGELOG.md). + +## License + +The Python code is Copyright (C) 2018 Esukhia, provided under [MIT License](LICENSE). See [CONTRIBUTORS.md](CONTRIBUTORS.md) for a list of authors and contributors. + +## Maintenance + +Build the source dist: + +``` +rm -rf dist/ +python3 setup.py clean sdist +``` + +and upload on twine (version >= `1.11.0`) with: + +``` +twine upload dist/* +``` + +## Owner + +- [@eroux](https://github.com/eroux) + + + +%prep +%autosetup -n pyewts-0.2.0 + +%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-pyewts -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot - 0.2.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..457beca --- /dev/null +++ b/sources @@ -0,0 +1 @@ +b4cc82d42a1ce1baf081a499b6caa53c pyewts-0.2.0.tar.gz -- cgit v1.2.3