Skip to main content

Synonyms and antonyms of words from Thesaurus are now in your terminal, with rich output.

Project description

screenshot

GitHub release (latest by date) PyPI

synonym-cli

Synonyms and antonyms of words from Thesaurus.com and other sources are now in your terminal, with rich output.

Install:

pip install synonym-cli

Usage:

syn <word>
$ syn nominate
┌──────────────────────────────────────────────────────────────────────────────────┐
│ ❯ designate, select (verb)                                                       │
├──────────────────────────────────────────────────────────────────────────────────┤
│ 🔵synonyms: appoint, assign, choose, decide, draft, elect, elevate, name,        │
│ present, propose, recommend, submit, suggest, tap, call, commission, denominate, │
│ empower, intend, make, mean, offer, proffer, purpose, slate, slot, specify,      │
│ tender, term, cognominate, put down for, put up, tab                             │
│                                                                                  │
│ 🟤antonyms: condemn, dissuade, ignore, refuse, reject, deny, discourage, stop,   │
│ take back, pass over                                                             │
└──────────────────────────────────────────────────────────────────────────────────┘

Different Languages --lang, -l

Multi-language support with Thesaurus AlterVista. API key is required, if you don't have any apikey yet, get a free key from, thesaurus.altervista.org/openapi.

$ syn -l es expresión
╭─┬──────────────────────────────────┬─┬──────────────────────────────────╮
│-│elocución, dicción, estilo        │-│exteriorización, manifestación,   │
│ │                                  │ │revelación, comunicación          │
│-│gesto, rostro, cara, semblante,   │-│locución, frase, dicho, giro      │
│ │aire, aspecto                     │ │                                  │
╰─┴──────────────────────────────────┴─┴──────────────────────────────────╯

$ syn -l ru фраза
╭─────────┬────────────────────────────────────────┬────────────────┬─────╮
│(синоним)│речь, слово, предложение, спич, тост,   │(сходный термин)│слово│
│         │здравица, аллокуция, диатриба, рацея,   │                │     │
│         │тирада, филиппика, изложение, слог,     │                │     │
│         │стиль, перо                             │                │     │
╰─────────┴────────────────────────────────────────┴────────────────┴─────╯

AlterVista's Thesaurus API supports the following languages:

Czech: cs, Danish: da, English (US): en, French: fr, German (Germany): de, German (Switzerland): de, Greek: el, Hungarian: hu, Italian: it, Norwegian: no, Polish: pl, Portuguese: pt, Romanian: ro, Russian: ru, Slovak: sk, Spanish: es.

Set Default Language

You can set the default language with the --setlang <lang_code> argument, so you don't have to give the -l argument every time.

$ syn --setlang fr
$ syn belle
╭──────────────┬──────────────────────────────────────────────────────────╮
│(Adjectif Nom)│adorable, admirable, brillante, charmante, céleste,       │
│              │délicate, divine, délicieuse, éblouissante, élégante,     │
│              │éclatante, exquise, féerique, harmonieuse, agréable,      │
│              │ajustée, accordée, équilibrée, eurythmique, mélodieuse,   │
│              │musicale, ordonnée, proportionnée, symétrique             │
╰──────────────┴──────────────────────────────────────────────────────────╯

Arguments

  -h, --help      show this help message and exit
  -p, --plain     returns plain text output
  -l, --lang      <language>
  --setkey        set apikey for altervista api
  --setlang       set default language (currently default is 'en')
  --show          show settings file
  -v, --version   show program's version number and exit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synonym_cli-0.1.0.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

synonym_cli-0.1.0-py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page