From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B4C3F138350 for ; Thu, 2 Apr 2020 10:12:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7552CE0BF1; Thu, 2 Apr 2020 10:12:38 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 53197E0BC5 for ; Thu, 2 Apr 2020 10:12:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5EBC034F022 for ; Thu, 2 Apr 2020 10:12:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1B1461C1 for ; Thu, 2 Apr 2020 10:12:34 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1585780884.9b322a63f60e78a0f2465ad2b81f34f07e1b5ca7.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-python/googletransx/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-python/googletransx/Manifest dev-python/googletransx/googletransx-2.4.2.ebuild dev-python/googletransx/metadata.xml X-VCS-Directories: dev-python/googletransx/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 9b322a63f60e78a0f2465ad2b81f34f07e1b5ca7 X-VCS-Branch: master Date: Thu, 2 Apr 2020 10:12:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cde81136-d36b-4fb8-b77b-583cc7fb6ca6 X-Archives-Hash: 27868f2dfe77602415f57c1e9d07e98b commit: 9b322a63f60e78a0f2465ad2b81f34f07e1b5ca7 Author: Alessandro Barbieri gmail com> AuthorDate: Wed Apr 1 22:41:24 2020 +0000 Commit: Andrew Ammerlaan riseup net> CommitDate: Wed Apr 1 22:41:24 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9b322a63 dev-python/googletransx: new package Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Alessandro Barbieri gmail.com> dev-python/googletransx/Manifest | 1 + dev-python/googletransx/googletransx-2.4.2.ebuild | 23 +++++++++++++ dev-python/googletransx/metadata.xml | 42 +++++++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/dev-python/googletransx/Manifest b/dev-python/googletransx/Manifest new file mode 100644 index 0000000..6934d91 --- /dev/null +++ b/dev-python/googletransx/Manifest @@ -0,0 +1 @@ +DIST googletransx-2.4.2.tar.gz 13967 BLAKE2B 4ba5d043f428e48c4a1e7fd5932b346149fa7a5f14f5e97f79aa52de8be22658697aaf112eea931793ae006aa0e23a4771e538067a0f6d2e75fdeff71df221e3 SHA512 d68d3ae0bf250464438831e97c5ab87484100302ccb92da929218fe42d00c572770c4083919916b537f40b2ea5b33197fb2c69197cc541da28977027be86ceb5 diff --git a/dev-python/googletransx/googletransx-2.4.2.ebuild b/dev-python/googletransx/googletransx-2.4.2.ebuild new file mode 100644 index 0000000..0549970 --- /dev/null +++ b/dev-python/googletransx/googletransx-2.4.2.ebuild @@ -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}" diff --git a/dev-python/googletransx/metadata.xml b/dev-python/googletransx/metadata.xml new file mode 100644 index 0000000..12c247f --- /dev/null +++ b/dev-python/googletransx/metadata.xml @@ -0,0 +1,42 @@ + + + + + lssndrbarbieri@gmail.com + Alessandro Barbieri + + +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 won’t 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. + + + googletransx + +