From d4e4f83a6a149dee7f2358337b22674baa9d500b Mon Sep 17 00:00:00 2001 From: Yankee Maharjan Date: Mon, 19 Jul 2021 18:51:19 +0545 Subject: [PATCH] Add fuzzy searching demo --- README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a02eeb9..a04bc67 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 ``` @@ -54,6 +54,25 @@ $ air search Nepal +**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 +``` + +>
Demo +> demo of air quality cli search + +
+ ### Save your city to config for quick view. You can save stations from a number of locations to quickly view air quality there. @@ -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 ```