Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Linguee CLI

A python script that expects a query, a source and a target language, then sends an appropriate query to Linguee.com, parses the HTML response, and prints a condensed version of said response. I use this in tandem with xsel to quickly translate selected text and show the translation as a desktop notification.

Usage

python main.py "get excited" EN DE

Empty, non-alphabetic or overlong queries (with more than 3 words and/or 50 characters) as well as unknown language codes will result in an error and not send a request to Linguee (cf. _validate_arguments). To further reduce traffic the script keeps a history of past queries and their translations via a hidden .lingue_cli.csv file in the home directory.

Requirements (Non-Standard Python Libraries)

  • requests
  • BeautifulSoup

Terms and Conditions

If you use this script, make sure you comply with the Linguee Terms and Conditions and especially this clause:

Both private and business usage of linguee.com services is free of charge. It is however strictly prohibited to forward on our services to third parties against payment.

About

A command line interface for looking up translations on Linguee.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages