Skip to main content

Search Den Danske Ordbog (ordnet.dk) from the terminal!

Project description

Den Danske Ordbog CLI

A command-line interface (CLI) tool for looking up words in Den Danske Ordbog (ddo). It fetches definitions, etymologies, inflections, synonyms, and more. This tool is not affiliated with Det Danske Sprog- og Litteraturselskab.

Also, the code is mainly written by LLMs.


Features

  • Word lookup with full dictionary entries
  • Definitions, styles, and usage examples
  • Inflections and etymology information
  • Phonetic transcriptions when available
  • Synonyms and related words
  • Shell autocomplete support for word suggestions
  • Nicely formatted output with Rich

Installation and usage

The package is available on PyPI. The recommended way to install it is with uv:

uv tool install ddo
ddo eksorbitant

Autocomplete

The CLI supports autocomplete using DDO’s livesearch API. To enable it, you need to configure your shell for Click’s completion:

  1. Enable completion for your shell (bash, zsh, or fish) using:

    _DDO_COMPLETE=bash_source ddo > ~/.ddo-complete.sh
    echo 'source ~/.ddo-complete.sh' >> ~/.bashrc
    

    (replace bash_source with zsh_source or fish_source depending on your shell)

  2. Restart your shell or re-source your configuration file.

Once enabled, pressing Tab while typing a word will fetch suggestions from the dictionary’s autocomplete service.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ddo-1.0.1.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ddo-1.0.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file ddo-1.0.1.tar.gz.

File metadata

  • Download URL: ddo-1.0.1.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for ddo-1.0.1.tar.gz
Algorithm Hash digest
SHA256 eaa5184977712f6073969a742ed31a1d7e6e41ad16b6be0ba208ced3276bec1e
MD5 ecc3011703a8c2d1807ab7b07e707f3a
BLAKE2b-256 00748d3a79c62152e66489cdf17076a82cf857b1214e1f4e65106683bb38b500

See more details on using hashes here.

File details

Details for the file ddo-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ddo-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for ddo-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38c0cea0f9aef51c1a8cd8b9dab24ae24d8853d6b98250d5c85009a38feb12ce
MD5 ed6e27b04a30256b53cf5f8ea82ddcac
BLAKE2b-256 2d1b0f4762a933395008345119904c111ea1c65e057e8f06ba50e5814007792e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page