Code Monkey home page Code Monkey logo

lookup's Introduction

lookup

    ___________________   ___________________
.-/|  01   ~~**~~      \ /      ~~**~~   02  |\-.
||||                    :                    ||||
||||   $ lookup         :   Difficult        ||||
||||                    :   circumstances    ||||
||||                    :   serve as a       ||||
||||   Nothing seek,    :   textbook of      ||||
||||   nothing find.    :   life for people. ||||
||||                    :                    ||||
||||                    :           @fengsp  ||||
||||___________________ : ___________________||||
||/====================\:/====================\||
`---------------------~___~--------------------''

english-chinese dictionary via the command line

Do you read english documentation a lot? Do you find yourself constantly opening a webpage or switching to dictionary application for understanding an english word?

Suppose you want to know what does one word mean. Why open your browser and search when you can simply stay in the console and ask lookup:

$ lookup
usage: lookup [WORD]

$ lookup hello
iCIBA: hello
------------
你好; 问好; 喂; 呼叫

$ lookup "execuse me"
iCIBA: execuse me
-----------------
借口; 原谅; 挡箭牌; 理由

$ lookup 计算机
iCIBA: 计算机
-------------
computer; computers; computer science; calculating machine

Installation

$ pip install lookup
or
# Use Mac OS X brew
$ brew install https://raw.github.com/fengsp/lookup/master/lookup.rb
or
# Download the zipball and install it
$ wget https://github.com/fengsp/lookup/archive/master.zip
$ python setup.py install

Note

There is known issue that homebrew might run into error. Try use the following command to fix it:

$ sudo chmod -R go+w /Library/Python/2.7/site-packages/

Better

If you feel anything wrong, feedbacks or pull requests are welcome.

lookup's People

Contributors

fengsp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lookup's Issues

pkg_resources.DistributionNotFound: requests

sudo pip install lookup

Downloading/unpacking lookup
Downloading lookup-0.1.tar.gz
Running setup.py (path:/private/tmp/pip_build_root/lookup/setup.py) egg_info for package lookup

Downloading/unpacking pyquery (from lookup)
Downloading pyquery-1.2.8.zip (42kB): 42kB downloaded
Running setup.py (path:/private/tmp/pip_build_root/pyquery/setup.py) egg_info for package pyquery

no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution

Downloading/unpacking requests (from lookup)
Downloading requests-2.3.0-py2.py3-none-any.whl (452kB): 452kB downloaded
Downloading/unpacking lxml>=2.1 (from pyquery->lookup)
Downloading lxml-3.3.5.tar.gz (3.5MB): 3.5MB downloaded
Running setup.py (path:/private/tmp/pip_build_root/lxml/setup.py) egg_info for package lxml
>/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.3.5.
Building without Cython.
Using build configuration of libxslt 1.1.28
Building against libxml2/libxslt in the following directory: /opt/local/lib

warning: no previously-included files found matching '*.py'

Downloading/unpacking cssselect (from pyquery->lookup)
Downloading cssselect-0.9.1.tar.gz
Running setup.py (path:/private/tmp/pip_build_root/cssselect/setup.py) egg_info for package cssselect

no previously-included directories found matching 'docs/_build'

Installing collected packages: lookup, pyquery, requests, lxml, cssselect
Running setup.py install for lookup

Installing lookup script to /usr/local/bin

Running setup.py install for pyquery

no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching 'pycache' found anywhere in distribution
Running setup.py install for lxml
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.3.5.
Building without Cython.
Using build configuration of libxslt 1.1.28
Building against libxml2/libxslt in the following directory: /opt/local/lib
building 'lxml.etree' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/opt/local/include -I/opt/local/include/libxml2 -I/private/tmp/pip_build_root/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.etree.o -L/opt/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.9-intel-2.7/lxml/etree.so
ld: warning: ignoring file /opt/local/lib/libxslt.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libxslt.dylib
ld: warning: ignoring file /opt/local/lib/libexslt.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libexslt.dylib
ld: warning: ignoring file /opt/local/lib/libxml2.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libxml2.dylib
ld: warning: ignoring file /opt/local/lib/libz.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libz.dylib
building 'lxml.objectify' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/opt/local/include -I/opt/local/include/libxml2 -I/private/tmp/pip_build_root/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.objectify.o -w -flat_namespace
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.objectify.o -L/opt/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.9-intel-2.7/lxml/objectify.so
ld: warning: ignoring file /opt/local/lib/libxslt.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libxslt.dylib
ld: warning: ignoring file /opt/local/lib/libexslt.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libexslt.dylib
ld: warning: ignoring file /opt/local/lib/libxml2.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libxml2.dylib
ld: warning: ignoring file /opt/local/lib/libz.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libz.dylib

Running setup.py install for cssselect

no previously-included directories found matching 'docs/_build'

Successfully installed lookup pyquery requests lxml cssselect
Cleaning up...

and run

lookup hello

Traceback (most recent call last):
File "/usr/local/bin/lookup", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests

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.