diff options
author | Cody Hiar <cody@hiar.ca> | 2021-02-10 12:16:29 -0700 |
---|---|---|
committer | Cody Hiar <cody@hiar.ca> | 2021-02-10 12:16:29 -0700 |
commit | e52464e5d765a5da11dcc8f3eaa5f0daa31444b1 (patch) | |
tree | d4b52be34a9ae04ab7d50af8cc12bba921caf0b9 | |
parent | cd518ff1d07800d46812c016f1b73f9a5f2f4313 (diff) |
limit print results
-rw-r--r-- | printer.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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", "") |