From 7a5b30aeef58cef7ab1b9661b18a1a454a13ecef Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Tue, 23 Apr 2019 21:59:00 +0200 Subject: [PATCH] Add option -v/--verbose. --- feediverse.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/feediverse.py b/feediverse.py index 6eb099a..61ebcee 100755 --- a/feediverse.py +++ b/feediverse.py @@ -32,6 +32,8 @@ def main(): parser.add_argument("-n", "--dry-run", action="store_true", help=("perform a trial run with no changes made: " "don't toot, don't save config")) + parser.add_argument("-v", "--verbose", action="store_true", + help="be verbose") parser.add_argument("config_file", nargs="?", metavar="CONFIG-FILE", help=("config file to use, default: %s" % DEFAULT_CONFIG_FILE), @@ -54,6 +56,8 @@ def main(): for feed in config['feeds']: for entry in get_feed(feed['url'], config['updated'], config['include_images']): + if args.verbose: + print(entry) if args.dry_run: print("trial run, not tooting") continue @@ -69,6 +73,8 @@ def main(): if args.dry_run: print("trial run, not saving the config") else: + if args.verbose: + print("saving the config") save_config(config, config_file)