Check for an empty inventory except for one item.

Hi, I wan't to check the players inventory to make sure it's completely empty except for a book that may be in either their offhand or mainhand. Any Ideas of how to do this?

I've figured out how to check for a completely empty inventory, anything but an empty inventory or even a specific item in a specific spot but havn't managed to crack the empty except for this item/slot command.

Continue to help post