I have wanted to post how to check words from the console for a long time, but Elav forward.
I briefly quote the phrase of Elav's English teacher who shared with us in her post […] When you don't know a word in English, look it up in an English dictionary, not in a translator […]
In this post we will use an application called sdcv, which is a command line interface to the popular (currently unsupported) StarDict application. Of course, those who so wish can install their respective graphical interface. In addition I have uploaded some dictionaries so that they do not take long to find them and can install them quickly.
What I like about this application is that it shows you the definitions of all the available dictionaries, so you can have the definition of several dictionaries and the equivalent word in other languages or only in another, depending on how it is configured.
Dictionaries included:
English:
- Oxford
- WordNet
Spanish:
- Dictionary of the Royal Spanish Academy (RAE)
Bilingual:
- Spanish English
- English Spanish
Sdcv installation
Gentoo:
emerge sdcv
I didn't need to move him to the USEs and he was installed shortly. Of course, the issue of USEs is highly variable.
Slackware:
Slackbuild available, http://slackbuilds.org/repository/14.0/misc/sdcv/. I installed it successfully with sbopkg, I didn't need to look for additional dependencies.
Arch:
pacman -S sdcv
Ubuntu:
sudo apt-get install sdcv
For other distributions it is similar, for example in Fedora it would be yum install sdcv, in opensuse zypper in sdcvEtc. ...
Installing the dictionaries:
cd && wget https://dl.dropboxusercontent.com/u/70368222/dics.tar.gz
mkdir -p /usr/share/stardict/dic
cd /usr/share/stardict/dic
sudo tar -xvzf dics.tar.gz
Now they have these dictionaries installed.
Usage and syntax
The simplest way to use it is by typing sdcv and the words to query, for example:
sdcv hello world
Usage: sdcv [OPTIONS] words
-h, --help display this help and exit
-v, --version display version information and exit
-l, --list-dicts display list of available dictionaries and exit
-u, --use-dict bookname for search use only dictionary with this bookname
-n, --non-interactive for use in scripts
–Utf8-output output must be in utf8
–Utf8-input input of sdcv in utf8
–Data-dir path / to / dir use this directory as path to stardict data directory
Practical and simple. 100% implemented
Thank you! (Y) 🙂
You're welcome
Excellent, I was looking for something like that. Thank you.
You're welcome.
An important observation is that when I installed it in Gentoo I had not configured Gentoo to use UTF-8, accented words and the ñ accent did not recognize them. The UTF-8 parameters can be useful in those cases.
A greeting! I never miss an entry on your blog, really one of the best about Linux in Spanish that you can get on the net! An off-topic question (I do not mean by this that it is a bad input xD) what is the font you use? (the one seen in the title of the terminal) thank you! Congratulations from Venezuela!
Not that the blog belongs to someone, although of course they are Elav, gara_KZKG ... I think the blog belongs to everyone for everyone. Now, the image that this post represents was originally used by Elav, he would know how to answer what you ask.
The capture is mine 😀 and the source is terminus is in aur (archlinux)
Interesting, I'll try it.
Well, I liked this post, an offline dictionary never hurts, and in the terminal it makes it a little more peculiar, very good contribution. Thank you.
Great totally practical and functional. Thanks a lot!!!
Thank you, it helped me a lot. He was always looking for this, and in the terminal he does it better.
Very good
I made my own translator using the i2e db (it was in the Debian 4 repo I think).
https://github.com/xr09/shakespeare/archive/0.7b1.tar.gz
It has PyQt4 UI and cli with colors.
Pictures ...
http://imgur.com/ePqyjWq,4uGKNMD
when in the terminal I put
sudo tar -xvzf dics.tar.gz
something like
tar (child): dics.tar.gz.1: Cannot open: File or directory does not exist
tar (child): Error is not recoverable: exiting now
Tar: Child Returned Status 2
Tar: ERROR IS NOT RECOVERABLE: EXITING NOW
that I have to do
It means that either the file was not downloaded, or it was downloaded under another name.
Why don't you make sure that dics.tar.gz downloaded you?
Or try again?
Now that I see the second line, mkdir should be used as root. It is good to reflect on what each command does.
Excellent, you don't know how long this process had in the background, waiting for it to appear.
Excellent, much more comfortable than looking for the meaning on the web.
Thank you!
I join the majority and I thank you for this fantastic post.
However, after going through the steps a second time after a reinstallation of Debian Testing and Xfce, I have not gotten them to work. He only recognizes the Oxford, none of the others. Before the reinstallation everything worked perfectly, I even had some aliases configured to consult only the DRAE.
In addition, I had to move dics.tar.gz to the stardict / dic directory to unzip, because with the commands in the guide it cannot find the file. But what annoys me is that the dictionaries are not there when I do sdcv -l, it only lists the Oxford.
I have changed permissions to the files with chmod -R to + r / usr / share / stardict / dic / so that all users can read them, but nothing.
Any ideas? Thank you very much in advance.
I answer to myself, in case it helps someone.
Indeed, the problem was one of permissions, and the way to solve it, although unorthodox, was simple:
I just opened the directory with Thunar as superuser and, checking the permissions of the folders, I noticed the message that says they are inconsistent. By clicking on the button that kindly suggests correcting the errors everything remains as it should.
Best regards.
Thank you for this very useful idea to have dictionaries at hand. This is helping.
I'm using Maya 13.00 and it tells me that I don't have sufficient administrative permissions, I need your help because what I have done is load an old dic with wine. of win Xp.
Help me Please Greetings !!!!
Impeccable, installed and running 100%.
Kernel: 3.16.3-1.gd2bbe7f-desktop x86_64 (64 bit) Desktop: KDE 4.14.1
Distro: openSUSE 13.1 (Bottle)
Thanks for sharing. 😉
Thanks a lot! I've been looking for something like that for a long time. Linux and happy hugs!
Excellent! I will try it. I'm very happy to have a good free dictionary, that's why… Wine, you can go to m…!
Very useful. Thank you!
you have to update because I get the following:
Connecting with dl.dropboxusercontent.com (dl.dropboxusercontent.com) [162.125.48.131]: 443… connected.
HTTP request sent, waiting for response… 404 Not Found
2017-04-18 14:13:24 ERROR 404: Not Found.
It will be greatly appreciated if you update it or tell me what other medium I can use
Thanks for the excellent tutorial!
For those who get an error, I pass 2 Spanish-English and English-Spanish dictionaries for stardict that I found out there.
https://www.dropbox.com/sh/hsh7vqsn6smhmo5/AADKlb4bCnoM8RZp-Z7Rf1owa?dl=0
Regards!
very useful! thanks for sharing and thanks also to Matías de la Fuente for the files
Apparently time has changed the information and it has not been updated. Does it still work somehow? Thanks.
:~# cd && wget https://dl.dropboxusercontent.com/u/70368222/dics.tar.gz
–2022-11-24 05:36:46– https://dl.dropboxusercontent.com/u/70368222/dics.tar.gz
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)… 2620:100:601d:15::a27d:50f, 162.125.5.15
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)[2620:100:601d:15::a27d:50f]:443… connected.
HTTP request sent, waiting for response… 404 Not Found
2022-11-24 05:36:47 ERROR 404: Not Found.