Coding 2024-10-03

By Max Woerner Chase

Okay. Now that I've been through a whirlwind of print-debugging Jinja templates (bleh), it's time for me to make sure that my CSS stuff works by actually writing styling code.

I hope you can appreciate how this is inducing a slight feeling of whiplash. Anyway, let's start off with setting a font and some color stuff. Good thing I specifically documented some bits of the theme-related code, or I'd be really annoyed trying to remember what's what.

...

Huh. That didn't work.

I guess

I guess I'll just have to insert some print calls—

:)

Sorry folks, minor technical difficulties.

...

Okay, I'm better now. Probably. We just need to run the command again. What's the worst that could happen?

We'll never know because it worked! Second first try! Yeah!

Okay, now that we know that this actually works, it's time to do some actual styling.

...

OW!

:)

What?

I keep

on

stepping

on these

rakes!

...

Okay, I got it. I had this weird multi-layered collection of attrs classes wrapped up in an enum, and because I almost always freeze my attrs classes, I couldn't subclass both the attrs class and the enum containing the instances, which meant that the enum values didn't have access to the attributes on their values. I tried to solve this with __getattr__. I do not recommend solving such problems with __getattr__.

In the end, I just had the one bit of code using this class add a .value to get the underlying attrs class instance.

Then that all worked fine, and I could see that the generated PDF had an unsightly margin, so I put in some code to get rid of that sort of by fiat.

After all of that, here's where things stand:

I think after those previous... reactions, I need to take some time to cool off. Well, I'll center the header. That's easy.

...

What?

It actually was easy.

But I'm not going to push my luck.

Good night.