translate4colors


Nametranslate4colors JSON
Version 0.12 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/translate4colors
Summaryautomates text translation using Google Translate
upload_time2023-07-08 01:43:58
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords google translate
VCS
bugtrack_url
requirements a_selenium2df a_selenium_kill kthread_sleep retryloop selenium textwrapre undetected_chromedriver
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# automates text translation using Google Translate

## pip install translate4colors 

## Example Usage

```python
textx = r"""Python. was created in the early 1990s by Guido van Rossum at Stichting Mathematisch 
Centrum (CWI, see https://www.cwi.nl/) in the Netherlands as a successor of a 
language called ABC. Guido remains Python’s principal author, although it includes
many contributions from others.

In 1995, Guido. continued his work on Python at the Corporation for 
National Research Initiatives 
(CNRI, see https://www.cnri.reston.va.us/) in Reston, 
Virginia where he released several versions of the software."""

from translate4colors import Gtranslate
with Gtranslate("en", "de") as go:
    data = go.translate(textx)
print(data)

google = Gtranslate("en", "de")
translated = google.translate(textx)
print(translated)
google.quit_translator(soft_kill_first=True)

# [[('Python. was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see https://www.cwi.nl/) in the Netherlands as a successor of a language called ABC. Guido remains Python’s principal author, although it includes many contributions from others. In 1995, Guido. continued his work on Python at the Corporation for National Research Initiatives (CNRI, see https://www.cnri.reston.va.us/) in Reston, Virginia where he released several versions of the software.', 'Python. wurde Anfang der 1990er Jahre von Guido van Rossum am Stichting Mathematisch Centrum (CWI, siehe https://www.cwi.nl/) in den Niederlanden als Nachfolger einer Sprache namens ABC entwickelt. Guido bleibt der Hauptautor von Python, obwohl es viele Beiträge anderer enthält. Im Jahr 1995, Guido. setzte seine Arbeit an Python bei der Corporation for National Research Initiatives (CNRI, siehe https://www.cnri.reston.va.us/) in Reston, Virginia fort, wo er mehrere Versionen der Software veröffentlichte.')]]
# [[('Python. was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see https://www.cwi.nl/) in the Netherlands as a successor of a language called ABC. Guido remains Python’s principal author, although it includes many contributions from others. In 1995, Guido. continued his work on Python at the Corporation for National Research Initiatives (CNRI, see https://www.cnri.reston.va.us/) in Reston, Virginia where he released several versions of the software.', 'Python. wurde Anfang der 1990er Jahre von Guido van Rossum am Stichting Mathematisch Centrum (CWI, siehe https://www.cwi.nl/) in den Niederlanden als Nachfolger einer Sprache namens ABC entwickelt. Guido bleibt der Hauptautor von Python, obwohl es viele Beiträge anderer enthält. Im Jahr 1995, Guido. setzte seine Arbeit an Python bei der Corporation for National Research Initiatives (CNRI, siehe https://www.cnri.reston.va.us/) in Reston, Virginia fort, wo er mehrere Versionen der Software veröffentlichte.')]]
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/translate4colors",
    "name": "translate4colors",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "google,translate",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/41/0a/9fe99892f66022a6df82bf0378153f031e378358fffd28861a51d8ab4ef9/translate4colors-0.12.tar.gz",
    "platform": null,
    "description": "\r\n# automates text translation using Google Translate\r\n\r\n## pip install translate4colors \r\n\r\n## Example Usage\r\n\r\n```python\r\ntextx = r\"\"\"Python. was created in the early 1990s by Guido van Rossum at Stichting Mathematisch \r\nCentrum (CWI, see https://www.cwi.nl/) in the Netherlands as a successor of a \r\nlanguage called ABC. Guido remains Python\u2019s principal author, although it includes\r\nmany contributions from others.\r\n\r\nIn 1995, Guido. continued his work on Python at the Corporation for \r\nNational Research Initiatives \r\n(CNRI, see https://www.cnri.reston.va.us/) in Reston, \r\nVirginia where he released several versions of the software.\"\"\"\r\n\r\nfrom translate4colors import Gtranslate\r\nwith Gtranslate(\"en\", \"de\") as go:\r\n    data = go.translate(textx)\r\nprint(data)\r\n\r\ngoogle = Gtranslate(\"en\", \"de\")\r\ntranslated = google.translate(textx)\r\nprint(translated)\r\ngoogle.quit_translator(soft_kill_first=True)\r\n\r\n# [[('Python. was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see https://www.cwi.nl/) in the Netherlands as a successor of a language called ABC. Guido remains Python\u2019s principal author, although it includes many contributions from others. In 1995, Guido. continued his work on Python at the Corporation for National Research Initiatives (CNRI, see https://www.cnri.reston.va.us/) in Reston, Virginia where he released several versions of the software.', 'Python. wurde Anfang der 1990er Jahre von Guido van Rossum am Stichting Mathematisch Centrum (CWI, siehe https://www.cwi.nl/) in den Niederlanden als Nachfolger einer Sprache namens ABC entwickelt. Guido bleibt der Hauptautor von Python, obwohl es viele Beitr\u00e4ge anderer enth\u00e4lt. Im Jahr 1995, Guido. setzte seine Arbeit an Python bei der Corporation for National Research Initiatives (CNRI, siehe https://www.cnri.reston.va.us/) in Reston, Virginia fort, wo er mehrere Versionen der Software ver\u00f6ffentlichte.')]]\r\n# [[('Python. was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see https://www.cwi.nl/) in the Netherlands as a successor of a language called ABC. Guido remains Python\u2019s principal author, although it includes many contributions from others. In 1995, Guido. continued his work on Python at the Corporation for National Research Initiatives (CNRI, see https://www.cnri.reston.va.us/) in Reston, Virginia where he released several versions of the software.', 'Python. wurde Anfang der 1990er Jahre von Guido van Rossum am Stichting Mathematisch Centrum (CWI, siehe https://www.cwi.nl/) in den Niederlanden als Nachfolger einer Sprache namens ABC entwickelt. Guido bleibt der Hauptautor von Python, obwohl es viele Beitr\u00e4ge anderer enth\u00e4lt. Im Jahr 1995, Guido. setzte seine Arbeit an Python bei der Corporation for National Research Initiatives (CNRI, siehe https://www.cnri.reston.va.us/) in Reston, Virginia fort, wo er mehrere Versionen der Software ver\u00f6ffentlichte.')]]\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "automates text translation using Google Translate",
    "version": "0.12",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/translate4colors"
    },
    "split_keywords": [
        "google",
        "translate"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c29b564a9973ea7c11184a3b5d6c30e1a44b7b6601e4b949c797e8290c925bb5",
                "md5": "c52a4e719aeaa950df13bda26bf4020c",
                "sha256": "4ae7111d62412a567a936850202f0d450a378bea4e81443e82dbd777420d40f5"
            },
            "downloads": -1,
            "filename": "translate4colors-0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c52a4e719aeaa950df13bda26bf4020c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 19377,
            "upload_time": "2023-07-08T01:43:57",
            "upload_time_iso_8601": "2023-07-08T01:43:57.079531Z",
            "url": "https://files.pythonhosted.org/packages/c2/9b/564a9973ea7c11184a3b5d6c30e1a44b7b6601e4b949c797e8290c925bb5/translate4colors-0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "410a9fe99892f66022a6df82bf0378153f031e378358fffd28861a51d8ab4ef9",
                "md5": "1d4ddc1d4f98957ed74a0228ce6ba4ec",
                "sha256": "4468fcc5f063bfcb014802404c3a2bffe9377cb397c3f47de262200ca993b1e6"
            },
            "downloads": -1,
            "filename": "translate4colors-0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "1d4ddc1d4f98957ed74a0228ce6ba4ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19248,
            "upload_time": "2023-07-08T01:43:58",
            "upload_time_iso_8601": "2023-07-08T01:43:58.830389Z",
            "url": "https://files.pythonhosted.org/packages/41/0a/9fe99892f66022a6df82bf0378153f031e378358fffd28861a51d8ab4ef9/translate4colors-0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-08 01:43:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "translate4colors",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "a_selenium2df",
            "specs": []
        },
        {
            "name": "a_selenium_kill",
            "specs": []
        },
        {
            "name": "kthread_sleep",
            "specs": []
        },
        {
            "name": "retryloop",
            "specs": []
        },
        {
            "name": "selenium",
            "specs": []
        },
        {
            "name": "textwrapre",
            "specs": []
        },
        {
            "name": "undetected_chromedriver",
            "specs": []
        }
    ],
    "lcname": "translate4colors"
}
        
Elapsed time: 0.14458s