Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/quietpigeon/thesaurust

A terminal-based dictionary app.
https://github.com/quietpigeon/thesaurust

cli ratatui rust terminal terminal-based tui

Last synced: 2 months ago
JSON representation

A terminal-based dictionary app.

Awesome Lists containing this project

README

        

Table of Contents

- [thesaurust](#thesaurust)
- [Installation](#installation)
- [Installation (with spellchecking)](#installation-with-spellchecking)
- [Prerequisites](#prerequisites)
- [Enabling spellchecking](#enabling-spellchecking)
- [Usage](#usage)
- [Roadmap](#roadmap)

# thesaurust
A simple dictionary application built within the terminal, written in Rust.
![Demo](docs/demo.gif)
## How it works
The data is fetched from the API provided by https://dictionaryapi.dev/. Since words can contain more than one meanings, the user can toggle between different meanings based on the parts of speech the word has.
## Installation
You need to install [Rust](https://www.rust-lang.org/tools/install) before you can proceed.


Clone this repository:
```zsh
git clone https://github.com/QuietPigeon2001/thesaurust
```
Navigate to the repository and run the following commands:
```zsh
cargo install --path .
thesaurust
```
## Installation (with spellchecking)
![Demo](docs/spellcheck_demo.gif)
### Prerequisites
You need to have an API key from [SerpApi](https://serpapi.com/) before you can enable this feature. It is free of charge with a limited number of usage.


Go to [api_key.rs](src/api_key.rs) and enter your API key:
```zsh
pub const API_KEY: &str = "YOUR_API_KEY";
```
Then, you can proceed to [installation](#installation).
### Enabling spellchecking
To enable spellchecking in the app, press : after launching the app. At the footer, you will see something like
```zsh
Spelling suggestion: false
```
Toggle to `Spelling suggestion` to `true` with l or h, then press q to exit.
## Usage
* /: Insert the word you would like to look up.
* Enter: Search.
* j, k: Select the part of speech and press Enter.
* l, h: Toggle between multiple definitions.
* q: Exit the app.
## Roadmap
- [x] Show an example with the definition (if available)
- [x] Toggle between parts of speech
- [x] Toggle between definitions with the same part of speech
- [x] Use a spellchecking API to suggest correct spelling for words
- [x] Show synonyms