From 85a61f5394456e4f045184dedacc81a1075a8a06 Mon Sep 17 00:00:00 2001 From: Will Carhart Date: Thu, 29 Oct 2020 09:56:21 -0700 Subject: [PATCH] Changed '--omit-metrics' to '--quiet' --- README.md | 6 +++--- smoosh/smoosh.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ebd3c87..73aaad6 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 diff --git a/smoosh/smoosh.py b/smoosh/smoosh.py index 3129766..44565b0 100644 --- a/smoosh/smoosh.py +++ b/smoosh/smoosh.py @@ -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 @@ -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: