1 |
commit: 9b322a63f60e78a0f2465ad2b81f34f07e1b5ca7 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Apr 1 22:41:24 2020 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Wed Apr 1 22:41:24 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9b322a63 |
7 |
|
8 |
dev-python/googletransx: new package |
9 |
|
10 |
Package-Manager: Portage-2.3.96, Repoman-2.3.22 |
11 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
12 |
|
13 |
dev-python/googletransx/Manifest | 1 + |
14 |
dev-python/googletransx/googletransx-2.4.2.ebuild | 23 +++++++++++++ |
15 |
dev-python/googletransx/metadata.xml | 42 +++++++++++++++++++++++ |
16 |
3 files changed, 66 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/googletransx/Manifest b/dev-python/googletransx/Manifest |
19 |
new file mode 100644 |
20 |
index 0000000..6934d91 |
21 |
--- /dev/null |
22 |
+++ b/dev-python/googletransx/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST googletransx-2.4.2.tar.gz 13967 BLAKE2B 4ba5d043f428e48c4a1e7fd5932b346149fa7a5f14f5e97f79aa52de8be22658697aaf112eea931793ae006aa0e23a4771e538067a0f6d2e75fdeff71df221e3 SHA512 d68d3ae0bf250464438831e97c5ab87484100302ccb92da929218fe42d00c572770c4083919916b537f40b2ea5b33197fb2c69197cc541da28977027be86ceb5 |
25 |
|
26 |
diff --git a/dev-python/googletransx/googletransx-2.4.2.ebuild b/dev-python/googletransx/googletransx-2.4.2.ebuild |
27 |
new file mode 100644 |
28 |
index 0000000..0549970 |
29 |
--- /dev/null |
30 |
+++ b/dev-python/googletransx/googletransx-2.4.2.ebuild |
31 |
@@ -0,0 +1,23 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI="7" |
36 |
+ |
37 |
+PYTHON_COMPAT=( python3_{6,7} ) |
38 |
+ |
39 |
+#DISTUTILS_USE_SETUPTOOLS=rdepend |
40 |
+ |
41 |
+inherit distutils-r1 |
42 |
+ |
43 |
+DESCRIPTION="Free Google Translate API for Python. Translates totally free of charge." |
44 |
+HOMEPAGE="https://pypi.org/project/googletransx" |
45 |
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" |
46 |
+ |
47 |
+LICENSE="MIT" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64" |
50 |
+ |
51 |
+RDEPEND=" |
52 |
+ dev-python/requests[${PYTHON_USEDEP}] |
53 |
+" |
54 |
+DEPEND="${RDEPEND}" |
55 |
|
56 |
diff --git a/dev-python/googletransx/metadata.xml b/dev-python/googletransx/metadata.xml |
57 |
new file mode 100644 |
58 |
index 0000000..12c247f |
59 |
--- /dev/null |
60 |
+++ b/dev-python/googletransx/metadata.xml |
61 |
@@ -0,0 +1,42 @@ |
62 |
+<?xml version='1.0' encoding='UTF-8'?> |
63 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
64 |
+<pkgmetadata> |
65 |
+ <maintainer type="person"> |
66 |
+ <email>lssndrbarbieri@×××××.com</email> |
67 |
+ <name>Alessandro Barbieri</name> |
68 |
+ </maintainer> |
69 |
+ <longdescription lang="en"> |
70 |
+Googletrans is a free and unlimited python library that implemented Google Translate API. This uses the Google Translate Ajax API to make calls to such methods as detect and translate. |
71 |
+ |
72 |
+Compatible with Python 2.7+ and 3.4+. (Note: Python 2 support will be dropped in the next major release.) |
73 |
+ |
74 |
+For details refer to the API Documentation. |
75 |
+Features |
76 |
+ |
77 |
+ Fast and reliable - it uses the same servers that translate.google.com uses |
78 |
+ Auto language detection |
79 |
+ Bulk translations |
80 |
+ Customizable service URL |
81 |
+ Connection pooling (the advantage of using requests.Session) |
82 |
+ HTTP/2 support |
83 |
+ |
84 |
+TODO |
85 |
+ |
86 |
+more features are coming soon. |
87 |
+ |
88 |
+ Proxy support |
89 |
+ Internal session management (for better bulk translations) |
90 |
+ |
91 |
+HTTP/2 support |
92 |
+ |
93 |
+This is a great deal for everyone! (up to 2x times faster in my test) If you want to get googletrans faster you should install hyper package. Googletrans will automatically detect if hyper is installed and if so, it will be used for http networking. |
94 |
+How does this library work |
95 |
+ |
96 |
+You may wonder why this library works properly, whereas other approaches such like goslate won’t work since Google has updated its translation service recently with a ticket mechanism to prevent a lot of crawler programs. |
97 |
+ |
98 |
+I eventually figure out a way to generate a ticket by reverse engineering on the obfuscated and minified code used by Google to generate such token, and implemented on the top of Python. However, this could be blocked at any time. |
99 |
+ </longdescription> |
100 |
+ <upstream> |
101 |
+ <remote-id type="pypi">googletransx</remote-id> |
102 |
+ </upstream> |
103 |
+</pkgmetadata> |