Programmable signatures?

Can we have a way to invoke a shell script and take the output as a signature?

But even something as simple as

{~/foo.sh}

inserted into a signature template which would then trigger that script