Skip to content

Commit

Permalink
add Python 3.12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
agmmnn committed Oct 8, 2023
1 parent 0e5fc48 commit 5afae65
Show file tree
Hide file tree
Showing 11 changed files with 922 additions and 1,036 deletions.
21 changes: 11 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
__pycache__/

.vscode
_other

build
dist
*.spec
*.manifest
*.egg-info
__pycache__/

.vscode
_other

build
dist
*.spec
*.manifest
*.egg-info
.DS_Store
134 changes: 67 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
<div align="center"><img src="https://user-images.githubusercontent.com/16024979/162848437-8da9d5d4-a234-44d3-94d8-048f92b015a6.png" alt="syn"><a alt="Github" href="https://github.com/agmmnn/syn"><img alt="GitHub release" src="https://img.shields.io/github/v/release/agmmnn/syn"></a> <a href="https://pypi.org/project/synonym-cli/"><img alt="PyPI" src="https://img.shields.io/pypi/v/synonym-cli"></a> <a href="https://pepy.tech/project/synonym-cli"><img alt="PyPI" src="https://pepy.tech/badge/synonym-cli"></a></div>

# 🌾 syn

Get synonyms and antonyms of words from [Thesaurus.com](https://www.thesaurus.com/), [Datamuse API](https://www.datamuse.com/api/) and [AlterVista](https://thesaurus.altervista.org/) in your terminal, with [rich](https://github.com/Textualize/rich) output.

# Install:

```
pip install synonym-cli
```

## Usage:

```
syn <word>
```

### Explore Mode

Returns more particular results about the given word. Uses [Datamuse API](https://www.datamuse.com/api/).

> for Web UI: https://wordwhisper.vercel.app
`$ syn dominant -d`
![](https://user-images.githubusercontent.com/16024979/209148078-309ba28e-dc59-459f-9035-b6d3d75b710f.png)

### Other Languages

For other languages you can use `--lang`, `-l` command. To use this feature, you need to get an api key from [here](https://thesaurus.altervista.org/openapi).

`$ syn -l fr belle`
![](https://user-images.githubusercontent.com/16024979/209144768-0cde6709-65d9-4142-9eae-bb4bc38e4a13.png)

`$ syn -l ru фраза`
![](https://user-images.githubusercontent.com/16024979/209144765-abca9b54-5495-4295-98f7-15acdbde7623.png)

> 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
> default language is: fr
$ syn belle
> ...
```

## 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
```

# Contrubuting

Contributions are welcome. If you want to contribute to this list send a pull request or just open a new issue.
<div align="center"><img src="https://user-images.githubusercontent.com/16024979/162848437-8da9d5d4-a234-44d3-94d8-048f92b015a6.png" alt="syn"><a alt="Github" href="https://github.com/agmmnn/syn"><img alt="GitHub release" src="https://img.shields.io/github/v/release/agmmnn/syn"></a> <a href="https://pypi.org/project/synonym-cli/"><img alt="PyPI" src="https://img.shields.io/pypi/v/synonym-cli"></a> <a href="https://pepy.tech/project/synonym-cli"><img alt="PyPI" src="https://pepy.tech/badge/synonym-cli"></a></div>

# 🌾 syn

Get synonyms and antonyms of words from [Thesaurus.com](https://www.thesaurus.com/), [Datamuse API](https://www.datamuse.com/api/) and [AlterVista](https://thesaurus.altervista.org/) in your terminal, with [rich](https://github.com/Textualize/rich) output.

# Install:

```
pip install synonym-cli
```

## Usage:

```
syn <word>
```

### Explore Mode

Returns more particular results about the given word. Uses [Datamuse API](https://www.datamuse.com/api/).

> for Web UI: https://wordwhisper.vercel.app
`$ syn dominant -d`
![](https://user-images.githubusercontent.com/16024979/209148078-309ba28e-dc59-459f-9035-b6d3d75b710f.png)

### Other Languages

For other languages you can use `--lang`, `-l` command. To use this feature, you need to get an api key from [here](https://thesaurus.altervista.org/openapi).

`$ syn -l fr belle`
![](https://user-images.githubusercontent.com/16024979/209144768-0cde6709-65d9-4142-9eae-bb4bc38e4a13.png)

`$ syn -l ru фраза`
![](https://user-images.githubusercontent.com/16024979/209144765-abca9b54-5495-4295-98f7-15acdbde7623.png)

> 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
> default language is: fr
$ syn belle
> ...
```

## 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
```

# Contrubuting

Contributions are welcome. If you want to contribute to this list send a pull request or just open a new issue.
Loading

0 comments on commit 5afae65

Please sign in to comment.