GithubHelp home page GithubHelp logo

skyformat99 / idict-cmd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from antisomnus/idict-cmd

0.0 2.0 0.0 3.49 MB

适用于macOs, Windows和Linux的命令行词典

License: MIT License

Makefile 0.06% Python 0.42% C++ 99.52%

idict-cmd's Introduction

iDict-cmd

command line version of iDict for macOs&Windows&Linux

适用macOs,Windows(64位)和Linux的命令行版本iDict英语词典,包含330W词库以及来自权威词典的双语例句。

轻量级,包含所有依赖的可执行文件,下载即用。

同时推荐微信小程序版本,在移动端获取极佳体验

macos_detail

Install

  • Linux

    1. 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.

    2. add the location to the path

      ln -s /location/to/idict_linux /usr/local/bin/idict

    3. idict welcome idict welcome -d idict welcome -d 3

  • Windows

    1. Just go to Release page to download the latest version.
    2. add the location to the path
    3. idict welcome idict welcome -d idict welcome -d 3
  • macOs

    macOs上使用需要brew安装openssl

    1. 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.

    2. make sure you have openssl installed

      brew install openssl

    3. add the location to the path

      ln -s /location/to/idict_macos /usr/local/bin/idict

    4. 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

windows_brief

linux_detail

windows_detail

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.

    1. brew install openssl
    2. 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}"
      
    3. https://github.com/AntiSomnus/iDict-cmd.git
    4. cd iDict-cmd
    5. Compile
      g++ -Os -m64 -std=c++14 idict_linux.cpp -o idict -lssl -lcrypto
      

idict-cmd's People

Contributors

taoxinyi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.