Coding 2025-04-13
I ended up stepping away from the thermal printer stuff entirely, and focusing on a personal conlang project. For this project, I'm deliberately stopping myself from doing some things "the right way" according to some people. I'm instead trying to put things together in a way that's tractable in my head, and then I can potentially scale things up as I manage to automate more and more of the essential process.
Here's my general plan:
- Data about the conlang is typed up in TOML files.
- These files are canonicalized using tomlkit.
- In addition, they are deserialized using tomlkit, then fed into cattrs to produce standardized data in frozen attrs classes.
- This data is in the form of a hierarchical tree structure, which feeds into a Jinja template, to produce an HTML document.
- This HTML document is converted into a vaguely academic-looking PDF using pandoc.
I know this looks like a lot, but almost all of this is stuff I've done before, so it should be relatively easy to snap together, and if I need to change some aspect of the flow, to snap it back apart.
The big stuff I'm trying to work out currently is how I want to build things. Tup sounds cool, but I've never quite managed to convince myself that the stuff I want to use it for is the stuff it's actually meant to do, so I figure I'll crib from the Ninja configuration stuff I've written for other projects.
That's about enough to think about for tonight.
Good night.