Maybe we need a sticky thread -
Calibre scripting tips and tricks.
IMO the calibre manual is deficient when it comes to examples. Most people who read books are not syprogs, sysadms or softineers - any more than most listeners to music are composers, songwriters or trombone players
BR