help-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: awk and graphics


From: Miriam English
Subject: Re: awk and graphics
Date: Tue, 7 Nov 2023 07:58:50 +1000

I think I've found a super-simple solution that lets me run awk at full
speed and yet display the results as they develop.

"feh" (https://feh.finalrewind.org/) is a fast, small image viewer which
has an option (normally disabled) to update its display of an image
when it has changed. I recompiled it with inotify enabled.

Now I can start feh with the command:
feh --autoreload test.png

Meanwhile I ran a simple looping script to get ImageMagick to
repeatedly remake an image using words from a string:

t="The quick brown fox jumps over the lazy dog."
for item in $t
do
    convert -size 320x150 xc:white \
        -font "DejaVu-Serif" \
        -pointsize 72 \
        -annotate +50+95 "$item" \
        test.png

    sleep 2
done

Every time test.png changes, feh updates its display.
This means I can let awk concentrate on making the images, and every
time it updates the image file, feh will display it.

It's a nice, easy, temporary solution.

I'll continue to look into some of the other cool suggestions folks
have made here too. I'm still interested in awk being able to display
directly.

 - Miriam

-- 
There are two wolves and they're always fighting.
One is darkness and despair. The other is light and hope.
Which wolf wins?
Whichever one you feed.
  -- Casey in Brad Bird's movie "Tomorrowland"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]