Here’s a follow up to my post from earlier today. I went ahead and decided to see if I could write a PowerShell script to convert an EPUB file to a CBZ file. I thought this would be a quick process, but of course it got a bit out of control.
I started by asking ChatGPT to write one for me, given some fairly specific parameters. I asked it to use the 7-Zip command line tool to zip and unzip the files. And I told it where to find the images in the EPUB, and gave it the steps to follow to complete the process. It spit out a script that looked pretty good but (of course) didn’t work.
Long story short: I spent an hour or two tweaking the script and eventually came up with this one. It worked fine, and I used it to convert about a dozen EPUBs to CBZ.
I gave up on calling 7-Zip, since passing parameters into 7-Zip from PowerShell turned out to be a very annoying process that I could never quite get right. (And which gave me a bit of deja vu, when I remembered that I’d had this problem at least once before, when I was trying to write a backup script for my dev VM at work, probably ten years ago.) I switched to the built-in Compress-Archive and Expand-Archive commands, which was probably the better path anyway.
On a separate (but semi-related) subject, I decided to watch a Doctor Who DVD this afternoon. I was going to watch the second DVD from my A Key To Time box set, which I bought in 2022. I watched the first disc in 2023, then never got around to the second. Well, now it’s 2024, so I decided I should probably make some progress with it. But my Xbox refused to play disc 2. So I checked another disc, and it was fine. So it’s not that the Xbox Blu-ray drive is broken. The DVD seems to load fine on my PC though. So now, I’m using Handbrake to rip it, so I can watch it via my Apple TV.
All in all, I’m spending way more time in front of my PC than I intended to today. And whatever disc space I saved by futzing with my comic book files is going to get eaten up by the rip of the Doctor Who DVD. Oh well. I guess this is still more fun than work!