Henry J. Webster

Inner Thoughts Regarding an Insignificant Program

All I want is the discid submission URL.

This thing I do, where I rake through .bash_history to find my nix-shell Python one-liner is ridiculous. Perhaps I put it in ~/.local/bin. Then I could at least remember what to run.

All I want is the discid submission URL via a memorable script.

That won't work for me. One thing I can't stand is stray Python environments marring my machine's spotless file system. But I also can't be calling nix-shell all the time. I suppose I could put it in my system config with writePython3Bin.

All I want is the discid submission URL via a memorable script built in my system configuration.

Wait, I'm always copy-and-pasting it from the terminal into the browser. I should have the command pipe the URL into xdg-open so it pops right up.

All I want is the discid submission URL via a memorable script built in my system configuration that opens the page in my browser.

It works! That wasn't hard at all. This is a truly crafty set up... but pulling in all of Python is nagging me. It's so simple, which makes it so suspect. When I look at the C library the Python depends on, libdiscid, there's already an example C program that does almost exactly what I want. I just have to shear it down a bit.

All I want is the discid submission URL via a memorable script built in my system configuration that opens the page in my browser with minimal dependencies.

I know the UNIX philosophy is "do one thing and do it well", but this is unreasonable. Perhaps I can make it accept a command line argument that specifies what info from libdiscid to output. There could be all sort of useful info in there. Perhaps I can output to JSON and use jq to nab what I need. Or use a simple key-value pairs and extract with sed. Yes, that would be the discid printer of my dreams. The one to rule them all!

All I want is to wring everything possible out of what libdiscid knows about the silly little polycarbonate platter currently in my drive and then I can finally...

Never mind.