- MCP server with stdio transport for local use - Search episodes, transcripts, hosts, and series - 4,511 episodes with metadata and transcripts - Data loader with in-memory JSON storage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
107 lines
7.5 KiB
Plaintext
107 lines
7.5 KiB
Plaintext
Episode: 4184
|
|
Title: HPR4184: Use GKRellM, wget and ImageMagick for a live slideshow
|
|
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr4184/hpr4184.mp3
|
|
Transcribed: 2025-10-25 20:57:58
|
|
|
|
---
|
|
|
|
This is Hacker Public Radio Episode 4184 for Thursday the 15th of August 2024.
|
|
Today's show is entitled, Use Chrome, Get and Image Magic for a Live Slide Show.
|
|
It is hosted by GemLog and is about 10 minutes long.
|
|
It carries a clean flag.
|
|
The summary is, Chrome can show live from nails.
|
|
This script gets fresh data and types text on the images.
|
|
Hi, this is GemLog again in Canada, near Alaska.
|
|
This segment is about Image Magic and the GK Relum System Monitor and Highway Camps.
|
|
I'm pretty sure I'll have to do another segment about Image Magic the way I use it, maybe
|
|
you want an FFN Peg too, but that's FFN Peg is so huge, but so is Image Magic really.
|
|
The reason I use GK Relum as a system monitor is because computers are a lot like working
|
|
with electricity and wiring houses or doing board repairs or whatever, electricity is invisible
|
|
so you need things like meters and all scopes and stuff to tell you what's going on.
|
|
And with a PC, when things slow down, I might want to know what's happening.
|
|
It's the internet busy, my uploading, my downloading, what's the CPU doing, what's my
|
|
hard drive doing, what's the other hard drive doing, all that kind of gets stuck and what's
|
|
hogging the CPU, so that's why GK Relum is there.
|
|
And I just learned because I looked up GK Relum on Wikipedia, I'll just read you how
|
|
it's described, G and U Crel monitors, GK Relum is a system monitor software based on
|
|
the GK tool kit that creates a single process stack of system monitors, which is a whole
|
|
bunch of little boxes that stack up on top of one another on the study monitor.
|
|
It can be used to monitor the status of CPUs, main memory, hard disk, network interfaces,
|
|
local and remote mailboxes and other stuff.
|
|
In my case, I wanted it to look at webcamps as a slideshow one after another, so grabbing
|
|
them in real time, and I saw a plugin that would do that, and so I installed it like
|
|
you do, and it wouldn't work.
|
|
As I watched how it was trying to work, it would launch WGET to get the image, and then
|
|
it would just hang waiting for WGET to return, nothing would ever happen.
|
|
I nested it over and over again, it was a massive waste of time, well, for a geek waste
|
|
of time, it was probably like 20 minutes, I mean, mucking about.
|
|
But while I was doing that, I noticed that whatever test image I put on the disk, if
|
|
that was one of the hardwired, you know, direct reference files, it would change almost
|
|
right away, it was monitoring that file.
|
|
And so I wrote a bash grip like you do, to WGET those images from what in my case is my
|
|
provincial government, BC, British Columbia, Canada, for the highway cams, and I grabbed
|
|
it, you know, half a dozen, six or eight, I forget this now, highway cams, and those
|
|
appeared as thumbnails on the top of GK realm.
|
|
So I got the effect that I wanted, and it's pretty cool.
|
|
But then night time was a problem, because I couldn't always tell just where along the
|
|
Schiener River, a particular image was taken, because it was too dark for me to figure
|
|
it out, and the text was all too tiny in the thumbnail for me to see.
|
|
Now I could click on the thumbnail, and it would open up in image magic's display, I
|
|
think it does.
|
|
But as a glance, that's no good.
|
|
I mean, I can't read micro-pitch print, my eyes aren't that great to begin with.
|
|
And so I turned to image magic to fix the problem, so I just add to my WGET script that's
|
|
grabbing images anyway, and once the image has come in, I'll put some large text on them.
|
|
It should probably tell you what image magic is, just in case you don't know, but it's
|
|
a free open source software that's available for Linux and VSD, and probably other things,
|
|
MacOS and Microsoft maybe.
|
|
And pretty much everything you can do in the GIMP, you can do with image magic on a command
|
|
line.
|
|
But the tricky bit is, I've been cargo-culting image magic for decades now, because there's
|
|
so much to it, and it can be a little bit tricky to use, because of all the escaping and
|
|
fun quoting that you might have to do to make bash happy with it.
|
|
But you know, it's worth the trouble, and eventually you'll get there.
|
|
And so what I ended up doing, and then I'll put this in the show notes, was a fairly short
|
|
script.
|
|
Let me just bring it up here so I can talk about it, oh very short.
|
|
It's only 35 lines, and several of those are comments.
|
|
So all I did was, I made an array with the camera numbers, because that's how my provincial
|
|
DOT website works.
|
|
The URLs had camera numbers in them, so, and I just noticed now I didn't have to
|
|
declare the array, I just started using it.
|
|
That's lucky.
|
|
So anyway, in bash, apparently you don't have to declare an array before you use it.
|
|
So I just stuffed up this array with one, eight different camera numbers, and then I did
|
|
a wild-do with an embedded four, to just step through them and show them for a period
|
|
of time.
|
|
And every time it grabbed one, it used image magic to put in quite large text, and looks
|
|
like turquoise, which shows up very well in daytime and night time on the images, the location
|
|
of the camera in English, rather than, you know, camera 491 means nothing.
|
|
I went back to an old, old habit I have from Amiga days, which will give you a clue as
|
|
to how old I am, where I didn't have a graphical toolkit, and I was writing an accounting program,
|
|
and I wanted to make buttons, and so I learned to first stamp down the image of a button
|
|
in white to the upper left, and the same image in black to the lower right, and then finally
|
|
the same image in whatever color I really wanted the button to be on top of that in the middle,
|
|
and that provides like a 3D effect of the light shining from, in that case the upper left,
|
|
and then you can just reverse that to make a button and maybe gray out the color part
|
|
for when it's depressed. So I just did the same thing for this, I took the place name like
|
|
Rosswood or Hazleton, and stamp that down once in white, then once in black, and then finally
|
|
in turquoise on top in the middle of it, and that came up very well. The tools that come with
|
|
image magic are all separate, they're not in one big gooey like the Gimp, so you have
|
|
display, which will do what it sounds like, put up a little window, and show you something,
|
|
and you have in my case for this script what I used was convert and modify, and they both do
|
|
just the same thing except convert, the convert command operates on a copy, so you'll have to give it
|
|
the source file name, the source picture name, and then the target name
|
|
as an output, whereas magrify operates on the original, so you just give it the original name,
|
|
and it works with that. I think it came out quite well, I'm not sure, as I'm recording this,
|
|
how I'm going to show you what the result is other than just giving you that, maybe I can
|
|
well I can certainly put it on one of my websites, but maybe I could convince archive work to
|
|
take something I'm not sure, but I'm pretty sure you get the idea by now. So I hope that was helpful,
|
|
and you'll be able to do a couple of projects with that.
|
|
You have been listening to Hacker Public Radio, and Hacker Public Radio does work.
|
|
Today's show was contributed by a HBR listener like yourself, if you ever thought of recording
|
|
podcast, and click on our contribute link to find out how easy it means. Hosting for HBR has been
|
|
kindly provided by an honesthost.com, the internet archive, and our syncs.net.
|
|
On the Sadois status, today's show is released under Creative Commons,
|
|
Attribution 4.0 International License.
|