From 48543611c55197f4a7d2de15dead488b9ebb4ff9 Mon Sep 17 00:00:00 2001 From: Piotr Dec Date: Fri, 10 Apr 2026 12:50:42 +0200 Subject: [PATCH] Channels sorted by name --- exporter_ng.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exporter_ng.py b/exporter_ng.py index dad9d00..c174ae2 100644 --- a/exporter_ng.py +++ b/exporter_ng.py @@ -349,7 +349,8 @@ class SlackExporter: """Ładuje kanały""" channels_data = self.api.get_channels() # channels_data = json.load(open("out/channel_list.json", "r", encoding="utf-8")) - return [SlackChannel(ch, self.users) for ch in channels_data] + channels = [SlackChannel(ch, self.users) for ch in channels_data] + return sorted(channels, key=lambda s: s.name) def _save_data(self, data: Any, filename: str, as_json: bool = False): """Zapisuje dane do pliku"""