I've not much to say on the thermal printer part of this but the extensions they did to markdown are great. They had me double taking for a few seconds thinking they might be real markdown because they make so much sense.
[align=center] Center-align the following text (also left, right)
[qr=https://...] Generate and print a QR code
It’s funny, after all the work that was done to decouple content from presentation, 90% of the markup I’ve seen in every codebase this decade is using Styled Components anyway, which commingles them in the source code anyway.
I think this further proves that the hypothesis of decoupling content from presentation is flawed. The question is how many more data points do we need before we admit that?
Yes, iirc the concept wasn't to decouple content and presentation but to decouple semantics from presentation in order to re-present content in different media in that medium's native representation of a particular semantic. However, many things are not much different in different media, a headline is a headline. And other things like "emphasis" can have cultural differences even within the same media, like being bold, italicized or even double-quotes.
Oh man... the popularity of the tailwind css framework. I have big-o Opinions on that, but screw it, if it helps people get things done quickly, then I'm all for it. The semantic xml/html dweebs set us back a solid decade.
Since align is only deprecated and not removed, and Markdown is a superset of HTML (at least for CommonMark and GFM), it would be valid markdown to just use <div align=center> to center text (not like there's such a thing as invalid Markdown)
I actually use my printers thank you very much. Even bought one of those bank teller slip printer things and a few boxes check-sized slips. I use them for time tracking and todo list.
I didn't go totally crazy, though, and stopped before getting too deep into "...and then OCR them using the check scanner" because I remembered I was already keeping track of start/stop times in a database when printing the slips.
Can you share more about this workflow? I have only recently started to appreciate how my special blend of adhd can work best with there's a physical component to actually _seeing_ the work to be done vs stashed away in a jira, exclusively.
Also... the way I work with it is pretty simple... just three perl scripts... tsta, tpau, and tend. They take a single argument... just a single string I call a tag. Usually something like a jira ticket id, but it could be something more descriptive. Keeps track of it in a sqlite database. The end part moves the record to the archive table, prefixing the start date and time to the tag so I can reuse tags for routine work tasks and that it's also more obvious when I run a report.
Fun fact... the original implementation was in OpenQM, that is, a PICK-style system.
The TL;DR is that it's a physical kanban board mixed with a time clock.
I place them on a ticket rack hanging on the wall above my monitor. It like the ones you see at restaurants... extruded aluminum... filled with marbles... slot on the bottom. If my board is full, I can't (or at least shouldn't) accept more work. It also is an immediate reminder of what needs to be done. The physical process of marking a ticket done and putting it in the finished pile helps to satisfy that need to have a visible sign that work has been done.
This comes so timely. I bought the receipt printer last week and a large metal sheet to hold them magnetically to the wall for a real life todo kanban board
I bought a Zapos ZA-E200L in South-Africa for $65 [0]
It was configured with a fixed IP/subnet/gateway and no DHCP, which took an hour or two to debug and reconfigure. Been a dream since then: prints really fast and cuts properly. OP's project works well to print todo's.
This rules! I've been working on a similar project where friends DM a discord bot and it prints out a "fax" on my thermal printer.
One thing I solved differently: I rendered the fax as an image using PIL and then I just print the image. That way I can support arbitrary Unicode and can lay things out independently of what my printer is capable of.
I had started working on something similar a few months back but as a collection of CLI utilities.
The first was a todo list printer where the todos are written in a YAML file.
It includes fields for the name of the list and the date.
I also started working on a Sudoku printer (which I think is only possible on 80mm paper).
But I completely forgot about the entire thing after coming back from vacation.
You've inspired be to get back to working on it :D
As an aside, are there any good recommendations for a wifi/bluetooth printer using 80mm paper that doesn't break the bank? I initially bought the Munbyn ITPP098P but it being USB only is a bit unergonomic.
Already replied the same in another comment, but I recently got the "YHD-8390" on Aliexpress for around 100$ - has wifi, usb, ethernet, and works pretty well.
these things seem like too much fun, someone made a gleam printer library (https://hexdocs.pm/escpos/) and suddenly everyone on the discord is buying a printer...
I troubleshoot thermal printers for work and the error is rarely in the hardware. I have no issue with this work request; TPs are deterministic and predictable.
its slower than text mode. basically you can print anything as long as you can convert it to monochrome bitmap before sending. But the thermal printers have anotehr mode which prints extremely fast if your data is textual with rudimentary formatting like order slips.
I believe the speed also depends on how many activated dots there are per line in the image, as thermal print heads often have a limit to the number of elements that can be activated at once.
I've not much to say on the thermal printer part of this but the extensions they did to markdown are great. They had me double taking for a few seconds thinking they might be real markdown because they make so much sense.
Deprecating align in html was a mistake.It’s funny, after all the work that was done to decouple content from presentation, 90% of the markup I’ve seen in every codebase this decade is using Styled Components anyway, which commingles them in the source code anyway.
I think this further proves that the hypothesis of decoupling content from presentation is flawed. The question is how many more data points do we need before we admit that?
Yes, iirc the concept wasn't to decouple content and presentation but to decouple semantics from presentation in order to re-present content in different media in that medium's native representation of a particular semantic. However, many things are not much different in different media, a headline is a headline. And other things like "emphasis" can have cultural differences even within the same media, like being bold, italicized or even double-quotes.
Oh man... the popularity of the tailwind css framework. I have big-o Opinions on that, but screw it, if it helps people get things done quickly, then I'm all for it. The semantic xml/html dweebs set us back a solid decade.
Since align is only deprecated and not removed, and Markdown is a superset of HTML (at least for CommonMark and GFM), it would be valid markdown to just use <div align=center> to center text (not like there's such a thing as invalid Markdown)
I actually use my printers thank you very much. Even bought one of those bank teller slip printer things and a few boxes check-sized slips. I use them for time tracking and todo list.
I didn't go totally crazy, though, and stopped before getting too deep into "...and then OCR them using the check scanner" because I remembered I was already keeping track of start/stop times in a database when printing the slips.
Can you share more about this workflow? I have only recently started to appreciate how my special blend of adhd can work best with there's a physical component to actually _seeing_ the work to be done vs stashed away in a jira, exclusively.
Also... the way I work with it is pretty simple... just three perl scripts... tsta, tpau, and tend. They take a single argument... just a single string I call a tag. Usually something like a jira ticket id, but it could be something more descriptive. Keeps track of it in a sqlite database. The end part moves the record to the archive table, prefixing the start date and time to the tag so I can reuse tags for routine work tasks and that it's also more obvious when I run a report.
Fun fact... the original implementation was in OpenQM, that is, a PICK-style system.
The TL;DR is that it's a physical kanban board mixed with a time clock.
I place them on a ticket rack hanging on the wall above my monitor. It like the ones you see at restaurants... extruded aluminum... filled with marbles... slot on the bottom. If my board is full, I can't (or at least shouldn't) accept more work. It also is an immediate reminder of what needs to be done. The physical process of marking a ticket done and putting it in the finished pile helps to satisfy that need to have a visible sign that work has been done.
In that case... how much is 14 feet of this ticket rack? ;-)
According to https://www.amazon.com/American-Metalcraft-Silver-Aluminum-3... about $180
This comes so timely. I bought the receipt printer last week and a large metal sheet to hold them magnetically to the wall for a real life todo kanban board
What’s a cheap but ok thermal printer? The brand mentioned in this repo?
I wanted to setup https://www.colonnes.com but their recommendations were quite expensive.
I bought a Zapos ZA-E200L in South-Africa for $65 [0]
It was configured with a fixed IP/subnet/gateway and no DHCP, which took an hour or two to debug and reconfigure. Been a dream since then: prints really fast and cuts properly. OP's project works well to print todo's.
[0] https://alcell.co.za/product/zapos-za-e200l-thermal-receipt-...
I like my Rongta POS Printer, under $100
I recently got the YHD-8390 on Aliexpress for around 100$, works pretty well. Connects by Ethernet, USB and Wifi. Having plenty of fun with it.
I got an Epson TM-T88IIIP for about 40 bucks used. The whole line seems to have decent Linux drivers
For labels I use Phomomo. Quite cheap. I wrote some python code to drive it.
This rules! I've been working on a similar project where friends DM a discord bot and it prints out a "fax" on my thermal printer.
One thing I solved differently: I rendered the fax as an image using PIL and then I just print the image. That way I can support arbitrary Unicode and can lay things out independently of what my printer is capable of.
Example rendered fax: https://github.com/frizzle-chan/fax.frizzle.lol/blob/main/fa...
Called me out with that first sentence
Same. Plus I have an USB barcode scanner somewhere :D
I had started working on something similar a few months back but as a collection of CLI utilities.
The first was a todo list printer where the todos are written in a YAML file. It includes fields for the name of the list and the date.
I also started working on a Sudoku printer (which I think is only possible on 80mm paper). But I completely forgot about the entire thing after coming back from vacation.
You've inspired be to get back to working on it :D
As an aside, are there any good recommendations for a wifi/bluetooth printer using 80mm paper that doesn't break the bank? I initially bought the Munbyn ITPP098P but it being USB only is a bit unergonomic.
Already replied the same in another comment, but I recently got the "YHD-8390" on Aliexpress for around 100$ - has wifi, usb, ethernet, and works pretty well.
Obligatory "be careful with that poison paper" warning![1]
[1]: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
An alternative to consider are dot matrix / impact printers.
They are used in kitchens, as heat sensitive paper doesn't work well there. It's just plain paper and an ink ribbon.
Same underlying protocol as thermal printers, so the code is mostly plug and play.
They often can print in two colours (red and black). And sound like the 1980s.
I... thought dot matrix printers were some of the worst for releasing particulate matter into the air? Especially ultra fine particles?
I can't find any information regarding this.
You can buy phenol free paper
https://www.pca.state.mn.us/business-with-us/bpa-and-bps-in-...
There's also this which works using a purely physical process: https://www.koehlerpaper.com/en/products/Thermal-paper/TH_Bl...
Check out some results here: https://thermalprintcameras.wordpress.com/blue4est-paper/
I use Niimbot M2_H which uses thermal transfer technology, and it’s more durable and lasts longer than thermal ones, BPA free as well.
these things seem like too much fun, someone made a gleam printer library (https://hexdocs.pm/escpos/) and suddenly everyone on the discord is buying a printer...
I troubleshoot thermal printers for work and the error is rarely in the hardware. I have no issue with this work request; TPs are deterministic and predictable.
would be cool if it supported basic html/css
That's the approach I used for my thermal printer based project. Render HTML/CSS to B/W Image and then print it on the thermal printer.
https://sales-and-dungeons.app/
An easy way to do this, which I use to print recipes with my TP, is to render the page as an image. I use dom-to-image for that.
I can print webpages straight to my Epson TM-T20IV. My web browser just sends it to CUPS.
thermal printers are centuries backwards from anything like CUPS.
Can we not print full pdf type stuff with thermal printers?
I just bought one a couple weeks ago actually.
its slower than text mode. basically you can print anything as long as you can convert it to monochrome bitmap before sending. But the thermal printers have anotehr mode which prints extremely fast if your data is textual with rudimentary formatting like order slips.
I believe the speed also depends on how many activated dots there are per line in the image, as thermal print heads often have a limit to the number of elements that can be activated at once.
[dead]