Having some problem that bothers you is the best motivation to learn
Just in case:
Instructions on setting up a development environment:
http://manual.calibre-ebook.com/develop.html
The relevant library check code is mostly in library/check_library.py