Crates.io | dictcc-cli |
lib.rs | dictcc-cli |
version | 0.2.0 |
source | src |
created_at | 2018-01-09 21:58:28.312029 |
updated_at | 2018-01-14 05:28:41.096942 |
description | A command line application for translating between languages using dict.cc's database. |
homepage | https://github.com/d-e-s-o/dictcc-cli |
repository | https://github.com/d-e-s-o/dictcc-cli.git |
max_upload_size | |
id | 46173 |
size | 16,492,853 |
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]).
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.]
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
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.