dictcc-cli

Crates.iodictcc-cli
lib.rsdictcc-cli
version0.2.0
sourcesrc
created_at2018-01-09 21:58:28.312029
updated_at2018-01-14 05:28:41.096942
descriptionA command line application for translating between languages using dict.cc's database.
homepagehttps://github.com/d-e-s-o/dictcc-cli
repositoryhttps://github.com/d-e-s-o/dictcc-cli.git
max_upload_size
id46173
size16,492,853
Daniel Müller (d-e-s-o)

documentation

README

dictcc-cli

Purpose

dictcc-cli is a command line interface to dict.cc. As such, it provides the capability to translate words and phrases between languages. However, instead of interacting with the online service it relies on its database for the translation. This database has to be retrieved manually (see [Database]).

Usage

Being intended to be simple and fast to use, translating a term using dictcc-cli is as simple as providing it as an argument to the program:

$ dictcc-cli dictcc-lp1.db durchgeknallt
> durchgeknallt [ugs.] (adj): crazed
> durchgeknallt [ugs.] (adj): cuckoo [coll.]
> durchgeknallt [ugs.] (adj adv): loopy [coll.]

Note that the source an destination languages depends on the database being used. In the example above the German database maps from German to English and so this is the default direction of translation.

To translate the other way, the -r/--reverse option can be used:

$ dictcc-cli dictcc-lp1.db --reverse dorky
> dorky [coll.] (adj): bekloppt [ugs.]
> dorky [coll.] (adj): idiotisch
> dorky [coll.] (adj): deppert [österr.] [südd.]

Installation

From Source

In order to compile the program the sqlite crate needs to be available which allows access to the dict.cc database. This crate and its dependencies are contained in the form of subrepos in compatible and tested versions. Cargo is required to build the program.

The build is as simple as running:

$ cargo build --release

Language Database

The database containing the translations has to be retrieved separately as there are various languages and sizes available. One possible way is to install the dict.cc app on an Android phone, install the desired language pack, and then copy the file cc.dict.dictcc/dictcc-lp1.db to the device running dictcc-cli.

Commit count: 26

cargo fmt