Skip to main content

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] [-s] [-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
  -s, --similar         show similar words
  -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

Metadata

Release files for leo-cli 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leo-cli 0.4.0
File Size Uploaded Provenance
leo-cli-0.4.0.tar.gz 7.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for leo-cli 0.4.0
File Interpreter ABI Platform
leo_cli-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / leo-cli-0.4.0.tar.gz

Download URL leo-cli-0.4.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b2aba865d8ae739353559e8b1bd6e6feff88f0d3f6cf60dd7747bb21831e10ff
BLAKE2b-256 checksum
How to use checksums
bb0265e3a2bad4bf00a41f11ed3d4a2a8ff831cab9c39d3a7a8f15489e46a3b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / leo_cli-0.4.0-py3-none-any.whl

Download URL leo_cli-0.4.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63f7e396653e28ab236445f456c632be3836519f3537b10f3e0879dec2b7cf24
BLAKE2b-256 checksum
How to use checksums
02d1979bcf14e0e8aaf61cdae1692f0f544f981e635d6a286bf528fd6d5202e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Security for leo-cli 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page