iDict-cmd
command line version of iDict for macOs&Windows&Linux
适用macOs,Windows(64位)和Linux的命令行版本iDict英语词典,包含330W词库以及来自权威词典的双语例句。
轻量级,包含所有依赖的可执行文件,下载即用。
同时推荐微信小程序版本,在移动端获取极佳体验
Install
-
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
-
Usage
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
Example
idict welcome
idict welcome -d
idict welcome -d 1
Compile on your own
-
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