From fcdb455d73a5fc023a4fd39fe57a590fe8f00731 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sun, 1 Oct 2023 01:08:19 +0200 Subject: [PATCH] Added sort mode to rnstatus --- RNS/Utilities/rnstatus.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RNS/Utilities/rnstatus.py b/RNS/Utilities/rnstatus.py index 3a9f2de..ae8d125 100644 --- a/RNS/Utilities/rnstatus.py +++ b/RNS/Utilities/rnstatus.py @@ -89,6 +89,8 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json= interfaces.sort(key=lambda i: i["incoming_announce_frequency"], reverse=not sort_reverse) if sorting == "atx": interfaces.sort(key=lambda i: i["outgoing_announce_frequency"], reverse=not sort_reverse) + if sorting == "held": + interfaces.sort(key=lambda i: i["held_announces"], reverse=not sort_reverse) for ifstat in interfaces: @@ -243,7 +245,7 @@ def main(): "-s", "--sort", action="store", - help="sort interfaces by [traffic, rx, tx, announces, arx, atx, rate]", + help="sort interfaces by [rate, traffic, rx, tx, announces, arx, atx, held]", default=None, type=str )