From 686ed1da882e51b47907306e7a088a31544b917a Mon Sep 17 00:00:00 2001 From: Lukáš Růžička Date: Jan 23 2025 10:32:31 +0000 Subject: Enable pagination This adds the --pages switch, that makes the individual updates start on a clean screen rather then just appear after the previous ones. Co-authored-by: Kamil Páral Merges: https://pagure.io/fedora-easy-karma/pull-request/39 --- diff --git a/fedora-easy-karma.py b/fedora-easy-karma.py index 3132e9f..68ef0f0 100755 --- a/fedora-easy-karma.py +++ b/fedora-easy-karma.py @@ -389,6 +389,12 @@ class FedoraEasyKarma(object): action="store_true", default=False) parser.add_option("", + "--pages", + dest="pages", + help="Clear terminal before each new presented update", + action="store_true", + default=False) + parser.add_option("", "--product", dest="product", help="product to query Bodhi for, 'F' for Fedora, " @@ -653,6 +659,9 @@ class FedoraEasyKarma(object): continue installed_rpms = [ self.format_rpm(pkg) for pkg in installed_pkgs] + # If --pages was used, clear the screen. + if self.options.pages: + os.system('clear') if self.options.ipdb: import ipdb ipdb.set_trace()