summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-09 07:27:32 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-09 07:27:32 +0000
commitff773204c47e54b72a410195aaa97e57be027993 (patch)
treece25e61f47df1270908b77ec15647c0cd252336e
parent5b89a1e9c8ed3171f8ba6e044c49289c7ae30f2d (diff)
automatic import of python-bookertransopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-bookertrans.spec241
-rw-r--r--sources1
3 files changed, 243 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..421ac38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/BookerTrans-2023.2.21.8.tar.gz
diff --git a/python-bookertrans.spec b/python-bookertrans.spec
new file mode 100644
index 0000000..1386f87
--- /dev/null
+++ b/python-bookertrans.spec
@@ -0,0 +1,241 @@
+%global _empty_manifest_terminate_build 0
+Name: python-BookerTrans
+Version: 2023.2.21.8
+Release: 1
+Summary: HTML Translator with Google Api for iBooker/ApacheCN
+License: Other/Proprietary License
+URL: https://github.com/apachecn/BookerTrans
+Source0: https://mirrors.aliyun.com/pypi/web/packages/45/0a/fdb21b95834ed750ec7c2efbb3080c5db15c21c39a5dbad48ab7b40c6ca0/BookerTrans-2023.2.21.8.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-pyquery
+Requires: python3-selenium
+Requires: python3-PyExecJS
+
+%description
+# BookerTrans
+
+用于 iBooker/ApacheCN 翻译项目的 HTML 谷歌翻译工具
+
+## 安装
+
+通过pip(推荐):
+
+```
+pip install BookerTrans
+```
+
+从源码安装:
+
+```
+pip install git+https://github.com/apachecn/BookerTrans
+```
+
+部分 API 依赖 Selenium 和 Chrome。请确保安装了 Chrome,并将其[驱动](http://npm.taobao.org/mirrors/chromedriver/)放到`PATH`下。
+
+## 使用说明
+
+```
+btrans [-h] [-v] [-H HOST] [-P PROXY] [-t TIMEOUT] [-w WAIT_SEC]
+ [-r RETRY] [-s SRC] [-d DST]
+ site fname
+
+-H HOST: 域名,默认为 translate.google.com
+-P PROXY: 代理,格式为 \d+\.\d+\.\d+\.\d+:\d+,默认为空
+-t TIMEOUT: 超时时间,以秒为单位,默认为 8
+-w WAIT_SEC: 两次翻译之间的延迟(以秒为单位),默认为 0.5
+-r RETRY: 重试次数,默认为 10
+-s SRC: 源语言,默认为 auto
+-d DST: 目标语言,默认为 zh-CN
+site: API 名称,可选项为 {google,google_selenium,baidu,sogou,youdao}
+fname: HTML 文件名称,或者文件所在的目录名称
+```
+
+## 协议
+
+本项目基于 SATA 协议发布。
+
+您有义务为此开源项目点赞,并考虑额外给予作者适当的奖励。
+
+## 赞助我们
+
+![](https://home.apachecn.org/img/about/donate.jpg)
+
+## 另见
+
++ [ApacheCN 学习资源](https://docs.apachecn.org/)
++ [计算机电子书](http://it-ebooks.flygon.net)
++ [布客新知](http://flygon.net/ixinzhi/)
+
+
+
+
+%package -n python3-BookerTrans
+Summary: HTML Translator with Google Api for iBooker/ApacheCN
+Provides: python-BookerTrans
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-BookerTrans
+# BookerTrans
+
+用于 iBooker/ApacheCN 翻译项目的 HTML 谷歌翻译工具
+
+## 安装
+
+通过pip(推荐):
+
+```
+pip install BookerTrans
+```
+
+从源码安装:
+
+```
+pip install git+https://github.com/apachecn/BookerTrans
+```
+
+部分 API 依赖 Selenium 和 Chrome。请确保安装了 Chrome,并将其[驱动](http://npm.taobao.org/mirrors/chromedriver/)放到`PATH`下。
+
+## 使用说明
+
+```
+btrans [-h] [-v] [-H HOST] [-P PROXY] [-t TIMEOUT] [-w WAIT_SEC]
+ [-r RETRY] [-s SRC] [-d DST]
+ site fname
+
+-H HOST: 域名,默认为 translate.google.com
+-P PROXY: 代理,格式为 \d+\.\d+\.\d+\.\d+:\d+,默认为空
+-t TIMEOUT: 超时时间,以秒为单位,默认为 8
+-w WAIT_SEC: 两次翻译之间的延迟(以秒为单位),默认为 0.5
+-r RETRY: 重试次数,默认为 10
+-s SRC: 源语言,默认为 auto
+-d DST: 目标语言,默认为 zh-CN
+site: API 名称,可选项为 {google,google_selenium,baidu,sogou,youdao}
+fname: HTML 文件名称,或者文件所在的目录名称
+```
+
+## 协议
+
+本项目基于 SATA 协议发布。
+
+您有义务为此开源项目点赞,并考虑额外给予作者适当的奖励。
+
+## 赞助我们
+
+![](https://home.apachecn.org/img/about/donate.jpg)
+
+## 另见
+
++ [ApacheCN 学习资源](https://docs.apachecn.org/)
++ [计算机电子书](http://it-ebooks.flygon.net)
++ [布客新知](http://flygon.net/ixinzhi/)
+
+
+
+
+%package help
+Summary: Development documents and examples for BookerTrans
+Provides: python3-BookerTrans-doc
+%description help
+# BookerTrans
+
+用于 iBooker/ApacheCN 翻译项目的 HTML 谷歌翻译工具
+
+## 安装
+
+通过pip(推荐):
+
+```
+pip install BookerTrans
+```
+
+从源码安装:
+
+```
+pip install git+https://github.com/apachecn/BookerTrans
+```
+
+部分 API 依赖 Selenium 和 Chrome。请确保安装了 Chrome,并将其[驱动](http://npm.taobao.org/mirrors/chromedriver/)放到`PATH`下。
+
+## 使用说明
+
+```
+btrans [-h] [-v] [-H HOST] [-P PROXY] [-t TIMEOUT] [-w WAIT_SEC]
+ [-r RETRY] [-s SRC] [-d DST]
+ site fname
+
+-H HOST: 域名,默认为 translate.google.com
+-P PROXY: 代理,格式为 \d+\.\d+\.\d+\.\d+:\d+,默认为空
+-t TIMEOUT: 超时时间,以秒为单位,默认为 8
+-w WAIT_SEC: 两次翻译之间的延迟(以秒为单位),默认为 0.5
+-r RETRY: 重试次数,默认为 10
+-s SRC: 源语言,默认为 auto
+-d DST: 目标语言,默认为 zh-CN
+site: API 名称,可选项为 {google,google_selenium,baidu,sogou,youdao}
+fname: HTML 文件名称,或者文件所在的目录名称
+```
+
+## 协议
+
+本项目基于 SATA 协议发布。
+
+您有义务为此开源项目点赞,并考虑额外给予作者适当的奖励。
+
+## 赞助我们
+
+![](https://home.apachecn.org/img/about/donate.jpg)
+
+## 另见
+
++ [ApacheCN 学习资源](https://docs.apachecn.org/)
++ [计算机电子书](http://it-ebooks.flygon.net)
++ [布客新知](http://flygon.net/ixinzhi/)
+
+
+
+
+%prep
+%autosetup -n BookerTrans-2023.2.21.8
+
+%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-BookerTrans -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri Jun 09 2023 Python_Bot <Python_Bot@openeuler.org> - 2023.2.21.8-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..93245a4
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+2a39dff39c08137bcf243dd9b35e969a BookerTrans-2023.2.21.8.tar.gz