All Projects â†’ rbaron â†’ Dict.cc.py

rbaron / Dict.cc.py

📘 Unofficial command line client for dict.cc

Programming Languages

python
139335 projects - #7 most used programming language

dict.cc.py

dict.cc.py usage

Simple unofficial command line interface for dict.cc written in Python. It supports translations between the most common languages available on the website.

Installation

dict.cc.py works with Python 2 and Python 3 and is available on PyPi. All you have to do to install it is:

pip install dict.cc.py

Usage

It's super easy! Here's a quick example of using it to translate the word beer between english (en) and swedish (sv):

$ dict.cc.py en sv beer
Showing 2 of 2 result(s)

English                                                     Swedish
========                                                    =======
beer ...................................................... öl
beer glass ................................................ ölglas

You can also search for phrases by using quotation marks:

% dict.cc.py en de body
Showing 10 of 49 result(s)

Englisch                                                    Deutsch
=========                                                   =======
body ...................................................... Körper-
a'body [Scot.] [allbody] .................................. jedermann
body [also wine] .......................................... Körper [auch bei Wein]
body ...................................................... Leib
body [dead body ] ......................................... Leiche
body ...................................................... Karosserie
body [trunk] .............................................. Rumpf
body [main part] .......................................... Hauptteil
body ...................................................... Gehäuse
body ...................................................... Körperschaft
body [society, organisation for sth.] ..................... Gesellschaft [Organisation]

Available languages include: en, de, sv, pt, it, fr, ro, nl.

Usage as Code

>>> from dictcc import Dict
>>> translator = Dict()
>>> result = translator.translate("hello", from_language="en", to_language="de")
>>> result.translation_tuples[:2]
[('Hello !', 'Hallo!'), ('Hello !', 'Servus! [bayer.] [österr.]')]

License

Public domain.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].