Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilius/ayandict
AyanDict - a simple multi-lingual cross-platform offline dictionary based on Qt and written in Go
https://github.com/ilius/ayandict
desktop dictionary dictionary-application qt stardict
Last synced: 3 months ago
JSON representation
AyanDict - a simple multi-lingual cross-platform offline dictionary based on Qt and written in Go
- Host: GitHub
- URL: https://github.com/ilius/ayandict
- Owner: ilius
- License: agpl-3.0
- Created: 2023-03-20T00:51:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T22:03:00.000Z (3 months ago)
- Last Synced: 2024-10-24T10:32:58.605Z (3 months ago)
- Topics: desktop, dictionary, dictionary-application, qt, stardict
- Language: Go
- Homepage:
- Size: 2.18 MB
- Stars: 30
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AyanDict
A simple cross-platform desktop dictionary application based on Qt framework and written in Go that uses StarDict dictionary format.
It is designed for desktop and it should run on every desktop operating system that Qt supports. It is tested on Linux and Windows, and it should run perfectly on Mac, FreeBSD and other modern Unix-like systems. I will upload binaries for Linux, Windows and Mac (and maybe FreeBSD).
StarDict is the only supported format for now, and by default, it reads all StarDict dictionaries in `~/.stardict/dic` folder. But you can change the folder or add more folders through [configuration](#configuration).
# Installation
If you don't have Go language on your system, you can check [Releases](https://github.com/ilius/ayandict/releases) and download the latest binary for your platform if available.
If you have Go, you can compile and install the latest code with
```sh
go install github.com/ilius/ayandict/v2@latest
```Or clone the repository, `cd` to it and run `go build`, which will create the binary (`ayandict.exe` or `ayandict`) in this directory.
It's good to know that the binary / executable file is completely portable, so you can copy it anywhere you want and run it from there (although on Unix the storage must support executable files).
# Screenshots
Linux - light style (default)
______________________________________________________________________
Linux - dark style ([Breeze](https://github.com/Alexhuszagh/BreezeStyleSheets)) + Favorites
______________________________________________________________________
Windows - light style (default)
______________________________________________________________________
Windows - dark style ([Breeze](https://github.com/Alexhuszagh/BreezeStyleSheets))
______________________________________________________________________
Most Frequent queries
______________________________________________________________________
Dictionaries dialog
______________________________________________________________________
Misc tab
______________________________________________________________________
# Configuration
To change configuration (which includes most user settings), you have to edit the config file (we do not have GUI for it, and no plan to add it, sorry!).
After you run the program, you can click on "Config" button (as seen in screenshots) and it will open the `config.toml` file in your default text editor (for TOML files).
If `config.toml` does not exist, it will be created and filled with default config.
After you modify `config.toml`, you can click on "Reload" button (next to "Config" button) and it will apply the changes.
The full path for `config.toml` file:
- Linux: `~/.config/ayandict/config.toml`
- If `$XDG_CONFIG_HOME` is set: `$XDG_CONFIG_HOME/ayandict/config.toml`
- Windows: `C:\Users\USERNAME\AppData\Roaming\AyanDict\config.toml`
- More accurately: `%APPDATA%\AyanDict\config.toml`
- Mac: `~/Library/Preferences/AyanDict/config.toml`
Here is a [list of all config parameters](./doc/config.rst).
# Dictionaries
As you see in screenshots, there is a button called "Dicts" or "Dictionaries". It opens a dialog and lets you disable, enable and change order of dictionaries.
Each dictionary has a "Symbol" which by default is the first letter of its name in curly brackets (for example `[W]` for WordNet). This symbol is shown in the list of results that is in the left side of window, as seen in screenshots. It is meant to show you which dictionary it comes from at first glance. You can change this symbol through "Dictionaries" dialog. Symbol can be empty, or be as long as you want (though it is 3 characters by default).
# Convert other Dictionary formats
You can use [PyGlossary](https://github.com/ilius/pyglossary) to convert various other formats to StarDict format and use them for this application. A [list of supported formats](https://github.com/ilius/pyglossary#supported-formats) is provided, and if you click on each format's link, it will lead you to more information about it.
# Download Dictionaries
There are tons of web pages that let you download various usable dictionaries, but here is a list I collected (feel free to open a pull request for more):
- [kaikki.org](https://kaikki.org/dictionary/index.html)
- [library.kiwix.org](https://library.kiwix.org/)
- [freedict.org](https://freedict.org/downloads/) and [@freedict/fd-dictionaries](https://github.com/freedict/fd-dictionaries)
- [@itkach/slob/wiki/Dictionaries](https://github.com/itkach/slob/wiki/Dictionaries)
- [goldendict.org](http://goldendict.org/dictionaries.php)
- [huzheng.org](http://www.huzheng.org/stardict/)
- My repositories: [@ilius/dict](https://github.com/ilius/dict) and [Persian Aryanpour in FreeDict](https://github.com/ilius/aryanpour-tei)
- [tuxor1337.frama.io](https://tuxor1337.frama.io/firedict/dictionaries.html)
- [XDXF on SourceForge](https://sourceforge.net/projects/xdxf/files/)
- [GoldenDict on SourceForge](https://sourceforge.net/projects/goldendict/files/dictionaries/)
- [kdr2.com](https://kdr2.com/resource/stardict.html)
- [BGL file collection on GDrive](https://drive.google.com/drive/mobile/folders/0BzrQwK2v03aKWjlsQ3NsaWJKalU?resourcekey=0-DtgqOJiVFSDI231ugoQgiQ)
- [BGL files for Arabic](https://www.ahmadwadan.com/download.html)# Keyboard bindings/shortcuts
- **Escape**: clear the input query and results
- **Space**: (while query entry is not focused) change keyboard focus to query entry
- **`+`** or **`=`**: Zoom in (article/definition/translation)
- **`-`**: Zoom out (article/definition/translation)# Search Algorithm
The default search is fuzzy, and it is based on similarity scores that are calculated from [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance). We also split entry terms into words, for example if you type "language" (or with with a few misspelled letters, like "languge"), it first shows "language", and then terms like "language learning", but may also show terms like "sign language".
If you specifically want terms with "language" as the second word, you can type "\* language". We do not support pattern matching (yet), and you can only use `*` alone (not as part of a pattern).
Anything with at least %70 similarity score is listed (for example "languge" is %87 similar to "language"). But we have a limit of how many results are displayed, and by default it's 40 results. You can change this with config parameter [`max_results_total`](./doc/config.rst#max_results_total).
This works pretty well in most cases, but the only catch is that first letter of your query must match the first letter of one of your target words. For example if you type "symmetry", it will not match term "asymmetry" even though they are close enough (high similarity score), because their first letter is different.
But we also have 3 other search modes added in v2.0.0:
- Start with, shows all terms that start with given string
- Regex (regular expression), for example `.*symm.*`
- Glob, for example `*symm*`