- Userbar SAX Client
- 11 May 2021 03:49:16 pm
- Last edited by commandblockguy on 07 Aug 2021 11:12:31 am; edited 1 time in total
So, my userbar at the moment is a (one-way) SAX client! Go check it out at the bottom of this post if you haven't seen it already. Just ctrl-click the image twice with about a second between clicks and then refresh the page to toggle the client on or off.
Here's the link to the GitHub repository if you want to check out how it works.
It's written in Python, and I'm using Flask and an entirely custom APNG implementation to stream frames to the client using a long-running connection. It also supports an infinite number (well, as many as you can fit in the 300-character limit) of buttons, though at the moment I'm not using any besides the one that turns it back off. I was considering using this to allow you to send messages back, but I figured that people wouldn't really want said messages in the chat.
The default image is just a normal PNG, so there's no performance overhead when it's switched off compared to a regular userbar, except I guess cookies, which are negligible.
The actual bridge is being handled by the irc module, and I'm using PIL to render the text.
I may do something else with the underlying framework in the future, so stay tuned!
Here's the link to the GitHub repository if you want to check out how it works.
It's written in Python, and I'm using Flask and an entirely custom APNG implementation to stream frames to the client using a long-running connection. It also supports an infinite number (well, as many as you can fit in the 300-character limit) of buttons, though at the moment I'm not using any besides the one that turns it back off. I was considering using this to allow you to send messages back, but I figured that people wouldn't really want said messages in the chat.
The default image is just a normal PNG, so there's no performance overhead when it's switched off compared to a regular userbar, except I guess cookies, which are negligible.
The actual bridge is being handled by the irc module, and I'm using PIL to render the text.
I may do something else with the underlying framework in the future, so stay tuned!