Okay, let’s talk about getting my code snippets looking a bit nicer. I share bits of code here and there, you know, just little examples or things I’ve figured out. But honestly, just pasting plain text looked pretty drab. It needed some… pizzazz, I guess?

Finding a Fix
So I started poking around. Needed something simple, command-line ideally, that could just take some code and spit out something colorful and readable. Found this tool called purdy
. Looked promising, seemed lightweight enough for what I wanted.
First step, obviously, was getting it installed. Just popped open my terminal and did the usual Python thing:
pip install purdy
That part was easy, no fuss there. Then I grabbed a small Python script I had lying around, just to test it out.
Getting the Look Right
Ran it like purdy my_*
. And yeah, it worked! It printed the code to my screen, colored and everything. Basic, but definitely better than plain text. But, the default look wasn’t quite what I had in mind. It felt a bit… generic.
This is where I started messing with the ‘outfit’, trying to dress it up a bit. I remembered seeing something about styles or themes in the little bit I read about it. So, I tried adding flags to the command. Took a few tries, honestly. Had to check how to specify a style.
Think I tried something like:
purdy -s monokai my_*
purdy -s solarized-dark my_*
purdy -s fruity my_*
(Yeah, some have funny names)
Played around with a few different ones. Some were too dark for my taste, others had weird color choices for certain parts of the code. It was a bit of trial and error, running the command, looking at the output, trying another style.
Eventually, I landed on one that felt right. Clean, good contrast, made the code easy to follow. Didn’t need anything super fancy, just something clear and, well, purdy.
Using It Day-to-Day
So now, when I want to grab a code snippet to show someone or post somewhere simple, I often run it through purdy
first with the style I picked. Just copy the output from the terminal. It’s quick, it does the job, and makes my shared code look a bit more polished without much effort. Pretty happy with how simple it turned out to be, once I found the style I liked.