Welcome to Mobileread.
This
thread might point you in the right direction or at least give you some folks to ask about this topic.
Since this thread is not about the
development of calibre I question if it should be in this forum, but I'll let a developer make that call.
Good Reading.