@ablanc/translator
v4.0.0
Published
Node.js translator using puppeteer to scrape deepl.
Downloads
10
Maintainers
Readme
Table of Contents
About The Project
[]
Translator allows you to translate a JSON file and more specifically an array of values. Your JSON file must contain either an array of strings or an array of objects that you want to translate.
This project scrape https://www.deepl.com/fr/translator website to bypass it's pro API limitation. All deepl languages are available aswell as auto detection as input language.
You can either get the result of the translation printed out in the console or as a JSON file.
Built With
Installation
You can download it globally using
npm install -g @ablanc/translator
or add it as a devlopment dependency
npm install --save-dev @ablanc/translator
# or with yarn
yarn add -D @ablanc/translator
Usage
To use it type this in your terminal:
Usage: translator [options]
Options:
-i, --input <input> json file to process
-o, --output <console|path-to-file> output display
-li, --lang-input <lang_input> en | fr | de | es | pt | it | nl | pl | ru
-lo, --lang-output <lang_output> en-US | fr-FR | de-DE | es-ES | pt-PT | it-IT | nl-NL | pl-PL | ru-RU
-pt, --properties-to-translate <property,property> specify your object properties you want to translate, separated by ,
-skid --skip-until-id <id> it will start translating your objects from id
-int, --interactive interactive mode
-h, --help display help for command
Contributing
Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.