Skip to content
/ dictcc Public
forked from randomn4me/dictcc

Console and python module for dictcc

License

Notifications You must be signed in to change notification settings

abzicht/dictcc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dict.cc commandline tool

This tool enables the use of dict.cc over the command line.

About this Fork

With this fork, the original script has become a Python module. Functionality is moved to a Dictcc class and system installation is now possible. Also, the word suggestions functionality was improved. Main focus lies on the console, which uses a continuous requests session to speed up the process. This latter functionality was also merged to the original code base.

Install

Install dictcc on your system via

python3 setup.py install

Usage

When installed, the tool can be used:

dictcc <word>

Enter an interactive cli mode by passing no argument or the -c flag:

dictcc -c

Languages

Available languages: de (prim), en (prim), bg, bs, cs, da, el, eo, es, fi, fr, hr, hu, is, it, la, nl, no, pl, pt, ro, ru, sk, sq, sr, sv, tr.

Choose between languages with the flags -p (primary language) and -s (secondary language).

Module

Import the dictcc module into your project:

>>> import dictcc
>>> result1, suggestions1 = dictcc.translate('tree', 'en', 'de')
>>> print("Results:", result1)
Results: [['tree [attr.]', 'Baum-'], ... ]

>>> result2, suggestions2 = dictcc.translate('dreiekig', 'en', 'de')
>>> print("Suggestions:", suggestions2)
Suggestions: ['dreieckig']

Requirements

This tool requires tabulate and BeautifulSoup. Both dependencies are installed automatically when running python3 setup.py install.

Alternatively, run:

pip install tabulate bs4

About

Console and python module for dictcc

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%