From e52464e5d765a5da11dcc8f3eaa5f0daa31444b1 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Wed, 10 Feb 2021 12:16:29 -0700 Subject: limit print results --- printer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/printer.py b/printer.py index 6e13f2c..eeba276 100644 --- a/printer.py +++ b/printer.py @@ -8,7 +8,7 @@ msgs = session.query(Message).order_by(Message.timestamp.desc()).all() my_timezone = timedelta(hours=7) -for msg in msgs: +for msg in msgs[:20]: sent_at = msg.timestamp - my_timezone sent_at_str = sent_at.strftime("[%m-%d %H:%M]") text = msg.text[:70].replace("\n", "") -- cgit v1.2.3