Skip to content

abbyslab/define-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

define-cli

CLI vocabulary lookup for language learners. Fetches definitions, IPA pronunciation, and real usage examples.

Install

pipx install git+https://github.com/abbyslab/define-cli

Usage

define fr bonjour          			# IPA + definitions + 5 examples
define nl ingewikkeld
define fr bonjour -e       			# full examples dump
define fr bonjour --no-examples   	# definitions only
define fr bonjour --no-defs      	# examples only
define --langs              		# list all supported languages and their codes
define --shell fr 					# interactive shell mode for French

Keeping up to date

The tool scrapes live websites which change their structure occasionally. If output looks wrong or empty, reinstall to get the latest fixes:

pipx reinstall define-cli

Supported languages

Code Language
ar Arabic
ca Catalan
zh Chinese
cs Czech
da Danish
nl Dutch
fr French
de German
el Greek
he Hebrew
hi Hindi
hu Hungarian
it Italian
ja Japanese
ko Korean
fa Persian
pl Polish
pt Portuguese
ro Romanian
ru Russian
sk Slovak
es Spanish
sv Swedish
th Thai
tr Turkish
uk Ukrainian
vi Vietnamese

Sources

  • English Wiktionary — IPA, part of speech, definitions
  • Reverso Context — real-world usage examples with translations
  • Tatoeba — fallback examples for languages not supported by Reverso

Development

git clone git@github.com:abbyslab/define-cli
cd define-cli
make setup

Run the tool locally:

./define fr bonjour
./define --langs

Run tests:

make test		# unit tests (no network)
make live 		# live tests against real sites (network required)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages