Skip to content

Commit

Permalink
Changed '--omit-metrics' to '--quiet'
Browse files Browse the repository at this point in the history
  • Loading branch information
wcarhart committed Oct 29, 2020
1 parent aedc737 commit 85a61f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ smoosh --help
Use `smoosh --help` to view the help menu.

```
usage: smoosh [-h] [-n SENTENCE_LIMIT] [-o] [-v] [-t TIMEOUT] source
usage: smoosh [-h] [-n SENTENCE_LIMIT] [-q] [-v] [-t TIMEOUT] source
Summarize any text article
Expand All @@ -50,7 +50,7 @@ optional arguments:
-h, --help show this help message and exit
-n SENTENCE_LIMIT, --sentence-limit SENTENCE_LIMIT
the number of sentences that will be used to describe the text
-o, --omit-metrics omit metric summary
-q, --quiet omit metric summary
-v, --verbose print verbose metric summary
-t TIMEOUT, --timeout TIMEOUT
timeout (in seconds) to use when fetching data from a URL
Expand All @@ -68,7 +68,7 @@ Or on a local file (see the [`articles/`](https://github.com/wcarhart/smoosh/tre
```bash
smoosh articles/spacex.txt
```
Output shows the summary and some metrics, which you can omit with the `--omit-metrics` flag or make verbose with the `--verbose` flag.
Output shows the summary and some metrics, which you can silence with the `--quiet` flag or make verbose with the `--verbose` flag.
```
It will be an operational monument to Elon Musk's vision: a towering SpaceX launch control center,
a hangar and a rocket garden rising in the heart of Kennedy Space Center. According to plans
Expand Down
4 changes: 2 additions & 2 deletions smoosh/smoosh.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def build_parser():
parser = argparse.ArgumentParser(description='Summarize any text article', formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('source', type=str, help='the text source, which can either be the path to a local file or a URL to a webpage')
parser.add_argument('-n', '--sentence-limit', type=int, default=7, required=False, help='the number of sentences that will be used to describe the text')
parser.add_argument('-o', '--omit-metrics', action='store_true', required=False, help='omit metric summary')
parser.add_argument('-q', '--quiet', action='store_true', required=False, help='omit metric summary')
parser.add_argument('-v', '--verbose', action='store_true', required=False, help='print verbose metric summary')
parser.add_argument('-t', '--timeout', type=int, default=10, required=False, help='timeout (in seconds) to use when fetching data from a URL')
return parser
Expand All @@ -298,7 +298,7 @@ def main():
frequencies = calculate_word_frequency(sentences)
scores = calculate_sentence_scores(sentences, frequencies)
summary = build_summary(scores, args.sentence_limit)
metrics = build_metrics(text, summary, frequencies, args.omit_metrics, args.verbose)
metrics = build_metrics(text, summary, frequencies, args.quiet, args.verbose)
print_results(summary, metrics)
except:
if not PROCESSED_TEXT:
Expand Down

0 comments on commit 85a61f5

Please sign in to comment.