Skip to content

Tables (#98) - #99

Merged
NickLyrick merged 1 commit into
stagefrom
dev
Aug 10, 2026
Merged

Tables (#98)#99
NickLyrick merged 1 commit into
stagefrom
dev

Conversation

@slipmetal

Copy link
Copy Markdown
Collaborator
  • Send /top as a native table instead of a rendered image

Telegram has carried table blocks since Bot API 10.1, which the aiogram upgrade just made reachable. Hand /top its rows as data and let the client draw them: the result is selectable and searchable, and it skips the pandas -> WeasyPrint -> poppler -> Pillow round trip entirely.

This is a pilot. /show_queue, /history and the monthly survey results still render images, so the pipeline and its dependencies stay for now.

Also drop a leftover debug print from the handler.

  • Drop the image pipeline in favour of native tables

/show_queue, /history and the monthly survey results now travel as table blocks like /top already did, so nothing renders PNGs any more. That removes pandas, WeasyPrint, pdf2image and Pillow from the requirements, poppler and pango from the image, and src/utility/tools.py altogether.

The survey used to send three images as a media group and pin the first one, which pinned only the first category. It is now a single message: a heading followed by one table per category, so pinning covers all three.

  • Set 512mb for VM

* Send /top as a native table instead of a rendered image

Telegram has carried table blocks since Bot API 10.1, which the aiogram
upgrade just made reachable. Hand /top its rows as data and let the client
draw them: the result is selectable and searchable, and it skips the
pandas -> WeasyPrint -> poppler -> Pillow round trip entirely.

This is a pilot. /show_queue, /history and the monthly survey results
still render images, so the pipeline and its dependencies stay for now.

Also drop a leftover debug print from the handler.

* Drop the image pipeline in favour of native tables

/show_queue, /history and the monthly survey results now travel as table
blocks like /top already did, so nothing renders PNGs any more. That
removes pandas, WeasyPrint, pdf2image and Pillow from the requirements,
poppler and pango from the image, and src/utility/tools.py altogether.

The survey used to send three images as a media group and pin the first
one, which pinned only the first category. It is now a single message: a
heading followed by one table per category, so pinning covers all three.

* Set 512mb for VM
@slipmetal
slipmetal requested a review from NickLyrick August 10, 2026 11:23
@NickLyrick
NickLyrick merged commit 8235cc5 into stage Aug 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants