{"id":16833950,"url":"https://github.com/linus789/deepltranslator","last_synced_at":"2025-03-22T04:30:47.096Z","repository":{"id":102149048,"uuid":"127477909","full_name":"Linus789/DeepLTranslator","owner":"Linus789","description":"The DeepL Translator is an API written in Java that translates via the DeepL website sentences. Without API key.","archived":false,"fork":false,"pushed_at":"2023-06-14T22:56:40.000Z","size":128,"stargazers_count":57,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T08:11:18.137Z","etag":null,"topics":["deepl","java","selenium","translator"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Linus789.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-30T22:18:19.000Z","updated_at":"2024-07-22T11:14:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e44a84b-0a75-46e6-a5f0-025f95134465","html_url":"https://github.com/Linus789/DeepLTranslator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linus789%2FDeepLTranslator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linus789%2FDeepLTranslator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linus789%2FDeepLTranslator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linus789%2FDeepLTranslator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Linus789","download_url":"https://codeload.github.com/Linus789/DeepLTranslator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244907420,"owners_count":20529850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deepl","java","selenium","translator"],"created_at":"2024-10-13T11:55:42.364Z","updated_at":"2025-03-22T04:30:47.091Z","avatar_url":"https://github.com/Linus789.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepLTranslator\n\u003e This project is a simple \u003ca href=\"https://www.deepl.com/translator\"\u003eDeepL Translator\u003c/a\u003e API written in Java. It translates via the DeepL website sentences. This works without having a premium access and can be used free of charge.\n\n## Prerequisites\n* ChromeDriver installed and located in [PATH](https://en.wikipedia.org/wiki/PATH_(variable))\n\n## Install\n### Maven\nAdd the JitPack repository in your pom.xml\n```xml\n\u003crepository\u003e\n    \u003cid\u003ejitpack.io\u003c/id\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\u003c/repository\u003e\n```\nAdd the dependency\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.Linus789\u003c/groupId\u003e\n    \u003cartifactId\u003eDeepLTranslator\u003c/artifactId\u003e\n    \u003cversion\u003e2.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n### Gradle\nAdd the JitPack repository in your root build.gradle at the end of repositories\n```kotlin\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\nAdd the dependency\n```kotlin\ndependencies {\n    implementation 'com.github.Linus789:DeepLTranslator:2.1.0'\n}\n```\n\n## Examples\n### Using a configuration\n```java\nDeepLConfiguration deepLConfiguration = new DeepLConfiguration.Builder()\n        .setTimeout(Duration.ofSeconds(10))\n        .setRepetitions(3)\n        .setRepetitionsDelay(retryNumber -\u003e Duration.ofMillis(3000 + 5000 * retryNumber))\n        .setPostProcessing(false)\n        .build();\n\nDeepLTranslator deepLTranslator = new DeepLTranslator(deepLConfiguration);\n```\n\n### Synchronous translating\n```java\ntry {\n    String translation = deepLTranslator.translate(\"I ran into a similar problem yesterday.\", SourceLanguage.ENGLISH, TargetLanguage.GERMAN);\n    System.out.println(translation);\n} catch (Exception e) {\n    e.printStackTrace();\n}\n```\n\n### Asynchronous translating\n\n```java\ndeepLTranslator.translateAsync(\"Detected cow running backwards.\", SourceLanguage.ENGLISH, TargetLanguage.GERMAN)\n        .whenComplete((res, ex) -\u003e {\n            if (ex != null) {\n                ex.printStackTrace();\n            } else {\n                System.out.println(res);\n            }\n        });\n```\n\n### Await termination\nBlocks until all async translations from one `DeepLTranslator` instance have completed execution, or the timeout occurs,\nor the current thread is interrupted, whichever happens first.\n```java\ntry {\n    deepLTranslator.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS);\n} catch (InterruptedException e) {\n    e.printStackTrace();\n}\n```\n\n### Shutdown\nStops all running threads\n```java\nDeepLTranslator.shutdown();\n```\n\n### Example\n* [DeepLTranslatorTest](src/test/java/DeepLTranslatorTest.java)\n\n## License\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinus789%2Fdeepltranslator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinus789%2Fdeepltranslator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinus789%2Fdeepltranslator/lists"}