Sorry, that won't work. The format expression context is completely different from the script execution context, so it's not possible to hook into variables and methods from the other context.
That's too bad. I recently found a command line tool for notifications, https://github.com/caronc/apprise that seems quite flexible. I wanted to use the same format of notification currently used by the AMC script but for Discord, which apprise supports.
I only work in black and sometimes very, very dark grey. (Batman)
Is it possible to recover the rename log from just the last sequence?
That might have all the info needed to replicate the behaviour of getNotificationTitle() in a separate script.
I only work in black and sometimes very, very dark grey. (Batman)
FileBot does not keep logs in memory after printing them to console, so there's no way to access them. You'd have to parse the console output and then call commands yourself in your own amc script wrapper shell script.
If you enable html reports, then there'd be html files on your hard disk that you could read to get that piece of information. But not sure if those are written before or after --def exec is called.
You could also try reading the history xml file. But that also probably only gets updated when FileBot exits.