aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2021-02-10 12:16:29 -0700
committerCody Hiar <cody@hiar.ca>2021-02-10 12:16:29 -0700
commite52464e5d765a5da11dcc8f3eaa5f0daa31444b1 (patch)
treed4b52be34a9ae04ab7d50af8cc12bba921caf0b9
parentcd518ff1d07800d46812c016f1b73f9a5f2f4313 (diff)
limit print results
-rw-r--r--printer.py2
1 files changed, 1 insertions, 1 deletions
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", "")