Making a 88x31 button book using ImageMagick
k.sosnierz.me
k.sosnierz.me
He made an animated button gif that scrolls the entire text of Moby Dick.
4.2 Mb, 19 hours long.
Top quality useless proof of concept. 10/10.
It's definitely a "me problem," obviously people who are into literature and analysis get a lot out of it. But in future I'm gonna stick to my dumb sci-fi books where people talk in comprehensible sentences and things blow up, lol.
19 hours. Don't blink.
Although, as tradition requests, any example of the useless use of `cat` (UUOC) must be called out. The _much_ more efficient use would of course be
tr '\n' ' ' < input.txt | tr -d '\r' | fold …It improves readability. One reads shell commands from left to right, following the logic of each step in the pipeline individually. It makes sense to start with a file, then pipe that to command 1, pipe that to command 2, etc. It makes less sense to start with command 1 into which we put the file and then take the output of command 1 from before the file and put that into command 2 etc.
It also improves future editability. If you wanted to change the input to command 1, you go tweak the bit to the left of command 1 instead of having to hunt down where the < is stuck in the middle somewhere and potentially remove it and replace it with something off to the left anyway depending on whether it's a file or the output of some other command.
Using cat as the first step into a pipeline is almost always the right thing to do!
<input.txt tr '\n' ' ' | tr -d '\r' | fold …
is valid bash and does the same as cat input.txt | tr ...I enjoy discovering and decrypting these one liners much more than reading about what someone's AI agent generated recently.
I feel if anything needs calling out, it's mistaking opinions for universal laws.
Of course it doesn’t matter in in the grand scheme of things. We are talking about saving seconds in the most egregious example. But it’s nice to know one’s tools.
My cheated assignment would fool humans because they would assume the SVG was a GIF binary.
The file size would be significantly smaller.
This skill in being able to deceive and brazenly stick to the lie would make me perfect for a top job in government, big tech, automotive or 'space'.
It is so, so refreshing and I love it.
I think it’s my age speaking again, but I would have preferred Arial for this, as it’s much more legible to me than the final bitmap font he chose. He could have simply sped up the animation to account for only fitting 11 words per page and kept the whole thing in a reasonable time (if 19 hours is reasonable to you).
ImageMagick was created and written in C by John Cristy (also known as Cristy) in 1987 while working at DuPont https://en.wikipedia.org/wiki/ImageMagick
ffmpeg -i book.gif book.mpv