I read the article A receipt printer cured my procrastination by Laurie Hérault.
It inspired me to dust off my thermal receipt printer and follow his plan.
I ran to the nearby dollar store and purchased a glass jar and a few sticky pads. I also bought some highlighters, which I didn’t need for the project. You could add a gel pen or whatever you prefer to write with.
That’s really all you need. You don’t need a thermal receipt printer even though that’s what inspired me to try this.
I bought the MUNBYN P075 six months ago with a plan to do a project like this one.
The MUNBYN P075 is a 3-1/8” (80mm) Thermal Receipt POS Printer with auto cutter, USB and ethernet interfaces, and it works for Windows, Android, Mac, and Linux.
The printer is wired to my network and it works great. A lot of people say these are difficult to configure but I found it easier than I expected to set up.
I used ChatGPT to write a simple Bash script to print a todo to the printer. It took me longer than I’d like to admit to get the formatting all ironed out. In the end I had to do the job somewhat manually; I kept running ChatGPT in circles trying to get the formatting right.
I ended up with:
I called the script tickit
. I run it from the command line with lines as parameters:
tickit "Hello World" "What do you want to do today?"
Here’s the full program:
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: tickit \"BOLD_LINE\" [NORMAL_LINE]"
exit 1
fi
PRINTER_IP="192.168.0.80"
PRINTER_PORT=9100
ESC=$'\x1B'
BOLD_ON="${ESC}E\x01"
BOLD_OFF="${ESC}E\x00"
CENTER="${ESC}a\x01"
FEED="${ESC}d\x05"
CUT="${ESC}d\x04${ESC}i"
LF=$'\x0A'
RESET="${ESC}@"
FORM_FEED=$'\x0C'
# Build the print job
PRINT_DATA=""
# --- Top Padding (force it with a dummy line) ---
PRINT_DATA+="${CENTER}" # Dummy line to make FEED valid
PRINT_DATA+="${FEED}"
# --- Main Content ---
PRINT_DATA+="${BOLD_ON}$1${BOLD_OFF}"
if [ -n "$2" ]; then
PRINT_DATA+="${LF}"
PRINT_DATA+="$2"
fi
# --- Bottom Padding ---
PRINT_DATA+="${FEED}${FEED}"
# Send everything in one stream
echo -ne "$PRINT_DATA" | nc "$PRINTER_IP" "$PRINTER_PORT"
# Send the cut
echo -ne "${CUT}" | nc "$PRINTER_IP" "$PRINTER_PORT"
I also created a daily.sh
script that prints a few repeat daily tasks and I added that to my crontab. Here’s what the daily.sh
script looks like.
#!/bin/bash
./tickit.sh "Remove Item" "Remove one item from my office."
Then I have that in my crontab with the following line:
# Print daily todo's every weekday
0 8 * * 1-5 /Users/jdare/sandbox/tickit/daily.sh
I’m using my Mac everyday at 8:00a so I’ll be here for this to fire off. If you aren’t using your laptop everyday at a specific time you’ll have to use some other method of scheduling these. You could just run something manually to print today’s items. Whatever works for you.
That’s it, I’ve started to fill a glass jar with crumpled up notes.
I was inspired by Laurie’s first post on the blog, which I thought was pretty damn good for a first article. Hell, it beats this article and the hundreds that came before it if you prefer long content. My stuff is pretty short but I guess that’s okay for those of us that are in a hurry. In any case, something to aspire to. Nice job Laurie.
I also subscribed to his mailing list because I enjoyed reading the article.
Get battle-tested dev tips, terminal wizardry, and practical Mac hacks from a veteran engineer who speaks your language. Subscribe now and power up your toolkit—no fluff, just real code magic.
JoelDare.com © Dare Companies Dotcom LLC