A simple dictionary application written in Rust
Dic.rs is a simple TUI developed in Rust with tui-rs to browse dictionaries obtained as part of this project. Dictionaries are stored as SQLite databases in the dics/
folder. See below, Dictionaries to download dictionaries.
Clone the repository, create a dics/
folder inside of it. Copy dictionary files into the dics/
folder, then run
cargo run dicrs
The application will only run on GNU/Linux. The application will panic if no dictionaries are available under dics/
.
Dictionaries are SQLite database files with the .db extension. Dictionaries contain two tables
- A
name
table with a singledicname
text column whose first entry contains the name of the dictionary (currently not used) - A
dictionary
table with two text columnsword
anddefinition
. Theword
column contains words from which the index will be built. Thedefinition
columns contains the corresponding definition(s).
The dictionaries are stored in the dics/
folder. The name of the dictionary's file will be the name displayed in the app. To rename or remove a dictionary, simply rename or remove the corresponding file.
Dictionaries available for the project:
- The GNU Collaborative International Dictionary of English, available under the terms of the GNU General Public License
- North Korean monolingual reference dictionary
- North Korean technoscientific dictionary (비약과학기술용어사전)
- North Korean - English dictionary (영조사전)
- North Korean - Chinese dictionary (중조사전)
- North Korean - French dictionary (불조사전)
- North Korean - Japanese dictionary (일조사전)
- North Korean - German dictionary (독조사전)
- North Korean - Russian dictionary (로조사전)
Shortcut | Action |
---|---|
Ctrl + C |
Close the app |
Ctrl + Y |
Copy a definition to the clipboard |
Up / Down |
Move one word up/down in the index |
PgUp / PgDn |
Move ten words up/down in the index |
Left / Right |
Move one dictionary up or down |
Mouse control (scrollwheel, click) is available to browse through the index
Search is case-insensitive. The SQL wildcard %
is applied by default at the end of every word searched.
No filtering is applied to the text input, so any SQL wildcard (and injection) can currently be used directly from the dictionary's search box. In case of multiple results, only the first result will be used.