Giter VIP home page Giter VIP logo

leo-cli's Introduction

#leo-cli

leo-cli is a command line tool which can be used to translate words or phrases from several languages to german. It uses the open dictionary dict.leo.org. I wrote this because visiting their website, choosing the language, typing the word and clicking the submit button required several too many steps. I am a lazy person.

##Installation

This tool requires beatiful soup, the wonderful requests library and the tabulate library.

###install leo-cli pip install leo-cli

###update There has been a layout change on leo.org so you might have to pip install leo-cli --upgrade

##usage:

leo -h
usage: leo [-h] [-l {en,pt,fr,de,es,ru}] [-i] [-p {all,n,v,adj}] [-d] [-v]
           words [words ...]
Retrieve word information via the Leo website
positional arguments:
  words                 the words to look up on the LEO website
optional arguments:
  -h, --help            show this help message and exit
  -l {en,pt,fr,de,es,ru}, --lang {en,pt,fr,de,es,ru}
                        source language, 2 chars (e.g. 'en')
  -i, --inflect         print inflection tables for all homonyms
  -p {all,n,v,adj}, --pos {all,n,v,adj}
                        Part of speech of words to translate/inflect.
  -d, --define          print dictionary definitions. True by default if -i is
                        not specified.
  -v, --verbose         Print debug messages

###Examples

leo example
leo another example
leo "hang out"
leo -l fr bonne gout
leo -l ru книга
leo -l pt ação
leo -i reden
leo ii -p n reden

TODO

  • print non-German plurals
  • allow specifying target and source languages separately
  • (maybe) don't print conjugation labels in translation header for conjugations
  • alternative conjugations with labels for usage (hängen)
  • label haupt/nebensätzlich sections for verbs

leo-cli's People

Contributors

joidegn avatar garfieldnate avatar neingeist avatar tbarabosch avatar blueyed avatar hbschr avatar swerter avatar

Watchers

James Cloos 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.