Is it possible to use a CSV file to assign to frames poses from a pose library?
This is a CSV like control file which starts with the frame number, an object variable (short cut and a list of assignments where Arm.L references a bone layer and things like KuenHalf or Tan are pose names

0 SET:A=r6839C
1 A:All=IRAS
10 A:Arm.L=KuenHalf,Arm.R=Tan
20 A:Arm.L=Fook,Arm.R=Bong
30 A:Arm.L=KuenHalf,Arm.R=Tan
40 A:Arm.L=Fook,Arm.R=Bong
50 A:Arm.L=KuenHalf,Arm.R=Tan
60 A:Arm.L=Fook,Arm.R=Bong


The source to create the animation from a control file is on github.

Note that this was designed for Makehuman created MHX rigs.