• Stars
    star
    115
  • Rank 304,100 (Top 7 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLI tool to find synonyms in 15 different languages.

synonym

Find synonyms in 15 different languages directly from your terminal.


Synonym is a small utility tool to find synonyms directly from the command line.
It is using the thesaurus.altervista.org API to query for words.

List of supported languages:

en, fr, cs, el, es, da, de, hu, it, no, pl, pt, ro, ru, sk

synonym

What do you need?

API key

You will need to generate an API key to use this script, you can do so at https://thesaurus.altervista.org/mykey
You can sign in with either Facebook or Google.
After the sign in process you will be redirected to your API key.
Then, store your API key in your .synonymrc file.

Installation

Using Homebrew

brew tap smallwat3r/scripts \
  && brew install synonym

Manual install

To run synonym you will need to install jq

brew install jq          # macos
sudo apt-get install jq  # debian / ubuntu

then

git clone https://github.com/smallwat3r/synonym.git \
  && cd synonym && sudo make install

or (without cloning)

sudo wget https://raw.githubusercontent.com/smallwat3r/synonym/master/synonym \
    -P /usr/local/bin && sudo chmod 755 /usr/local/bin/synonym

Configuration file

You will need to create a .synonymrc config file in one of the locations below.

# Possible config file locations (by order of priority)

$XDG_CONFIG_HOME/.synonymrc
~/.config/.synonymrc
~/.synonymrc

In this file, you need to input your API key, and you can choose a default language.

# .synonymrc example

# API KEY https://thesaurus.altervista.org/mykey
SYNONYM_THESAURUS_KEY=<API KEY>

# Default language
# List of languages supported:
#   en, fr, cs, el, es, da, de, hu,
#   it, no, pl, pt, ro, ru, sk
SYNONYM_SEARCH_LANG=en

Note: if no language is set in .synonymrc, or specified in the parameters, the default language will be fetched from the current OS ($LANGUAGE or $LANG). If not supported by the API, or null, it will be set as default to en_US.

You are now all set to run synonym in your terminal.

How to use it?

$ synonym -h
Usage: synonym [OPTION] WORD

Finds synonyms for a given word in a specified language.
Run synonym -i for more information.

Options:
  -l LANG      Finds all synonyms for this specific language.
               Languages supported: en, fr, cs, el, es, da, de,
               hu, it, no, pl, pt, ro, ru, sk
  -h           Show help message and exit.
  -i           Show more help information and exit.
  -v           Show program version number and exit.

Examples

$ synonym happy
blessed         cheerful        elated          felicitous      glad            joyful          prosperous      well-chosen
blissful        content         euphoric        fortunate       golden          joyous          riant           willing 
bright          contented       felicitous      glad            halcyon         laughing        unhappy 

$ synonym -l fr joyeux
agréable        badin           content         éclatant        étincelant      hilarant        plaisant        ravi            rieur
aise            beau            désopilant      enchanté        fun             joie            plaisir         rayonnant       satisfait
allègre         brillant        distrayant      enjoué          gai             jovial          radiant         réjoui          spirituel
amusant         comblé          divertissant    ensoleillé      guilleret       jubilant        radieux         réjouissant
amusement       comique         drôle           épanoui         heureux         lumineux        rassasié        riant

$ synonym -l it allegro 
beato           felice          gaudioso        giocoso         gioviale        lieto
contento        gaio            giocondo        gioioso         ilare           raggiante

More Repositories

1

shhh

Share sensitive info without leaving a trace in your chat logs or email accounts.
Python
370
star
2

docker-nginx-gunicorn-flask-letsencrypt

Boilerplate code for setting up Nginx + Gunicorn + Flask + automated LetsEncrypt certificates (https) using docker-compose.
Dockerfile
178
star
3

tubestatus

London Tube live service status from the terminal.
Shell
36
star
4

droid-sans-mono-sw

Customised version of the Droid Sans Mono font.
33
star
5

vim-mono-sw

A simple grayscale vim color scheme with a little touch of red
Vim Script
9
star
6

jailed-sftp-users

Jailed SFTP user management scripts.
Shell
9
star
7

dotfiles

My dotfiles
Emacs Lisp
9
star
8

vim-efficient

Minimal grayscale monochrome-ish vim color scheme.
Vim Script
9
star
9

sketch

Draft files on the go from your terminal in your favourite text editor.
Shell
6
star
10

emacs-simplicity-theme

Minimalist dark theme for Emacs.
Emacs Lisp
6
star
11

shopify-webhook-receiver

Flask app to catch Shopify webhooks and trigger actions.
Python
5
star
12

untappd.el

Display your latest Untappd feed in Emacs 🍻
Emacs Lisp
4
star
13

vim-simplicity

Extremely minimal vim colorscheme.
Vim Script
4
star
14

tubestatus.el

London Tube live service status from Emacs.
Emacs Lisp
3
star
15

shopify-webhook-router

Boilerplate code to process Shopify webhooks with Flask and Celery
Python
3
star
16

github-antibot

Block Github users using bots to mass-follow me.
Python
3
star
17

shhh-cli

Golang CLI to interact with Shhh
Go
2
star
18

sweep-cat

A 30 keys keyboard based on the Ferris Sweep 2.2, featuring the purr-fect code reviewer.
2
star
19

pyavatar

Generate default user avatars from a given string input
Python
2
star
20

homebrew-scripts

Personal Homebrew tap 🚰
Ruby
1
star