Ever since seeing this Microprinter post I’ve been fascinated by the idea of having a thermal receipt printer to play with. But they were always a bit too pricey for a toy, and I wasn’t sure that even if I got one I’d be able to make it work.
Then I discovered the Printer project over at Go Free Range. James Adam had already done most of the work for me. He’s got detailed instructions on how to put this together with a cheap thermal printer from Adafruit, an Arduino with an ethernet shield, and a few LED’s, resistors, and wires.
What I’ve done is written a python script that takes a folder full of text files, converts them to HTML via Markdown, and then sends them to one of these free range printers. Here it is in action:
Here’s the script. It includes the Markdown python library and all the other libraries are standard, so you shouldn’t need to track down any dependencies. You’ll just need to update the variables in the printtxt.py script to point to your folders and your printer URL.
I’ve pointed the script at a folder in my Dropbox, which means that I can save these text files from anywhere and have them print out automatically. I’m also using Hazel on a Mac Mini to automate running the script as soon as a new file arrives in the To Print folder, but you could just as easily run the script via chron or the Windows Schedule Task program.
What will I use this for? I don’t know yet. But I think it’s pretty neat.