Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/PlankCipher/et

A CLI/rofi/dmenu script with various features to aid you with English (spellchecking, definitions, synonyms, antonyms, abbreviations, and pronunciation)
https://github.com/PlankCipher/et

define dmenu dmenu-scripts english english-language rofi rofi-scripts spellcheck

Last synced: 3 months ago
JSON representation

A CLI/rofi/dmenu script with various features to aid you with English (spellchecking, definitions, synonyms, antonyms, abbreviations, and pronunciation)

Awesome Lists containing this project

README

        


et


Buy Me a Coffee at ko-fi.com




A CLI/rofi/dmenu script with features to aid you with English.

## Preview

### rofi_et

![rofi_et](./assets/rofi_et.gif)

### dmenu_et

![dmenu_et](./assets/dmenu_et.gif)

## Features

- [x] Spellcheck and suggestions (offline, based on a wordlist)
- [x] Define (online, based on [wordnik.com](https://wordnik.com))
- [x] Synonyms (online, based on [bighugelabs.com](https://bighugelabs.com))
- [x] Antonyms (online, based on [bighugelabs.com](https://bighugelabs.com))
- [x] Abbreviations (online, based on [abbreviations.com](https://abbreviations.com))
- [x] Pronunciation (online, based on [wordnik.com](https://wordnik.com) and [dictionaryapi.dev](https://dictionaryapi.dev))

## Dependencies

> The installation script won't install the dependencies for you because I don't know the package names on distros other than Arch

- `rofi` or `dmenu`
- `xclip` from the `xclip` package (X) or `wl-copy` from the `wl-clipboard` (Wayland) package on Arch => to copy selected spelling suggestion to clipboard
- `notify-send` from `libnotify` package on Arch => to notify you on copying a spelling suggestion to clipboard
- `agrep` from `tre` package on Arch => to do fuzzy searching in the wordlist to get spelling suggestions
- `sox` from `sox` package on Arch => to play pronunciation

## Installation

1. clone this repo => `git clone https://github.com/PlankCipher/et.git`
2. cd into the cloned repo directory
3. run `install.sh` => `./install.sh`
4. Voila 🎉

> You will be asked to enter your password for sudo to move the executables to `/sbin/` so that they're accessible from anywhere

## Included

- et (simple underlying cli tool, run `et -h` for help)
- rofi_et (a rofi menu for et, run `rofi_et` then `help` for help)
- rofi_et_mode (a rofi custom mode for et, run `rofi -modes 'et:rofi_et_mode,drun,window' -show et` then `help` for help)
- dmenu_et (a dmenu script for et, run `dmenu_et` and then `help` for help)

## Usage

### et

```man
Usage: et OPTION...

Options:
-abr, --abbreviations
Print what might stand for from abbreviations.com.

-ant, --antonyms
Print antonyms for from bighugelabs.com.

-def, --define
Print definitions for from wordnik.com if correctly spelled, otherwise print spell suggestions.

-pro, --pronounce
Play pronunciation of .

Defaults to American English pronunciation (listed as macmillan in sources list) from wordnik.com (which in turn depends on macmillandictionary). Other pronunciation sources/accents (from dictionaryapi.dev) can be listed with -lst|--list-sources and specified with -src|--source (must come after -pro|--pronounce).

-lst, --list-sources
List available pronunciation sources/accents for .

-src, --source
Specify the to use for pronunciation. This option must come after -pro|--pronounce.

-spl, --spell
Print spell suggestions for from wordlist if not spelled correctly (exits with 1 as exit code), otherwise print a message indicating that is spelled correctly.

-syn, --synonyms
Print synonyms for from bighugelabs.com.

-h, --help
Print this help message and exit
```

### rofi_et, rofi_et_mode, or dmenu_et

![usage](./assets/usage.png)

## Credits

- I got `words_alpha` wordlist from [this](https://github.com/dwyl/english-words) repo.
- [wordnik.com](https://www.wordnik.com) is used to get definitions and pronunciations.
- [abbreviations.com](https://www.abbreviations.com) is used to get what abbreviations stand for.
- [bighugelabs.com](https://words.bighugelabs.com) is used to get synonyms and antonyms.
- [dictionaryapi.dev](https://dictionaryapi.dev) is used to get pronunciations.

## Contributions

Contributions are very welcome.