Skip to content

Commit

Permalink
Add fuzzy searching demo
Browse files Browse the repository at this point in the history
  • Loading branch information
yankeexe committed Jul 19, 2021
1 parent 1392f8c commit d4e4f83
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ curl -f https://raw.githubusercontent.com/yankeexe/air-quality-cli/master/instal
- [Contents](#contents)
- [Usage](#usage)
- [Initialization](#initialization)
- [Seach for air quality based on country or city name](#seach-for-air-quality-based-on-country-or-city-name)
- [Search for air quality based on country or city name](#search-for-air-quality-based-on-country-or-city-name)
- [Save your city to config for quick view.](#save-your-city-to-config-for-quick-view)
- [Remove saved city from your config](#remove-saved-city-from-your-config)
- [Contributing](#contributing)
Expand All @@ -34,13 +34,13 @@ One time setup to initialize the CLI using API token.
$ air init
```

### Seach for air quality based on country or city name
### Search for air quality based on country or city name

```bash
$ air search kathmandu

# by default, stations whose data is not avaiable is hidden.
# use --all to show stations even if there's no data.
# use --all or -a to show stations even if there's no data.

$ air search kathmandu --all
```
Expand All @@ -54,6 +54,25 @@ $ air search Nepal
</details>

**Fuzzy search the stations from your query.**

Alternative to viewing all the stations as table, you can also fuzzy search the stations returned from your query.

Use `-f` or `--fuzzy` flag to initiage fuzzy searching.

```bash
$ air search kathmandu -f

# by default, stations whose data is not avaiable is hidden.
# use --all or -a to show stations even if there's no data.
$ air search kathmandu -fa
```

> <details><summary><strong>Demo</strong></summary>
> <img src = "https://i.imgur.com/9M5akjp.gif" width="700" alt="demo of air quality cli search" />
</details>

### Save your city to config for quick view.

You can save stations from a number of locations to quickly view air quality there.
Expand All @@ -75,7 +94,7 @@ $ air add kathmandu
$ air show

# by default, stations whose data is not avaiable is hidden.
# use --all to show stations even if there's no data.
# use --all or -a to show stations even if there's no data.

$ air show --all
```
Expand Down

0 comments on commit d4e4f83

Please sign in to comment.