Can't remember the code, finished the game awhile ago. But go to the old woman from the net of the mask? guild. She'll say something with numbers. That is the sequence of the books in the library you need to activate.
"he who read no books reads the first book. he who reads the first book reads the fourth book, he who reads the fourth book reads the third book, he who reads the third book takes a peek at the first book"