Tag Archives: language

google-translate-cli: Mostly because it works

I haven’t seen a whole lot of CLI-level translation tools that impressed me much. But google-translate-cli seems to work very well, and doesn’t require extensive keyboard gymnastics to get results.

2014-08-06-6m47421-google-translate-cli

Enter just about any non-English string and you’ll get a translation straight from the Google hivemind, with the accompanying caveats about accuracy. That’s not the responsibility of google-translate-cli, of course; you should blame that on Big G.

Surprisingly (or perhaps not), google-translate-cli is just an awk script. If you’re expecting mongo dependencies to pull down the text, convert and format it, you’ll be disappointed. In fact, the AUR version built from git clocks in at a whopping 7.00KiB, if pacman -Qi is to be believed.

Pay close attention to the ins and outs of google-translate-cli. There are ways to convert to multiple languages, from multiple inputs, and to convert files directly — no need to pipe them or dump them.

I have no real complaints or suggestions for google-translate-cli; it satisfies me mostly because it works, but also because it does the job without sucking in dozens of dependencies or offering unnecessary flair. Clean, crisp, light and functional: Perfect. 🙂

P.S.: Why two programs from the G section today? I don’t know … because the gods ordained it. 🙄

awk: Not so much an application, as a language

As if yesterday’s post about two video editor suites with console-only interfaces wasn’t strange enough, here’s a post about awk.

2013-08-15-v5-122p-awk

awk isn’t an application. In fact, I had serious reservations about mentioning it at all, because it’s so very distant (in my opinion) from an application.

Saying awk is an application is like saying a paintbrush is art. It’s not the result, it’s the tool you use to get there.

There’s the added complication in that, at least on my Arch system, awk is actually provided by the gawk package. With nawk, mawk and some other *awks available, as I desire.

So it’s not just one flavor, in a package called “awk.” There are many. And they seem to reproduce, like rabbits. Or clothes hangers. 😯

I won’t pretend to be any kind of programming expert, even if I’ve done a little tinkering with (m)awk in the past. I know my limitations, and actually programming something is where I find mine.

On the other hand, there are countless tutorials, howtos, case examples and gimmicks out there using awk. Just search the internets for awk, and the first dozen will give you mounds more information than I can.

But here’s one push, toward my own personal favorite. Have fun. 😉