Skip to content

A Schmanguage CLI tool to automatically translate texts

License

Notifications You must be signed in to change notification settings

schmanguage/schmanguage-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schmanguage CLI

A CLI tool for translating an input to schmanguage written in Go.

The program takes the text to translate as input and prints it as schmanguage to stdout.

Usage

Install it by cloning and building the go source code:

git clone https://github.com/schmanguage/schmanguage-cli
cd schmanguage-cli
go build .

That creates a executeable called schmanguage which is used as the cli tool.

You can simply provide a literal text as input that will be translated:

./schmanguage Hello World
> Schmello Schmorld

Flags

An optional flag type specifies the input type. Currently available types are text and json. If omitted it defaults to text.

So this gives the same result:

./schmanguage Hello World
> Schmello Schmorld

./schmanguage --type text Hello World
> Schmello Schmorld

When using the json type, the tool expexts a path to a json file containing string-string key-value pairs.

// my_file.json
{
	"myText": "This is the BEST Language",
	"foo": "bar",
	"Hello": "World"
}

Assuming this file my_file.json and giving it to the schmanguage-cli:

./schmanguage --type json my_file.json

whould change the file to this

// my_file.json
{
	"myText": "Schmis is the SCHMEST Schmanguage",
	"foo": "bar",
	"Hello": "Schmorld"
}

Currently only string values are supported in a json file. If your file contains a non-string value, schmanguage-cli prints a warning to stdout and ignores this key-value pair and it remains unchanged.

About

A Schmanguage CLI tool to automatically translate texts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages