Skip to content

digitalprk/dicrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dic.rs

A simple dictionary application written in Rust


Overview

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.

Usage

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

Dictionaries are SQLite database files with the .db extension. Dictionaries contain two tables

  1. A name table with a single dicname text column whose first entry contains the name of the dictionary (currently not used)
  2. A dictionary table with two text columns word and definition. The word column contains words from which the index will be built. The definition 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:

Controls

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

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.

About

A simple dictionary application written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages