dev-python/googletransx: new package

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2020-04-02 00:41:24 +02:00
parent 912993b8a2
commit 9b322a63f6
3 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST googletransx-2.4.2.tar.gz 13967 BLAKE2B 4ba5d043f428e48c4a1e7fd5932b346149fa7a5f14f5e97f79aa52de8be22658697aaf112eea931793ae006aa0e23a4771e538067a0f6d2e75fdeff71df221e3 SHA512 d68d3ae0bf250464438831e97c5ab87484100302ccb92da929218fe42d00c572770c4083919916b537f40b2ea5b33197fb2c69197cc541da28977027be86ceb5

View File

@@ -0,0 +1,23 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
#DISTUTILS_USE_SETUPTOOLS=rdepend
inherit distutils-r1
DESCRIPTION="Free Google Translate API for Python. Translates totally free of charge."
HOMEPAGE="https://pypi.org/project/googletransx"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
dev-python/requests[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}"

View File

@@ -0,0 +1,42 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<longdescription lang="en">
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.
Compatible with Python 2.7+ and 3.4+. (Note: Python 2 support will be dropped in the next major release.)
For details refer to the API Documentation.
Features
Fast and reliable - it uses the same servers that translate.google.com uses
Auto language detection
Bulk translations
Customizable service URL
Connection pooling (the advantage of using requests.Session)
HTTP/2 support
TODO
more features are coming soon.
Proxy support
Internal session management (for better bulk translations)
HTTP/2 support
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.
How does this library work
You may wonder why this library works properly, whereas other approaches such like goslate wont work since Google has updated its translation service recently with a ticket mechanism to prevent a lot of crawler programs.
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.
</longdescription>
<upstream>
<remote-id type="pypi">googletransx</remote-id>
</upstream>
</pkgmetadata>