command line version of iDict for macOs&Windows&Linux
适用macOs, Windows(64位)和Linux的命令行版本iDict英语词典,包含330W词库以及来自权威词典的双语例句。
轻量级,包含所有依赖的可执行文件,下载即用。
同时推荐微信小程序版本,在移动端获取极佳体验
请去Release页面下载对应的可执行文件
-
Linux
-
wget https://github.com/AntiSomnus/iDict-cmd/releases/download/[latest-release-number]/idict_linux && chmod a+x idict_linux
Make sure to change [latest-release-number] to the number of release, e.g
2.0
Or you can just go to Release page to download the latest version.
-
add the location to the path
ln -s /location/to/idict_linux /usr/local/bin/idict
-
idict welcome
idict welcome -d
idict welcome -d 3
-
-
Windows
- Just go to Release page to download the latest version.
- add the location to the path
idict welcome
idict welcome -d
idict welcome -d 3
-
macOs
macOs上使用需要brew安装openssl
-
wget https://github.com/AntiSomnus/iDict-cmd/releases/download/[latest-release-number]/idict_macos && chmod a+x idict_macos
Make sure to change [latest-release-number] to the number of release, e.g
2.0
Or you can just go to Release page to download the latest version.
-
make sure you have
openssl
installedbrew install openssl
-
add the location to the path
ln -s /location/to/idict_macos /usr/local/bin/idict
-
idict welcome
idict welcome -d
idict welcome -d 3
-
idict word [-d|--detail [max-sentences-per-dict] ]
word the word you want to query 你想要查询的单词,默认不包含例句
-d | --detail get the detailed info of the word 获取单词详细释义,包含例句
max-sentences-per-dict(default=2) 显示的例句数量,默认为2
idict welcome
idict welcome -d
idict welcome -d 1
修改color.ini
即可修改颜色
New python version will give you the flexibility to change color configuration.
Just change the color.ini
in the folder of win64_python
Release
The color table is below
BLACK = 30
RED = 31
GREEN = 32
YELLOW = 33
BLUE = 34
MAGENTA = 35
CYAN = 36
WHITE = 37
RESET = 39
LIGHTBLACK = 90
LIGHTRED = 91
LIGHTGREEN = 92
LIGHTYELLOW = 93
LIGHTBLUE = 94
LIGHTMAGENTA = 95
LIGHTCYAN = 96
LIGHTWHITE = 97
default color configuration is
[COLOR]
word_color = 91
section_color = 92
hint_color = 93
text_color = 97
source_color = 90
可以获得来自国外权威新闻媒体对于该单词的用法,在win64_python
版本中使用-n
即可开启,如idict test -n
或idict test -n -d
New feature that provides sentences from news by the api of vocabulary.com
-
Linux
g++ -Os -s -m64 -std=c++14 idict_linux.cpp -o idict -Wl,-static -lssl -lcrypto -Wl,-Bdynamic -ldl
if you have the error of
undefined reference to 'pthread_getspecific'
, you might need to add-pthread
g++ -Os -s -m64 -std=c++14 idict_linux.cpp -o idict -Wl,-static -lssl -lcrypto -Wl,-Bdynamic -ldl -pthread
-
Windows
g++ idict_win.cpp -o idict -Os -s -m64 -std=c++14 -static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive -Wl,-Bstatic -lssl -lcrypto -Wl,-Bdynamic -lws2_32
-
macOs In order to use it properly, you must install openssl from brew first.
brew install openssl
- For compilers to find openssl you must set:
export LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:"${LD_LIBRARY_PATH}" export CPATH=/usr/local/opt/openssl/include:"${CPATH}"
https://github.com/AntiSomnus/iDict-cmd.git
cd iDict-cmd
- Compile
g++ -Os -m64 -std=c++14 idict_linux.cpp -o idict -lssl -lcrypto