Another option to source 1 book would be to put an redstone engine or aurarchtic gate on your book chest/barrel.
Have the turtle emit a pulse to the engine or the gate and it will send out 1 book. -- you will need to time your pulse to the proper length to get just one. Or you could use a transposer to pull out one item.
Your turtle can emit redstone in any direction, so you could have a pipe + gate that activates pipe wire back to the source chest and pipe a book in over a distance. Or emit to a line of redpower wire/redstone dust back to the source engine/gate. Redpower tube back to a transposer might be the simplest and most reliable method.
Turtles are inventories and pipes/tubes will connect to them.
Redstone API is pretty straight forward:
http://computercraft.info/wiki/Redstone_(API)
Simple example for a 1 second pulse out the back:
redstone.setOutput("back", true)
sleep(1)
redstone.setOutput("back", false)
You could then follow a pattern of:
loop start
if no item in slot 1 request an item from source through pulsing side X
if have item in slot and greater than 30 try enchant
if succeed drop item -- you can drop forward, up, or down - or turn to drop in other forward directions
handle enchant failure (probably drop everything and try again from the start)
loop end
In this way your script should handle more than just books.
You could put items in a chest you want enchanted ending with a stack of book and it will pull them from the chest one by to enchant.