Skip to main content

Command line interface for Folkets lexikon, the Swedish-English dictionary

Project description

swe - Swedish-English Dictionary

swe is a command-line interface to the great Swedish-English dictionary "Folkets lexikon". It works 100% offline. Users can explore translations, idioms, synonyms and more. It can also be used for finding words containing specific substrings, and for listening to the pronunciations of words. Since version 0.3, it can also access Wiktionary.

https://github.com/user-attachments/assets/097a29ee-c829-4f6a-acd7-a83e93ee742d

Installation

You can run swe using uvx swe, or install it using uv tool install swe or pipx install swe

Configuration

The interactive mode can take a few settings from at $XDG_CONFIG_HOME/swe.toml:

custom_command = '/home/user/.scripts/swe-favorite' # this will introduce a new button
custom_command_title = 'Save' # this will be the button label
theme = 'dracula' # specify a theme
auto_run_custom_command = false # this command will run automatically for every word

Swe will pipe the current word through STDIN to the commands you specify. You can check out some Textual themes here.

Zsh Completion

The repository includes a Zsh completion file _swe to enhance the user experience by enabling word auto-completion.

To enable Zsh completion, do the following:

cp swe/_swe ~/.zsh/completion/_swe
chmod +x ~/.zsh/completion/_swe

You will need to restart Zsh for the changes to take effect.

Usage

  1. swe - Enter interactive mode
  2. swe ord - Print the translation for the specified word
  3. swe -s ord - Print all words containing the specified substring ("ord" in this example).

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

swe-0.5.4.tar.gz (93.1 kB view details)

Uploaded Source

Built Distribution

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

swe-0.5.4-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file swe-0.5.4.tar.gz.

File metadata

  • Download URL: swe-0.5.4.tar.gz
  • Upload date:
  • Size: 93.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for swe-0.5.4.tar.gz
Algorithm Hash digest
SHA256 77fdb4f30b8604262290e25de3196043733e48d343779780c10e4acde15a7ee7
MD5 45ee552ade06b5740f07b17b405d3298
BLAKE2b-256 886838ac0a6cf0f2094063b2edbe8c51fcead76603cb1028f2fce9cb24b95c2e

See more details on using hashes here.

File details

Details for the file swe-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: swe-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.20

File hashes

Hashes for swe-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6860de2e637b7d6083f30a238d3018d78257d7596a188d9dbdf5770acad19cf9
MD5 5001a9a77b0dd18892b50d8408815426
BLAKE2b-256 2299b6a3200e7e0b1135b57e0fadccabf21cad53a507d13e32f16933dc1bab74

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