Show generated files while 1st command is still running, sort of a watchfolder in single script...

This is just a model.

#!/bin/bash

# watchfolder (model)

# a simple watchfolder model where 2nd thing does things generated from 1st thing 
# while 1st thing is still running and exits nicely

# tmp dir with extended trap that should bring down main as well 
# note: kill %%  # will kill most recent background job
tmp="$HOME/tmp/test/model"
trap '[ -n "$tmp" ] && rm -fr "$tmp" && kill %%' EXIT
mkdir -m 700 "$tmp" "$tmp/make" "$tmp/show" || { echo '!! unable to create a tmpdir' >&2; tmp=; exit 1; }

# main calculus that creates files while still running here (ffmpeg for example)

for i in {001..020}
do
    touch "$tmp/make/${i}.png" && echo "$i" > "$tmp/make/${i}.png" && sleep 0.2
    # simulate slow rendering of the main 
done &
pid="$!"

# the thing that does something with those files, while the main is still running
# checking if the pid is still active OR some files left to process

while [[ "$(ps -p $pid &>/dev/null)" ]] || [[ "$(ls "$tmp/make"*)" ]]; do

    mv "$tmp/make/"* "$tmp/show" 2> /dev/null

    # show and remove each
    cd "$tmp/show" || exit
    for file in *; do
        echo -n "$file > " && cat "$file"
        rm "$file"

    done
    sleep 1 # pause between checks
done

Observe file creation and moving with

watch -n 1 tree $HOME/tmp/test/
  • This may be useful with ffmpeg scene detection, showing frames in term, while ffmpeg is still generating new ones.
  • pid capturing still looks somehow weird, possibly incorrect

blurp last or middle frame or scene detected frames to tty

3 simple scripts to blurp last or middle or scene detected frames to tty.
scrot

spellcheck alias

alias en="aspell -a clean -l en <<<"

Usage:

en "woot"

Returns:

@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.8)
& woot 37 0: wot, woo, Wood, wood, wort, woody, wit, wont, Root, Woop, boot, coot, foot, hoot, loot, moot, root, soot, toot, woof, wool, woop, woos, Witt, wait, whit, wooed, wet, Watt, wart, watt, what, whet, woad, word, won't, who'd

Thunder audio fx

https://freesound.org/people/kernowrules/sounds/242888/ meh https://freesound.org/people/BlueDelta/sounds/446753/ clean, nice https://freesound.org/people/BlueDelta/sounds/367222/ clean, nice https://freesound.org/people/juskiddink/sounds/101933/ long, nice https://freesound.org/people/bajko/sounds/399656/ nice, crackling https://freesound.org/people/Yoyodaman234/sounds/267550/ distant, very nice https://freesound.org/people/Dave%20Welsh/sounds/194364/ not so distant, nice

https://freesound.org/people/klangfabrik/sounds/488346/ synth - drone - thunder https://freesound.org/people/Sam80/sounds/118765/ german thunder https://freesound.org/people/Darsycho/sounds/617427/ INT, nice https://freesound.org/people/jfmcrae/sounds/512921/ synth like https://freesound.org/people/Walking.With.Microphones/sounds/553800/ neat, hi dyn

Neat looking css, js, html clock

https://www.youtube.com/watch?v=eoSfzVz9ur0

IES lights not rendering on sheepit, manual fix

The project.zip would need to include:

project.blend
ies/lighttexture < manually added

and that seems to fix the issue, it is unknown why blender doesn’t pack this automagically.

The amazing geo nodes, proximity one

https://www.youtube.com/watch?v=9flmk1sHBnk

about / github / jekyll

Support this neat blog by sending some doge to this dogecoin deposit address (minimum is 10 doge): D7hVsZVDVEqrLUEmkQF84FZRjZEKDmr5oL