October 1, 2022
Sometimes the very best things are the most basic. A case in point: sending GitHub concerns to an old thermal POS printer through a Raspberry Pi. Developer Andrew Schmelyun was confronted with the thorny problem of keeping track of issues published on his numerous GitHub tasks. An issue familiar to numerous: emails tended to get…

Sometimes the very best things are the most basic. A case in point: sending GitHub concerns to an old thermal POS printer through a Raspberry Pi.

Developer Andrew Schmelyun was confronted with the thorny problem of keeping track of issues published on his numerous GitHub tasks.

An issue familiar to numerous: emails tended to get lost in the mailbox or problems were simply forgotten in the face of a growing order of business.

What to do? Schmelyun spied an invoice printer spitting out orders while he was collecting a take-away meal and pondered if the same may be implemented for GitHub issues.

One dirty Pi Zero W, a second-hand Epson thermal printer, some USB connectors, a little PHP, and ta-da– when a concern can be found in, out pops a print-out.

Except rather than an order for pizza and beer, it is instead a nicely formatted little text from GitHub. So here’s why I bought a receipt printer: Each time one of my GitHub repos gets a new concern, I now get a physical ticket printed out on my desk pic.twitter.com/g6uYtGP9J7– Andrew Schmelyun (@aschmelyun )March 24, 2022 It took Schmelyun about 8 hours to make the magic happen. “The longest part was attempting to

get the printer connected to the Raspberry Pi and getting data sent out to it,”he informed The Register.”Originally I was using CUPS in Linux, however it didn’t offer the results I

was looking for.”The Pi No W was used simply because Schmelyun had one lying around( we picture there are a fair few event dust in drawers).

We reckon the RP2040-based Pi Pico could most likely get the job done too. “I have actually likewise thought about using the ESP8266 dev board (like NodeMCU) since I’m a bit familiar with them,”stated Schmelyun. PHP was selected given that Schmelyun is a designer utilizing

the language(Node or Python would be other options), and the existence of a decent library for the ESC/POS commands comprehended by the printer was another plus.

Listening for occasions on repos was accomplished through GitHub’s webhooks. GitHub has form when it pertains to throttling webhooks although Schmelyun

didn’t reckon he ‘d have much of an issue.” The majority of the issues that come through for my projects aren’t huge breaking bugs, “he explained,” and at many I get a couple of issues a day.” “Worst case I ‘d most likely move it to utilize the GitHub API rather.” Going forwards, Schmelyun

is contemplating adding a QR code that links straight to the concern:”

The library has native QR code printing built in so including that would be insignificant.

” More info on the receipt would be handy, as would new PRs, effective merges or ticket closure alerts.

“Somebody likewise suggested including a light or small notification prior to the printing began, because it might be a little disconcerting,”he said,”and that would truthfully be quite useful.

“It certainly is an enjoyable project. However, this author can neither validate nor deny that a significant part of last weekend was invested considering how to spit out remarks from The Register posts to an old Epson TM-T88IV printer picked up from a local second-hand office products shop. ®