DeeptransTool


NameDeeptransTool JSON
Version 1.4 PyPI version JSON
download
home_pagehttps://github.com/ElHaban3ro/DeeptransTool
SummaryUse the world's best translator (DeepL) to translate your text files or text itself!! All without having to provide your credit card or be limited by the API. 🐸
upload_time2023-07-20 23:17:13
maintainer
docs_urlNone
authorElHaban3ro
requires_python
licenseGPLv3
keywords translate deepl traduccion api translation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DeeptransTool

[![License: GPLv3](https://img.shields.io/badge/License-GPLv3-yellowgreen.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0.en.html) [![Python 3.10](https://img.shields.io/badge/Python-3.10-blue.svg?style=flat-square&logo=python)](https://www.python.org/downloads/release/python-310/) [![PyPi Package](https://img.shields.io/badge/PyPi_Package-pip_install_DeeptransTool-yellow.svg?style=flat-square&logo=pypi)](https://pypi.org/project/DeeptransTool/)

*The package is still under development, you may find serious bugs or features like the pdf translator still missing. Any serious bugs please let me know by discord!*


## Summary and details
---
The **perfect** module to make ***translations*** with no character limitations, ***no need to pay and no need to give your bank details*** to access the API of ***DeepL***. Translate the main ***text files*** (soon also pdf's) or give the ***text directly***!

To fulfill the **purpose**, we make use of ***Selenium*** and the browser [Chrome](https://www.google.com/chrome/) therefore, it is ***necessary** to have the browser installed ***on your computer***. If you are on **windows**, download the ***latest version***, if you are on ***linux***, we recommend you to download [this](https://github.com/ElHaban3ro/DeeptransTool/blob/main/packages/google-chrome-linux64-105.0.5195.125.deb?raw=true) version. 



## (v1.4) ¿What's New?
---
- Apparently they changed the structure of how the deepl.com page is built, and therefore, the scrapper stopped working. It's fixed!

- The scrapp system was changed in the text. We now use "Beautifulsoup4" which will prevent us from errors in the future!


## Functions
---

#### - file_translate(route, string_characters, l_from, l_to, new_file, new_file_extension)
> Use the world's "best translator" to translate files with python, and without API key.
>
- ***Parameters:*** 
    
    - route: **STR** | Path of the file to translate.
    
    - string_characters: **INT** | how many characters will contain the string to be translated (it is done by parts, by the limitation that has the same translator). Use at most 5000, and with margin of error.
    
    - l_from: **STR** | Language of origin. Generally the first acronym of the original language is used! An example of this is "Español", its acronym being "es". If you have any doubts about the acronym of your source or target language, check the website DeepL.

    - l_to: **STR** | Target Language. Generally the first acronym of the original language is used! An example of this is "English", its acronym being "en". If you have any doubts about the acronym of your source or target language, check the website DeepL.

    - new_file: **BOOL** | If you want the translation of the file to be done on a new one, you should activate this option.

    - new_file_extension: **STR** | If the previous option is True (new_file), you have to provide a valid file extension for the new file. If it is not provided, your new extension will be assumed to be txt.




#### - string_translate(text, string_characters, l_from, l_to)
> Use the world's "best translator" to translate any text and make use of it, without any restrictions!
>
- ***Parameters:*** 
    - text: **STR** | Text to translate!
    
    - string_characters: **INT** | how many characters will contain the string to be translated (it is done by parts, by the limitation that has the same translator). Use at most 5000, and with margin of error.
    
    - l_from: **STR** | Language of origin. Generally the first acronym of the original language is used! An example of this is "Español", its acronym being "es".

    - l_to: **STR** | Target Language. Generally the first acronym of the original language is used! An example of this is "English", its acronym being "en".


- ***Return:***
    Return the text translate.
    


## Installation and Use!
---

#### Installation:
To use this package, the best idea is to do it through ***pip***:
```bash
pip install DeeptransTool
```
***IT IS VERY IMPORTANT THAT THE "D" AND THE "T" ARE CAPITALIZED.***


Or, on the contrary, you can **clone** this repository and access it:
```bash
git clone https://github.com/ElHaban3ro/DeeptransTool
```

This will create a folder of the project itself inside your python root project. Next we have to install the necessary dependencies for the project to work correctly, this can be done with:
```bash
pip install -r requirements.txt 
```

This would **ideally** have to install all the necessary libraries for you. This will be installed in the ***virtual environment*** of your project. See how to create a [virtual environment here]('https://docs.python.org/3/tutorial/venv.html').


In addition to this, remember to have the ***Chrome*** browser installed on your ***device***. Remember that, if you are on ***Windows***, you should install the ***latest version***, and if you are on ***linux***, [install the version that ***I leave*** in my repository](https://github.com/ElHaban3ro/DeeptransTool/blob/main/packages/google-chrome-linux64-105.0.5195.125.deb?raw=true) (Any problem, contact me by ***Discord*** or ***Twitter***).



#### Use:
To use this package of this form:
```python
from DTT.deepLTranslate import file_translate


mi_traduccion = file_translate('C:/miruta/archivo.txt', 4999, 'es', 'en', True, 'srt')
```

#### Text Files Allow:
- srt
- txt
- html
- log
- csv
- pdf

***¿more? Send it***



# Autor Contact
---

[![Contact Twitter](https://img.shields.io/badge/Twitter-ElHaban3ro-9cf.svg?style=for-the-badge&logo=twitter)](https://twitter.com/ElHaban3ro) [![Contact Discord](https://img.shields.io/badge/Discord-!%20Die()%231274-lightgray?style=for-the-badge&logo=discord)](https://discord.com) [![Contact Discord](https://img.shields.io/badge/GitHub-ElHaban3ro-lightgray?style=for-the-badge&logo=github)](https://github.com/ElHaban3ro)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ElHaban3ro/DeeptransTool",
    "name": "DeeptransTool",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Translate,DeepL,Traduccion,API,Translation",
    "author": "ElHaban3ro",
    "author_email": "habanferd@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ab/df/bd0b87a5455d6578823dae7f458ed5b6e52e2940dcb31f7f6ac2042a3be4/DeeptransTool-1.4.tar.gz",
    "platform": null,
    "description": "# DeeptransTool\r\n\r\n[![License: GPLv3](https://img.shields.io/badge/License-GPLv3-yellowgreen.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0.en.html) [![Python 3.10](https://img.shields.io/badge/Python-3.10-blue.svg?style=flat-square&logo=python)](https://www.python.org/downloads/release/python-310/) [![PyPi Package](https://img.shields.io/badge/PyPi_Package-pip_install_DeeptransTool-yellow.svg?style=flat-square&logo=pypi)](https://pypi.org/project/DeeptransTool/)\r\n\r\n*The package is still under development, you may find serious bugs or features like the pdf translator still missing. Any serious bugs please let me know by discord!*\r\n\r\n\r\n## Summary and details\r\n---\r\nThe **perfect** module to make ***translations*** with no character limitations, ***no need to pay and no need to give your bank details*** to access the API of ***DeepL***. Translate the main ***text files*** (soon also pdf's) or give the ***text directly***!\r\n\r\nTo fulfill the **purpose**, we make use of ***Selenium*** and the browser [Chrome](https://www.google.com/chrome/) therefore, it is ***necessary** to have the browser installed ***on your computer***. If you are on **windows**, download the ***latest version***, if you are on ***linux***, we recommend you to download [this](https://github.com/ElHaban3ro/DeeptransTool/blob/main/packages/google-chrome-linux64-105.0.5195.125.deb?raw=true) version. \r\n\r\n\r\n\r\n## (v1.4) \u00c2\u00bfWhat's New?\r\n---\r\n- Apparently they changed the structure of how the deepl.com page is built, and therefore, the scrapper stopped working. It's fixed!\r\n\r\n- The scrapp system was changed in the text. We now use \"Beautifulsoup4\" which will prevent us from errors in the future!\r\n\r\n\r\n## Functions\r\n---\r\n\r\n#### - file_translate(route, string_characters, l_from, l_to, new_file, new_file_extension)\r\n> Use the world's \"best translator\" to translate files with python, and without API key.\r\n>\r\n- ***Parameters:*** \r\n    \r\n    - route: **STR** | Path of the file to translate.\r\n    \r\n    - string_characters: **INT** | how many characters will contain the string to be translated (it is done by parts, by the limitation that has the same translator). Use at most 5000, and with margin of error.\r\n    \r\n    - l_from: **STR** | Language of origin. Generally the first acronym of the original language is used! An example of this is \"Espa\u00c3\u00b1ol\", its acronym being \"es\". If you have any doubts about the acronym of your source or target language, check the website DeepL.\r\n\r\n    - l_to: **STR** | Target Language. Generally the first acronym of the original language is used! An example of this is \"English\", its acronym being \"en\". If you have any doubts about the acronym of your source or target language, check the website DeepL.\r\n\r\n    - new_file: **BOOL** | If you want the translation of the file to be done on a new one, you should activate this option.\r\n\r\n    - new_file_extension: **STR** | If the previous option is True (new_file), you have to provide a valid file extension for the new file. If it is not provided, your new extension will be assumed to be txt.\r\n\r\n\r\n\r\n\r\n#### - string_translate(text, string_characters, l_from, l_to)\r\n> Use the world's \"best translator\" to translate any text and make use of it, without any restrictions!\r\n>\r\n- ***Parameters:*** \r\n    - text: **STR** | Text to translate!\r\n    \r\n    - string_characters: **INT** | how many characters will contain the string to be translated (it is done by parts, by the limitation that has the same translator). Use at most 5000, and with margin of error.\r\n    \r\n    - l_from: **STR** | Language of origin. Generally the first acronym of the original language is used! An example of this is \"Espa\u00c3\u00b1ol\", its acronym being \"es\".\r\n\r\n    - l_to: **STR** | Target Language. Generally the first acronym of the original language is used! An example of this is \"English\", its acronym being \"en\".\r\n\r\n\r\n- ***Return:***\r\n    Return the text translate.\r\n    \r\n\r\n\r\n## Installation and Use!\r\n---\r\n\r\n#### Installation:\r\nTo use this package, the best idea is to do it through ***pip***:\r\n```bash\r\npip install DeeptransTool\r\n```\r\n***IT IS VERY IMPORTANT THAT THE \"D\" AND THE \"T\" ARE CAPITALIZED.***\r\n\r\n\r\nOr, on the contrary, you can **clone** this repository and access it:\r\n```bash\r\ngit clone https://github.com/ElHaban3ro/DeeptransTool\r\n```\r\n\r\nThis will create a folder of the project itself inside your python root project. Next we have to install the necessary dependencies for the project to work correctly, this can be done with:\r\n```bash\r\npip install -r requirements.txt \r\n```\r\n\r\nThis would **ideally** have to install all the necessary libraries for you. This will be installed in the ***virtual environment*** of your project. See how to create a [virtual environment here]('https://docs.python.org/3/tutorial/venv.html').\r\n\r\n\r\nIn addition to this, remember to have the ***Chrome*** browser installed on your ***device***. Remember that, if you are on ***Windows***, you should install the ***latest version***, and if you are on ***linux***, [install the version that ***I leave*** in my repository](https://github.com/ElHaban3ro/DeeptransTool/blob/main/packages/google-chrome-linux64-105.0.5195.125.deb?raw=true) (Any problem, contact me by ***Discord*** or ***Twitter***).\r\n\r\n\r\n\r\n#### Use:\r\nTo use this package of this form:\r\n```python\r\nfrom DTT.deepLTranslate import file_translate\r\n\r\n\r\nmi_traduccion = file_translate('C:/miruta/archivo.txt', 4999, 'es', 'en', True, 'srt')\r\n```\r\n\r\n#### Text Files Allow:\r\n- srt\r\n- txt\r\n- html\r\n- log\r\n- csv\r\n- pdf\r\n\r\n***\u00c2\u00bfmore? Send it***\r\n\r\n\r\n\r\n# Autor Contact\r\n---\r\n\r\n[![Contact Twitter](https://img.shields.io/badge/Twitter-ElHaban3ro-9cf.svg?style=for-the-badge&logo=twitter)](https://twitter.com/ElHaban3ro) [![Contact Discord](https://img.shields.io/badge/Discord-!%20Die()%231274-lightgray?style=for-the-badge&logo=discord)](https://discord.com) [![Contact Discord](https://img.shields.io/badge/GitHub-ElHaban3ro-lightgray?style=for-the-badge&logo=github)](https://github.com/ElHaban3ro)\r\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Use the world's best translator (DeepL) to translate your text files or text itself!! All without having to provide your credit card or be limited by the API. \ud83d\udc38",
    "version": "1.4",
    "project_urls": {
        "Homepage": "https://github.com/ElHaban3ro/DeeptransTool"
    },
    "split_keywords": [
        "translate",
        "deepl",
        "traduccion",
        "api",
        "translation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f13a651b7bb307338cac46d53207c0855f7560e620df5d859fb0850a2184c0e6",
                "md5": "0cde10afada3bf27c5f8a86995a6889a",
                "sha256": "ab9457cc39371e4605459b690e87a2d880a7c38ebb16c4a241fcc67dd3e8619b"
            },
            "downloads": -1,
            "filename": "DeeptransTool-1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0cde10afada3bf27c5f8a86995a6889a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 20300,
            "upload_time": "2023-07-20T23:17:11",
            "upload_time_iso_8601": "2023-07-20T23:17:11.783475Z",
            "url": "https://files.pythonhosted.org/packages/f1/3a/651b7bb307338cac46d53207c0855f7560e620df5d859fb0850a2184c0e6/DeeptransTool-1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "abdfbd0b87a5455d6578823dae7f458ed5b6e52e2940dcb31f7f6ac2042a3be4",
                "md5": "722610fdf563fbc9b70e8af3c1bd3921",
                "sha256": "78af073df31d52e963437f67afa6b787bb59305acda5825034382b1037d8a140"
            },
            "downloads": -1,
            "filename": "DeeptransTool-1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "722610fdf563fbc9b70e8af3c1bd3921",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21920,
            "upload_time": "2023-07-20T23:17:13",
            "upload_time_iso_8601": "2023-07-20T23:17:13.369835Z",
            "url": "https://files.pythonhosted.org/packages/ab/df/bd0b87a5455d6578823dae7f458ed5b6e52e2940dcb31f7f6ac2042a3be4/DeeptransTool-1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-20 23:17:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ElHaban3ro",
    "github_project": "DeeptransTool",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "deeptranstool"
}
        
Elapsed time: 0.09480s