A simple project using a Raspberry Pi, a Thermal Printer, some ruby code and an integration into Slack so that messages sent around the internet can be printed as a written record by simply adding a 'reaction' to those messages.
Tilly works by creating a RealTime client connection to Slack via the ruby-slack-client library, and watches for 'reaction_added' events containing a :printer: emoji.
Because those event messages only include a reference to the message item being reacted to, another WebClient connection is required to perform a item lookup against Slack's channel history.
Once we have the message data, we _then_ get information on the user and channel metadata so that the printed event includes a bit more friendly information (eg Who/Where).
It's not a very beautiful implementation, however it is unlikely to get considerable use after the initial novelty wears out and it becomes a record of jokes, bad language, and other entertainment
Components
1×
Raspberry Pi
Any version with Ethernet or Wifi will probably work
1×
CSN A2 Thermal Printer
I use TTY for my connectivity, but USB should work with some fiddling
1×
5v 2amp power supply
1×
Barrel Jack connectors
For attaching to the power leads on the printer
After some trial and error... and aboutl 30 feet of print failures, I've been able to incorporate the escpos-image library so that I'm able to print images embedded into messages.
Can't yet print emoji, and will probably be a long-time before thats possible as all text would need to be 'rendered' onto a bitmap rather than as ascii text over serial.
Attachment's can't be printed yet either as Slack puts them in a strange place (Not on a channel technically...) so more work required there.
So in a rare case of completionism, I've managed to build a viable 'finished' article of a printer connected to Slack.
Its rough around the edges - the power supply is pretty rubbish (USB to the RPi and a separate wall-wart for the printer itself), the external wiring is a bit messy (three cables rather than two) and the code is a little unruly but it works.
Next things to solve;
Power supply - Can I run the Pi and Printer from one source?
Images/Multi-Media - How can I print image embeds or avatars as part of the output