⬆️ ⬇️

Sdcv console dictionary

Very often, administrators have to read mana, which, unfortunately, in most cases, in English. Of course, most people know English, and not very bad, but very often words that are very difficult to translate are found. It is good when you have some kind of stardict at your fingertips or there is just an internet connection and you can take a look at the translation. And if not? Or set up a server, and you only have a bare console without going online. I understand that sounds fantastic, but anything can happen in life. Or as in my case: I needed a simple dictionary that would not hang in the tray, have no extra frills and gays (kick in the direction of stardict) and was at hand, well, or not far from it. :) That's it for such cases (well, or you are just an avid Linux Geek and you’ll have everything in the console) and there is a console dictionary sdcv - StarDict Console Version.



Unfortunately, this small software, 155 KB in size, is far from being found in every Linux distribution, so you may have to build it yourself, I don’t think it will be difficult. :) You can download it here - downloads.sourceforge.net/sourceforge/sdcv/sdcv-0.4.2.tar.bz2



After typing in the sdcv console, we will receive a sentence to enter a word or phrase, and after entering it and pressing Enter, we will receive a translation and a sentence to enter the next phrase. And so on to infinity. If you have more than one dictionary installed in your system, he will ask, using which dictionary should he translate this word or phrase. For translation, the program uses stardict dictionaries, so you should have them. If you don’t have them, you’ll need to download them and put them in the directory with dictionaries.

')

It would seem, why write so much text for such an insignificant utility. But if you dig deeper and poraskinut brains, then the areas of its application are many. Starting from the banal translation method ls | grep | sdcv ls | grep | sdcv ls | grep | sdcv and ending use in scripts.



A few options. Of the interesting ones, you can select a couple: -u to translate a word using some specific dictionary and -n for use in scripts. By the way, I either did not understand the purpose of this option, or used it incorrectly, but my result came out the same as if I passed sdcv as a parameter to the word for translation.

Source: https://habr.com/ru/post/69041/



All Articles