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
swe- Enter interactive modeswe ord- Print the translation for the specified wordswe -s ord- Print all words containing the specified substring ("ord" in this example).
Metadata
Release files for swe 0.5.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swe-0.5.6.tar.gz | 92.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swe-0.5.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 113.7 kB
Release files / swe-0.5.6.tar.gz
| Download URL | swe-0.5.6.tar.gz |
|---|---|
| Size | 92.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ebc5e994e661505e00e6a3dc91a78b788b95284d12049512e6d3a99461edb68
|
|
BLAKE2b-256 checksum How to use checksums |
e7c369e8e94cf1beef43eaed62d04bd3e6cf4a1b1301b1032f6e7482da10b18f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / swe-0.5.6-py3-none-any.whl
| Download URL | swe-0.5.6-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90b5bc5415fcdfaa9c067acab5f756b0ca6d3aef1b6437be95fb16094be75279
|
|
BLAKE2b-256 checksum How to use checksums |
62c9cf8514efe85c8f29d89579ae50aad8d25efe2fbc7e34c88ac39362cf80f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|