Great, Mastodot seems to be working all by itself now!
Let’s see if I get some time/energy over the next few days to get it to do some formatting and image printing!
(It’s turned off now, don’t spam the emf hashtags to make it print plz)
The hard bit here is that, like all ESC/POS libraries, they can’t speak in my LX-350’s reduced subset of ESC/P commands, it’s expecting to control a receipt printer.
It’s mostly fine. But with things like image printing, I’ve had to bodge the library to get some line spacing.
And I haven’t got the text size options working yet, but I think it’s sending slightly more advanced commands for it so I’ll bodge around it.
@mattgrayyes This makes me want to play with my dot matrix again. 😍
They're fiddly, but I do love printer escape sequences. It's so satisfying the way you can send some bytes down a wire and double struck italic text just happens.
Sending a PDF to modern printer is convenient, but it's so ESC 4 ESC G boring 😀
Spent the evening rewriting my bodgy test code into something more useable, and in such a way I can format the toots. Up until now it could only dump the whole toot as a plaintext string.
I’ve got it logging all the separate bits to the console, so tomorrow’s job is to send them to the printer with formatting.
Then see if the library can “just deal with” images from a URL or if I’m going to have to download and convert first.
@mattgrayyes
How are you dealing with federation, given that your machine will presumably only see toots known about by your instance? I would have thought a gup.pe group or other account mention system would work better than a hashtag as then you can use any toot that arrives at the account inbox? #mastodev#ActivityPub
@mattgrayyes At least the toot printer at #GPN22 is working, blowing toots all over the hackcenter as they are written. (Some people try and catch their own toots here ^^)
@mattgrayyes I made a huge mess in the bar with a thermal receipt printer in previous years that looked for mention of "emfcamp" via Twitter. That was fun! I peaked with the photobooth in 2018 which printed a LOT of pictures over the weekend and always seemed busy (when it wasn't suffering a paper jam!). Might have to make a more portable version and resurrect it sometime .
@mattgrayyes that reminds me
of The Cuckoo’s Egg, where the guy puts printers between the Server and the Uplink, to print every Traffic and See what the Hacker actually did...
@mattgrayyes@emf So, who is gonna be the first person to work out the timing of the dot matrix printer to get it to play the rhythm of Never Gonna Give You Up while printing?