AWS JSON TRANSLATOR CLI is a command line application to translate JSON files using AWS Translate

Overview

cli icon AWS JSON TRANSLATOR CLI

AWS JSON TRANSLATOR CLI is a command line application to translate JSON files using AWS Translate.

Table of contents

πŸ”§ Features

  • πŸ“„ Deep and non-deep JSON Files (support for JSON Arrays too)
  • πŸ‘” Support for formality and profanity (to view supported languages see the links below)
  • πŸ”‘ Easy configuration of keys and region with a "set-configuration" command.
  • πŸ“ƒ Translate without altering the structure.

πŸ’» Usage

Create an IAM account with AWS Translation:

  • Login on AWS console and navigate to IAM panel
  • Click on Users tab
  • Click on Add User button
  • Follow the steps and add a User with access to the Translation API only
  • Save the access key and the secret in a secure place

Available regions: AWS Regions documentation With both keys and region, we are ready to do the configuration.

Running configuration

  1. Configure Access Key, Secret Key and Region using "set-configuration" command specifying parameters.

    • --awsAccessKey. OPTIONAL. Your AWS Access Key from IAM User.
    • --awsSecretKey. OPTIONAL. Your AWS Secret Key from IAM User.
    • --awsRegion. OPTIONAL. Your AWS Region.

All parameters are optional, so you can set individually each property if you want.

Run .exe

.\aws-json-translator.exe set-configuration --awsAccessKey exampleAccessKey --awsSecretKey exampleSecretKey --awsRegion eu-west-3

Run .jar

java -jar aws-json-translator.jar set-configuration --awsAccessKey exampleAccessKey --awsSecretKey exampleSecretKey --awsRegion eu-west-3
  1. Translate JSON file using "translate-json" command specifying required parameters.

    • -sl or --sourceLanguage. REQUIRED. Source language of JSON in ISO 3166 alpha-2 code.
    • -tl or --targetLanguage. REQUIRED. Target language you want to translate to in ISO 3166 alpha-2 code.
    • -sf or --sourceFile. REQUIRED. Source file containing JSON to translate.
    • --enableProfanityFilter. OPTIONAL. Enable profanity filter. (Empty parameter)
    • --formality. OPTIONAL. Formality level. Possible values: formal, informal. Default: formal
    • --customTerminology. OPTIONAL. Custom terminology name list separated by comma.

To use custom terminology, you have to create a custom terminology in Amazon Translate and then put the name in --customTerminology parameter. For more information, see Amazon Translate Custom Terminology.

Basic usage of "translate-json"


Run .exe

.\aws-json-translator.exe translate-json -sf example.json -sl es -tl en

Run .jar

java -jar aws-json-translator.jar translate-json -sf example.json -sl es -tl en

This command will translate the file example.json from Spanish to English

Extended usage of "translate-json"


Run .exe

.\aws-json-translator.exe translate-json --sourceFile example.json --sourceLanguage es --targetLanguage en --formality formal --enableProfanityFilter --customTerminology list1,list2

Run .jar

java -jar aws-json-translator.jar translate-json --sourceFile example.json --sourceLanguage es --targetLanguage en --formality formal --enableProfanityFilter --customTerminology list1,list2

This command will translate the file example.json from Spanish to English with formality formal, with enabled profanity filter and a list of custom terminologies

  1. Done! Your translated JSON is on .\output folder with the target language code as name.

πŸ‘©β€πŸ’» Credits and used technologies

πŸ’Ό License

MIT License

Copyright (c) 2022 Marc Guillem Dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...

httpx is a CLI to execute requests from JetBrains Http File.

httpx: CLI for run http file httpx is a CLI to execute requests from JetBrains Http File. How to use? Create index.http file with following code, then

Dec 7, 2022

Wrapper around ping command for Windows and MacOS

Wrapper around ping command for Windows and MacOS. Extended with functionality to intercept results provided by the ping command output (latency, ttl and etc.)

Jan 6, 2022

Annotation-based command framework for Minestom

Minestand Annotation-based command framework for Minestom Advantages over other frameworks Minestand works by converting your classes into Minestom co

Aug 27, 2022

Several implementations of a text table, originally using ASCII and UTF-8 characters for borders.

ASCII Table ASCII table - A simple tool to format tables with various row/column options for indentation, indentation character, alignment, padding (l

Dec 4, 2022

TransitScheduler - a command line tool that can read .json data formulated for tracking transit patterns to a multithreaded concurrent simulation of passengers boarding and unboarding trains that constantly move to the next station on the line. The trick here, is that two trains cannot occupy the same station at any time.

TransitScheduler - a command line tool that can read .json data formulated for tracking transit patterns to a multithreaded concurrent simulation of passengers boarding and unboarding trains that constantly move to the next station on the line. The trick here, is that two trains cannot occupy the same station at any time.

Jan 25, 2022

A maven plugin to include features from jmeter-plugins.org for JMeterPluginsCMD Command Line Tool to create graphs, export csv files from jmeter result files and Filter Result tool.

A maven plugin to include features from jmeter-plugins.org for JMeterPluginsCMD Command Line Tool to create graphs, export csv files from jmeter result files and Filter Result tool.

jmeter-graph-tool-maven-plugin A maven plugin to create graphs using the JMeter Plugins CMDRunner from JMeter result files (*.jtl or *.csv) or using F

Nov 3, 2022

Jacksum (JAva ChecKSUM) is a free, open source, cross-platform, feature-rich, multi-threaded command line tool for calculating hash values, verifying data integrity, finding files by their fingerprints, and finding algorithms to a hash value.

Jacksum (JAva ChecKSUM) is a free, open source, cross-platform, feature-rich, multi-threaded command line tool for calculating hash values, verifying data integrity, finding files by their fingerprints, and finding algorithms to a hash value.

Nov 28, 2022

An EFX translator written in Java.

This is an EFX translator written in Java. It supports multiple target languages. It includes an EFX expression translator to XPath. It is used to in the generation of the Schematron rules in the eForms SDK.

Oct 14, 2022

Quarkus JAX-RS App Deployed as AWS Lambda with AWS CDK

Quarkus JAX-RS App Deployed as AWS Lambda with AWS CDK

MicroProfile with Quarkus as AWS Lambda Function deployed with Cloud Development Kit (CDK) v2 for Java A lean starting point for building, testing and

Oct 28, 2022

A compiler built in Java that allows to translate xml format to json.

A compiler built in Java that allows to translate xml format to json. Getting Started Welcome to the VS Code Java world. Here is a guideline to help y

Jan 6, 2022

This App is a command line application, based on Cryptography.

This App is a command line application, based on Cryptography. where a user input a text and its encrypted and can be decrypted as well.

Jan 28, 2022

Mp4grep - a CLI for transcribing and searching audio/video files

Mp4grep - a CLI for transcribing and searching audio/video files

mp4grep mp4grep is a tool that transcribes and searches audio and video files for a regex pattern. mp4grep isn't just for mp4 files! It also supports

Nov 19, 2022

Command-line API for Atlassian JIRA using the Tomitribe CREST library

Atlassian JIRA Command-Line (CLI) Jamira is a command-line API for Atlassian JIRA using the Tomitribe CREST library. Installation Jamira can be downlo

Sep 10, 2022

A command-line tool to securely encrypt passwords and notes using AES encryption.

Treasury A command-line tool to securely encrypt passwords and notes using AES encryption. Installation Usage Technology Built solely in Java Picocli

Oct 17, 2022

Convert Java to JSON. Convert JSON to Java. Pretty print JSON. Java JSON serializer.

Convert Java to JSON. Convert JSON to Java.  Pretty print JSON.  Java JSON serializer.

json-io Perfect Java serialization to and from JSON format (available on Maven Central). To include in your project: dependency groupIdcom.cedar

Nov 30, 2022

MapNeat is a JVM library written in Kotlin that provides an easy to use DSL (Domain Specific Language) for transforming JSON to JSON, XML to JSON, POJO to JSON in a declarative way.

MapNeat is a JVM library written in Kotlin that provides an easy to use DSL (Domain Specific Language) for transforming JSON to JSON, XML to JSON, POJ

Sep 17, 2022

Flashcards app with Google Translate integration.

Flashcards application. Sample Spring + next.js + mongoDB Flashcard app, with Google Translator integration.

Nov 9, 2021

Java annotation-based framework for parsing Git like command line structures

Airline Airline is a Java annotation-based framework for parsing Git like command line structures. Latest release is 0.8, available from Maven Central

Nov 7, 2022
Releases(1.1)
Owner
Marc Guillem
Full Stack Developer
Marc Guillem
Mp4grep - a CLI for transcribing and searching audio/video files

mp4grep mp4grep is a tool that transcribes and searches audio and video files for a regex pattern. mp4grep isn't just for mp4 files! It also supports

ooc 245 Nov 19, 2022
Command-line API for Atlassian JIRA using the Tomitribe CREST library

Atlassian JIRA Command-Line (CLI) Jamira is a command-line API for Atlassian JIRA using the Tomitribe CREST library. Installation Jamira can be downlo

Tomitribe 12 Sep 10, 2022
Java annotation-based framework for parsing Git like command line structures

Airline Airline is a Java annotation-based framework for parsing Git like command line structures. Latest release is 0.8, available from Maven Central

null 848 Nov 7, 2022
A command line parser generator

jbock is a command line parser that works similar to airline and picocli. While most of these other tools scan for annotations at runtime, jbock is an

H90 72 Nov 7, 2022
Command line parsing framework for Java

JCommander This is an annotation based parameter parsing framework for Java 8. Here is a quick example: public class JCommanderTest { @Parameter

Cedric Beust 1.8k Dec 7, 2022
DeV Tools - Swiss Army Knife of command line utilities

dvt aims to bundle all small utilities used by developers (typically a mix of cli and online tools) into one binary that you can simply use in the console. No need for complex pipe-ing, copy-pasting on different sites or keep installing cli utilities for every need.

Madalin Ilie 13 Sep 15, 2022
Tiny logging wrapper dedicated for CLI-oriented applications

Dynamic Logger Tiny logging wrapper dedicated for CLI oriented applications with non-static logger that require dynamic threshold/level changes, progr

Dzikoysk 3 Sep 25, 2022
A CLI to lock the terminal while being afk.

LockCLI A CLI to lock the terminal while being afk. Usage: [lock, unlock] LockCLI from Source Have JDK 8+ Installed Compile main class and run in any

null 4 Dec 17, 2021
CLI for NubesGen

CLI for NubesGen This CLI is part of the NubesGen project. It automates a project configuration: on simple projects, running this command line should

Julien Dubois 12 Apr 13, 2022