soimort / translate-shell

:speech_balloon: Command-line translator using Google Translate, Bing Translator, Yandex.Translate, etc.
https://www.soimort.org/translate-shell
The Unlicense
6.85k stars 388 forks source link

only conversion required in output #459

Closed helpinghandindia1 closed 1 year ago

helpinghandindia1 commented 1 year ago

Hello @JoshStrobl @soimort and team.

We are a NGO in India, using trans successfully. We need your support for a small issue. trans is converting word, it is fine, but we need source word's conversion in English. pls understand with following example. trans -brief hi:en कविता Poem and we need output should be - kavita pls guide.

JoshStrobl commented 1 year ago

Spam or why am I being pinged? I am not part of the team.

soimort commented 1 year ago

@helpinghandindia1 There is currently no built-in option to output the transliteration only, but you can pipe it to sed and get what you want. For example:

$ trans -no-ansi hi:en कविता | sed '2q;d' | sed 's/^.//;s/.$//'
$ trans -no-ansi mr:en कवितासंतरा | sed '2q;d' | sed 's/^.//;s/.$//'